Package org.apache.synapse.core.axis2
Class Axis2Sender
- java.lang.Object
-
- org.apache.synapse.core.axis2.Axis2Sender
-
public class Axis2Sender extends Object
This class helps the Axis2SynapseEnvironment implement the send method
-
-
Constructor Summary
Constructors Constructor Description Axis2Sender()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
preventMultipleResponses(MessageContext messageContext)
This will ensure only one response is sent for a single request.static void
sendBack(MessageContext smc)
Send a response back to a client of Synapsestatic void
sendOn(EndpointDefinition endpoint, MessageContext synapseInMessageContext)
Send a message out from the Synapse engine to an external service
-
-
-
Method Detail
-
sendOn
public static void sendOn(EndpointDefinition endpoint, MessageContext synapseInMessageContext)
Send a message out from the Synapse engine to an external service- Parameters:
endpoint
- the endpoint definition where the message should be sentsynapseInMessageContext
- the Synapse message context
-
sendBack
public static void sendBack(MessageContext smc)
Send a response back to a client of Synapse- Parameters:
smc
- the Synapse message context sent as the response
-
preventMultipleResponses
public static boolean preventMultipleResponses(MessageContext messageContext)
This will ensure only one response is sent for a single request. In HTTP request-response paradigm only a one response is allowed for a single request. Due to synapse configuration issues, there is a chance of multiple response getting sent for a single request Calling this method from all the places where we sent out a response message from engine will prevent that from happening- Parameters:
messageContext
- Synapse message context- Returns:
- whether a response is already sent
-
-