Interface DeferredResponse<T>

  • Type Parameters:
    T - response type expected (Void if no object, but null is expected)

    public interface DeferredResponse<T>
    Interface for receiving deferred/async responses.

    GDS-ng implementations which are not capable of asynchronous or delayed processing of responses are expected to synchronously invoke the onResponse(Object) and - optionally - onException(Exception) methods within the method call.

    Mark Rotteveel
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void onException​(java.lang.Exception exception)
      Exception received when receiving or processing the response.
      default void onResponse​(T response)
      Called with successful response.
    • Method Detail

      • onResponse

        default void onResponse​(T response)
        Called with successful response.
        response - response object, or null if there is no response, but the request completed successfully
      • onException

        default void onException​(java.lang.Exception exception)
        Exception received when receiving or processing the response.

        The default implementation only logs the exception on debug level.

        For GDS-ng implementations that can only perform synchronous processing, it is implementation-defined whether or not this method is called, or if the exception is thrown directly from the invoked method.

        exception - exception received processing the response