Interface RequestListener


  • public interface RequestListener

    Listener interface implemented by resource adaptors to receive request messages sent by other nodes. Requests differ from messages in that a response is expected.

    Implementations of this interface are registered with the Message Facility using MessageFacility.setRequestListener(RequestListener).

    For new work, it is recommended to use RequestListenerV2 instead of this interface.

    • Method Detail

      • handleRequest

        Object handleRequest​(int sourceNode,
                             byte[] payload)
                      throws Exception

        Handle the given request message.

        Parameters:
        sourceNode - the node ID of the node which sent the message.
        payload - the payload of the message.
        Returns:
        the result of request processing. May be null.
        Throws:
        Exception - if an error occurs handling the request.