Interface RetainedHandlerService

All Known Implementing Classes:
SimpleRetainedHandlerService

public interface RetainedHandlerService
Allows for the manipulating of handler Resources as shared instances. Shared instances are created, one or more methods invoked, and then the original path is then released. The Resource itself may opt to index itself to ensure that it is retained after this call.
  • Method Details

    • start

      void start()
    • stop

      void stop()
    • perform

      TaskId perform(Consumer<Object> success, Consumer<Throwable> failure, long timeoutDelay, TimeUnit timeoutUnit, String module, Attributes attributes, String method, Object... args)
      Creates a new Resource using the attributes and the module. Once created, this Resource will be kept in memory for any number of operations. Once the operations is complete, the system-assigned Path to the Resource will be unlinked. If the Resource needs to persist beyond the creation of this call it must provide additional indexing at some point during this process.
      Parameters:
      success - the Consumer to receive the successful response
      failure - the Consumer to receieve the failed response
      module - the module to use when creating the Resource
      attributes - the attributes to use when creating the Resource
      method - the method to invoke
      args -
      Returns:
      the result of the operation