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 newResource
using the attributes and the module.void
start()
Starts thisRetainedHandlerService
void
stop()
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 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.- 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
-