Package org.kie.server.client.jms
Class FireAndForgetResponseHandler
- java.lang.Object
-
- org.kie.server.client.jms.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 Summary
Constructors Constructor Description FireAndForgetResponseHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose(javax.jms.Connection connection, javax.jms.Session session)
Responsible for close of resources.int
getInteractionPattern()
Returns int identifying supported interaction pattern for JMSorg.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)
Deals with response if needed according to given interaction pattern it supports.
-
-
-
Method Detail
-
getInteractionPattern
public int getInteractionPattern()
Description copied from interface:ResponseHandler
Returns int identifying supported interaction pattern for JMS- Specified by:
getInteractionPattern
in interfaceResponseHandler
- 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 interfaceResponseHandler
- Parameters:
selector
- message selector to pick only response for given messageconnection
- JMS connection to be usedsession
- JMS session to be usedresponseQueue
- queue that should have response delivered toconfig
- kie server client configurationmarshaller
- marshaller to be used after message is receivedowner
- 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 interfaceResponseHandler
- Parameters:
connection
- jms connection usedsession
- jms session used
-
-