Package dev.getelements.elements.sdk
Interface Callback<ResultT>
- Type Parameters:
ResultT- the result type
- All Known Implementing Classes:
MethodCallbackRecord
public interface Callback<ResultT>
Indicates a Callback type. A
Callback is a reference to a specific addressable object within an
ElementRegistry. This is a method call, expecting a result, from a specific service within an
Element.-
Method Summary
-
Method Details
-
call
Executes the callback against the resolved service.- Parameters:
args- the arguments- Returns:
- the call to make
-
as
Makes a newCallbackwhich safely returns the requested type.- Type Parameters:
NewResultT- the new result type- Parameters:
newResultTClass- the new result typeClass- Returns:
- the new
Callbackas the specified type - Throws:
SdkException- if there is a missing callback type
-