Interface ResultAcceptor<T>


public interface ResultAcceptor<T>
Provides a means to accept results returned by instances of MethodDispatcher
  • Method Summary

    Modifier and Type
    Method
    Description
    dispatch(Consumer<T> tConsumer, Consumer<Throwable> throwableTConsumer)
    Calling calling this method completes the dispatch tho th underlying Resource's method and will place the response of the method call into the provided Consumer<T>.
  • Method Details

    • dispatch

      TaskId dispatch(Consumer<T> tConsumer, Consumer<Throwable> throwableTConsumer)
      Calling calling this method completes the dispatch tho th underlying Resource's method and will place the response of the method call into the provided Consumer<T>. Calling this should kick off a new task. If this method returns, then it has succeeded in scheduling the task. It will throw an exception if it doesn't and will not invoke the supplied Consumer<Throwable>.
      Parameters:
      tConsumer - the consumer
      throwableTConsumer - the Consumer<Throwable> to receive errors
      Returns:
      the TaskId of the task associated with servicing the invocation