|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageContext
The Synapse Message Context is available to all mediators through which it flows. It allows one to call to the underlying SynapseEnvironment (i.e. the SOAP engine - such as Axis2) where required. It also allows one to access the current SynapseConfiguration. Additionally it holds per message properties (i.e. local properties valid for the lifetime of the message), and the current SOAPEnvelope
Method Summary | |
---|---|
SynapseConfiguration |
getConfiguration()
Get a reference to the current SynapseConfiguration |
Map<String,Object> |
getContextEntries()
Return all the entries which are in the MessageContext. |
Endpoint |
getEndpoint(String key)
Return the endpoint with the given key from the configuration, or the local message context. |
Object |
getEntry(String key)
Get the value of a property set on the message instance, from the local registry or the remote registry - by cascading through |
SOAPEnvelope |
getEnvelope()
Get the SOAP envelope of this message |
SynapseEnvironment |
getEnvironment()
Returns a reference to the host Synapse Environment |
Mediator |
getFaultSequence()
Return the fault sequence from the configuration, or the local message context This method looks up for the sequence named Constants.FAULT_SEQUENCE_KEY from the local message context to make this look up transactional - i.e. |
Stack<FaultHandler> |
getFaultStack()
|
EndpointReference |
getFaultTo()
Get the faultTo EPR if available |
EndpointReference |
getFrom()
Get the from EPR if available |
Mediator |
getMainSequence()
Return the main sequence from the configuration, or the local message context This method looks up for the sequence named Constants.MAIN_SEQUENCE_KEY from the local message context to make this look up transactional - i.e. |
String |
getMessageID()
Get the message id if available |
Object |
getProperty(String key)
Get the value of a custom (local) property set on the message instance |
Set |
getPropertyKeySet()
Returns the Set of keys over the properties on this message context |
RelatesTo |
getRelatesTo()
Get the relatesTo of this message |
EndpointReference |
getReplyTo()
Get the replyTo EPR if available |
Mediator |
getSequence(String key)
Return the sequence with the given key from the configuration, or the local message context. |
Mediator |
getSequenceTemplate(String key)
Return the Sequence Template with the given key from the configuration, or the local message context. |
org.apache.commons.logging.Log |
getServiceLog()
Return the service level Log for this message context or null |
String |
getSoapAction()
Returns the SOAPAction of the message |
EndpointReference |
getTo()
Get the To EPR |
int |
getTracingState()
This is used to check whether the tracing should be enabled on the current mediator or not |
String |
getWSAAction()
Returns the WSAAction |
String |
getWSAMessageID()
Gets the message name |
boolean |
isDoingGET()
Is this message over GET? |
boolean |
isDoingMTOM()
If this message using MTOM? |
boolean |
isDoingPOX()
Is this message over POX? |
boolean |
isDoingSWA()
If this message using SWA? |
boolean |
isFaultResponse()
Is this message a response to a fault message? |
boolean |
isResponse()
Is this message a response to a synchronous message sent out through Synapse? |
boolean |
isSOAP11()
Is this message a SOAP 1.1 message? |
void |
pushFaultHandler(FaultHandler fault)
|
void |
setConfiguration(SynapseConfiguration cfg)
Set or replace the Synapse Configuration instance to be used. |
void |
setContextEntries(Map<String,Object> entries)
Sets the entries to the current context and not to the configuration. |
void |
setDoingGET(boolean b)
Marks this message as over REST/GET |
void |
setDoingMTOM(boolean b)
Marks as using MTOM |
void |
setDoingPOX(boolean b)
Marks this message as over POX |
void |
setDoingSWA(boolean b)
Marks as using SWA |
void |
setEnvelope(SOAPEnvelope envelope)
Sets the given envelope as the current SOAPEnvelope for this message |
void |
setEnvironment(SynapseEnvironment se)
Sets the SynapseEnvironment reference to this context |
void |
setFaultResponse(boolean b)
Marks this message as a fault response |
void |
setFaultTo(EndpointReference reference)
Set the faultTo EPR |
void |
setFrom(EndpointReference reference)
Set the from EPR |
void |
setMessageID(String string)
Set the message id |
void |
setProperty(String key,
Object value)
Set a custom (local) property with the given name on the message instance |
void |
setRelatesTo(RelatesTo[] reference)
Sets the relatesTo references for this message |
void |
setReplyTo(EndpointReference reference)
Set the replyTo EPR |
void |
setResponse(boolean b)
Mark this message as a response or not. |
void |
setSoapAction(String string)
Set the SOAPAction |
void |
setTo(EndpointReference reference)
Set the To EPR |
void |
setTracingState(int tracingState)
This is used to set the value of tracing enable variable |
void |
setWSAAction(String actionURI)
Sets the WSAAction |
void |
setWSAMessageID(String messageID)
Set the message |
Method Detail |
---|
SynapseConfiguration getConfiguration()
void setConfiguration(SynapseConfiguration cfg)
cfg
- The new synapse configuration instanceSynapseEnvironment getEnvironment()
void setEnvironment(SynapseEnvironment se)
se
- the reference to the Synapse EnvironmentMap<String,Object> getContextEntries()
void setContextEntries(Map<String,Object> entries)
entries
- the set of local entries to be setMediator getMainSequence()
Mediator getFaultSequence()
Mediator getSequence(String key)
key
- the sequence key to be looked up
Mediator getSequenceTemplate(String key)
key
- the sequence key to be looked up
Endpoint getEndpoint(String key)
key
- the endpoint key to be looked up
Object getProperty(String key)
key
- key to look up property
Object getEntry(String key)
key
- key to look up property
void setProperty(String key, Object value)
key
- key to be usedvalue
- value to be savedSet getPropertyKeySet()
SOAPEnvelope getEnvelope()
void setEnvelope(SOAPEnvelope envelope) throws AxisFault
envelope
- the envelope to be set
AxisFault
- on exceptionEndpointReference getFaultTo()
void setFaultTo(EndpointReference reference)
reference
- epr representing the FaultTo addressEndpointReference getFrom()
void setFrom(EndpointReference reference)
reference
- epr representing the From addressString getMessageID()
void setMessageID(String string)
string
- message id to be setRelatesTo getRelatesTo()
void setRelatesTo(RelatesTo[] reference)
reference
- the relatesTo references arrayEndpointReference getReplyTo()
void setReplyTo(EndpointReference reference)
reference
- epr representing the ReplyTo addressEndpointReference getTo()
void setTo(EndpointReference reference)
reference
- the To EPRvoid setWSAAction(String actionURI)
actionURI
- the WSAActionString getWSAAction()
String getSoapAction()
void setSoapAction(String string)
string
- the SOAP Actionvoid setWSAMessageID(String messageID)
messageID
- message id to be setString getWSAMessageID()
boolean isDoingMTOM()
boolean isDoingSWA()
void setDoingMTOM(boolean b)
b
- true to mark as using MTOMvoid setDoingSWA(boolean b)
b
- true to mark as using SWAboolean isDoingPOX()
void setDoingPOX(boolean b)
b
- true to mark as POXboolean isDoingGET()
void setDoingGET(boolean b)
b
- true to mark as REST/GETboolean isSOAP11()
void setResponse(boolean b)
b
- true to set this as a responseisResponse()
boolean isResponse()
void setFaultResponse(boolean b)
b
- true to mark this as a fault responseisFaultResponse()
boolean isFaultResponse()
int getTracingState()
void setTracingState(int tracingState)
tracingState
- Set whether the tracing is enabled or notStack<FaultHandler> getFaultStack()
void pushFaultHandler(FaultHandler fault)
org.apache.commons.logging.Log getServiceLog()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |