Package com.zeroc.Ice

Class DispatchInterceptor

java.lang.Object
com.zeroc.Ice.DispatchInterceptor
All Implemented Interfaces:
Object

public abstract class DispatchInterceptor extends Object implements Object
Base class that allows a server to intercept incoming requests. The application must derive a concrete class from DispatchInterceptor that implements the dispatch(com.zeroc.Ice.Request) operation. An instance of this derived class can be registered with an object adapter like any other servant.

A dispatch interceptor is useful particularly to automatically retry requests that have failed due to a recoverable error condition.

  • Constructor Details

    • DispatchInterceptor

      public DispatchInterceptor()
  • Method Details

    • dispatch

      public abstract CompletionStage<OutputStream> dispatch(Request request) throws UserException
      Called by the Ice run time to dispatch an incoming request. The implementation of dispatch must dispatch the request to the actual servant.
      Parameters:
      request - The details of the incoming request.
      Returns:
      A completion stage if dispatched asynchronously, null otherwise.
      Throws:
      UserException - A user exception that propagates out of this method will be marshaled as the result.
      See Also: