Package dev.getelements.elements.rt
Class SimpleRetainedHandlerService
java.lang.Object
dev.getelements.elements.rt.SimpleRetainedHandlerService
- All Implemented Interfaces:
RetainedHandlerService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionperform(Consumer<Object> success, Consumer<Throwable> failure, long timeout, TimeUnit timeoutUnit, String module, Attributes attributes, String method, Object... args) Creates a newResourceusing the attributes and the module.voidsetResourceLoader(ResourceLoader resourceLoader) voidsetResourceService(ResourceService resourceService) voidsetScheduler(Scheduler scheduler) voidstart()Starts thisRetainedHandlerServicevoidstop()Stops thisRetainedHandlerService
-
Constructor Details
-
SimpleRetainedHandlerService
public SimpleRetainedHandlerService()
-
-
Method Details
-
start
public void start()Description copied from interface:RetainedHandlerServiceStarts thisRetainedHandlerService- Specified by:
startin interfaceRetainedHandlerService
-
stop
public void stop()Description copied from interface:RetainedHandlerServiceStops thisRetainedHandlerService- Specified by:
stopin interfaceRetainedHandlerService
-
perform
public TaskId perform(Consumer<Object> success, Consumer<Throwable> failure, long timeout, TimeUnit timeoutUnit, String module, Attributes attributes, String method, Object... args) Description copied from interface:RetainedHandlerServiceCreates 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.- Specified by:
performin interfaceRetainedHandlerService- 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
-
getScheduler
-
setScheduler
-
getResourceLoader
-
setResourceLoader
-
getResourceService
-
setResourceService
-