Package dev.getelements.elements.rt
Interface RetainedHandlerService
- All Known Implementing Classes:
SimpleRetainedHandlerService
public interface RetainedHandlerService
-
Method Summary
Modifier and TypeMethodDescriptionperform(Consumer<Object> success, Consumer<Throwable> failure, long timeoutDelay, TimeUnit timeoutUnit, String module, Attributes attributes, String method, Object... args) Creates a newResourceusing the attributes and the module.voidstart()Starts thisRetainedHandlerServicevoidstop()Stops thisRetainedHandlerService
-
Method Details
-
start
void start()Starts thisRetainedHandlerService -
stop
void stop()Stops thisRetainedHandlerService -
perform
TaskId perform(Consumer<Object> success, Consumer<Throwable> failure, long timeoutDelay, TimeUnit timeoutUnit, String module, Attributes attributes, String method, Object... args) Creates a newResourceusing the attributes and the module. Once created, thisResourcewill be kept in memory for any number of operations. Once the operations is complete, the system-assignedPathto theResourcewill be unlinked. If theResourceneeds to persist beyond the creation of this call it must provide additional indexing at some point during this process.- Parameters:
success- theConsumerto receive the successful responsefailure- theConsumerto receieve the failed responsemodule- the module to use when creating theResourceattributes- the attributes to use when creating theResourcemethod- the method to invokeargs-- Returns:
- the result of the operation
-