Class NoOpAsyncHandler<REQUEST,​RESPONSE>

  • Type Parameters:
    REQUEST - type of the request
    RESPONSE - type of the response
    All Implemented Interfaces:
    AsyncHandler<REQUEST,​RESPONSE>

    public class NoOpAsyncHandler<REQUEST,​RESPONSE>
    extends Object
    implements AsyncHandler<REQUEST,​RESPONSE>
    An async handler that doesn’t do anything.
    • Method Detail

      • onSuccess

        public void onSuccess​(REQUEST request,
                              RESPONSE response)
        Description copied from interface: AsyncHandler
        Called if the request was successfully completed.
        Specified by:
        onSuccess in interface AsyncHandler<REQUEST,​RESPONSE>
        Parameters:
        request - The request that was made.
        response - The response that was received.
      • onError

        public void onError​(REQUEST request,
                            Throwable error)
        Description copied from interface: AsyncHandler
        Called if the request could not be completed successfully.
        Specified by:
        onError in interface AsyncHandler<REQUEST,​RESPONSE>
        Parameters:
        request - The request that was made.
        error - The error that was received.
      • singleton

        public static final <REQUEST,​RESPONSE> NoOpAsyncHandler<REQUEST,​RESPONSE> singleton()
        Return the singleton with the correct generic types.
        Type Parameters:
        REQUEST - type of the request
        RESPONSE - type of the response
        Returns:
        no op async handler singleton instance