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 newResource
using the attributes and the module.void
setResourceLoader
(ResourceLoader resourceLoader) void
setResourceService
(ResourceService resourceService) void
setScheduler
(Scheduler scheduler) void
start()
Starts thisRetainedHandlerService
void
stop()
Stops thisRetainedHandlerService
-
Constructor Details
-
SimpleRetainedHandlerService
public SimpleRetainedHandlerService()
-
-
Method Details
-
start
public void start()Description copied from interface:RetainedHandlerService
Starts thisRetainedHandlerService
- Specified by:
start
in interfaceRetainedHandlerService
-
stop
public void stop()Description copied from interface:RetainedHandlerService
Stops thisRetainedHandlerService
- Specified by:
stop
in 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:RetainedHandlerService
Creates a newResource
using the attributes and the module. Once created, thisResource
will be kept in memory for any number of operations. Once the operations is complete, the system-assignedPath
to theResource
will be unlinked. If theResource
needs to persist beyond the creation of this call it must provide additional indexing at some point during this process.- Specified by:
perform
in interfaceRetainedHandlerService
- Parameters:
success
- theConsumer
to receive the successful responsefailure
- theConsumer
to receieve the failed responsemodule
- the module to use when creating theResource
attributes
- the attributes to use when creating theResource
method
- the method to invokeargs
-- Returns:
- the result of the operation
-
getScheduler
-
setScheduler
-
getResourceLoader
-
setResourceLoader
-
getResourceService
-
setResourceService
-