Class FireAndForgetResponseHandler

  • All Implemented Interfaces:
    ResponseHandler

    public class FireAndForgetResponseHandler
    extends Object
    implements ResponseHandler
    Fire and forget response handler meaning it does not wait for any response as it actually instructs the server to not even send any response via interaction pattern constant. It always returns single ServiceResponse of type NO_RESPONSE. Client cannot expect any response from integration when using this handler, as the name suggest it sends the message and forgets about it directly.
    • Constructor Detail

      • FireAndForgetResponseHandler

        public FireAndForgetResponseHandler()
    • Method Detail

      • getInteractionPattern

        public int getInteractionPattern()
        Description copied from interface: ResponseHandler
        Returns int identifying supported interaction pattern for JMS
        Specified by:
        getInteractionPattern in interface ResponseHandler
        Returns:
        See Also:
        for interaction pattern constants
      • handleResponse

        public org.kie.server.api.model.ServiceResponsesList handleResponse​(String selector,
                                                                            javax.jms.Connection connection,
                                                                            javax.jms.Session session,
                                                                            javax.jms.Queue responseQueue,
                                                                            KieServicesConfiguration config,
                                                                            org.kie.server.api.marshalling.Marshaller marshaller,
                                                                            KieServicesClient owner)
        Description copied from interface: ResponseHandler
        Deals with response if needed according to given interaction pattern it supports.
        Specified by:
        handleResponse in interface ResponseHandler
        Parameters:
        selector - message selector to pick only response for given message
        connection - JMS connection to be used
        session - JMS session to be used
        responseQueue - queue that should have response delivered to
        config - kie server client configuration
        marshaller - marshaller to be used after message is received
        owner - top level kie server client that owns the service client
        Returns:
        ServiceResponseList produced from response message
      • dispose

        public void dispose​(javax.jms.Connection connection,
                            javax.jms.Session session)
        Description copied from interface: ResponseHandler
        Responsible for close of resources. Up to implementation if they can be closed directly or after async processing, etc
        Specified by:
        dispose in interface ResponseHandler
        Parameters:
        connection - jms connection used
        session - jms session used