public class Axis2MessageContext extends Object implements MessageContext
Constructor and Description |
---|
Axis2MessageContext(org.apache.axis2.context.MessageContext axisMsgCtx,
SynapseConfiguration synCfg,
SynapseEnvironment synEnv)
Constructor for the Axis2MessageContext inside Synapse
|
Modifier and Type | Method and Description |
---|---|
org.apache.axis2.context.MessageContext |
getAxis2MessageContext() |
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
|
org.apache.axiom.soap.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() |
org.apache.axis2.addressing.EndpointReference |
getFaultTo()
Get the faultTo EPR if available
|
org.apache.axis2.addressing.EndpointReference |
getFrom()
Get the from EPR if available
|
Object |
getLocalEntry(String key)
Get the value of a property set on the message instance or from the local registry
|
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
|
Map<String,Object> |
getProperties()
Get a read-only view of all the properties currently set on this
message context
|
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
|
org.apache.axis2.addressing.RelatesTo |
getRelatesTo()
Get the relatesTo of this message
|
org.apache.axis2.addressing.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
|
org.apache.axis2.addressing.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 |
isPaused() |
boolean |
isResponse()
Is this message a response to a synchronous message sent out through Synapse?
|
boolean |
isServerSide() |
boolean |
isSOAP11()
Is this message a SOAP 1.1 message?
|
void |
pushFaultHandler(FaultHandler fault) |
void |
setAxis2MessageContext(org.apache.axis2.context.MessageContext axisMsgCtx) |
void |
setConfiguration(SynapseConfiguration synCfg)
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(org.apache.axiom.soap.SOAPEnvelope envelope)
Sets the given envelope as the current SOAPEnvelope for this message
|
void |
setEnvironment(SynapseEnvironment synEnv)
Sets the SynapseEnvironment reference to this context
|
void |
setFaultResponse(boolean b)
Marks this message as a fault response
|
void |
setFaultTo(org.apache.axis2.addressing.EndpointReference reference)
Set the faultTo EPR
|
void |
setFrom(org.apache.axis2.addressing.EndpointReference reference)
Set the from EPR
|
void |
setMessageID(String string)
Set the message id
|
void |
setPaused(boolean value) |
void |
setProperty(String key,
Object value)
Set a custom (local) property with the given name on the message instance
|
void |
setRelatesTo(org.apache.axis2.addressing.RelatesTo[] reference)
Sets the relatesTo references for this message
|
void |
setReplyTo(org.apache.axis2.addressing.EndpointReference reference)
Set the replyTo EPR
|
void |
setResponse(boolean b)
Mark this message as a response or not.
|
void |
setServerSide(boolean value) |
void |
setServiceLog(org.apache.commons.logging.Log serviceLog)
Set the service log
|
void |
setSoapAction(String string)
Set the SOAPAction
|
void |
setTo(org.apache.axis2.addressing.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
|
String |
toString() |
public Axis2MessageContext(org.apache.axis2.context.MessageContext axisMsgCtx, SynapseConfiguration synCfg, SynapseEnvironment synEnv)
axisMsgCtx
- MessageContext representing the relevant Axis MCsynCfg
- SynapseConfiguraion describing SynapsesynEnv
- SynapseEnvironment describing the environment of Synapsepublic SynapseConfiguration getConfiguration()
MessageContext
getConfiguration
in interface MessageContext
public void setConfiguration(SynapseConfiguration synCfg)
MessageContext
setConfiguration
in interface MessageContext
synCfg
- The new synapse configuration instancepublic SynapseEnvironment getEnvironment()
MessageContext
getEnvironment
in interface MessageContext
public void setEnvironment(SynapseEnvironment synEnv)
MessageContext
setEnvironment
in interface MessageContext
synEnv
- the reference to the Synapse Environmentpublic Map<String,Object> getContextEntries()
MessageContext
getContextEntries
in interface MessageContext
public void setContextEntries(Map<String,Object> entries)
MessageContext
setContextEntries
in interface MessageContext
entries
- the set of local entries to be setpublic Mediator getMainSequence()
MessageContext
getMainSequence
in interface MessageContext
public Mediator getFaultSequence()
MessageContext
getFaultSequence
in interface MessageContext
public Mediator getSequence(String key)
MessageContext
getSequence
in interface MessageContext
key
- the sequence key to be looked uppublic Mediator getSequenceTemplate(String key)
MessageContext
getSequenceTemplate
in interface MessageContext
key
- the sequence key to be looked uppublic Endpoint getEndpoint(String key)
MessageContext
getEndpoint
in interface MessageContext
key
- the endpoint key to be looked uppublic Object getEntry(String key)
MessageContext
getEntry
in interface MessageContext
key
- key to look up propertypublic Object getLocalEntry(String key)
MessageContext
getLocalEntry
in interface MessageContext
key
- key to look up propertypublic Map<String,Object> getProperties()
public Object getProperty(String key)
MessageContext
getProperty
in interface MessageContext
key
- key to look up propertypublic void setProperty(String key, Object value)
MessageContext
setProperty
in interface MessageContext
key
- key to be usedvalue
- value to be savedpublic Set getPropertyKeySet()
MessageContext
getPropertyKeySet
in interface MessageContext
public org.apache.axis2.addressing.EndpointReference getFaultTo()
MessageContext
getFaultTo
in interface MessageContext
public void setFaultTo(org.apache.axis2.addressing.EndpointReference reference)
MessageContext
setFaultTo
in interface MessageContext
reference
- epr representing the FaultTo addresspublic org.apache.axis2.addressing.EndpointReference getFrom()
MessageContext
getFrom
in interface MessageContext
public void setFrom(org.apache.axis2.addressing.EndpointReference reference)
MessageContext
setFrom
in interface MessageContext
reference
- epr representing the From addresspublic org.apache.axiom.soap.SOAPEnvelope getEnvelope()
MessageContext
getEnvelope
in interface MessageContext
public void setEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope) throws org.apache.axis2.AxisFault
MessageContext
setEnvelope
in interface MessageContext
envelope
- the envelope to be setorg.apache.axis2.AxisFault
- on exceptionpublic String getMessageID()
MessageContext
getMessageID
in interface MessageContext
public void setMessageID(String string)
MessageContext
setMessageID
in interface MessageContext
string
- message id to be setpublic org.apache.axis2.addressing.RelatesTo getRelatesTo()
MessageContext
getRelatesTo
in interface MessageContext
public void setRelatesTo(org.apache.axis2.addressing.RelatesTo[] reference)
MessageContext
setRelatesTo
in interface MessageContext
reference
- the relatesTo references arraypublic org.apache.axis2.addressing.EndpointReference getReplyTo()
MessageContext
getReplyTo
in interface MessageContext
public void setReplyTo(org.apache.axis2.addressing.EndpointReference reference)
MessageContext
setReplyTo
in interface MessageContext
reference
- epr representing the ReplyTo addresspublic org.apache.axis2.addressing.EndpointReference getTo()
MessageContext
getTo
in interface MessageContext
public void setTo(org.apache.axis2.addressing.EndpointReference reference)
MessageContext
setTo
in interface MessageContext
reference
- the To EPRpublic void setWSAAction(String actionURI)
MessageContext
setWSAAction
in interface MessageContext
actionURI
- the WSAActionpublic String getWSAAction()
MessageContext
getWSAAction
in interface MessageContext
public void setWSAMessageID(String messageID)
MessageContext
setWSAMessageID
in interface MessageContext
messageID
- message id to be setpublic String getWSAMessageID()
MessageContext
getWSAMessageID
in interface MessageContext
public String getSoapAction()
MessageContext
getSoapAction
in interface MessageContext
public void setSoapAction(String string)
MessageContext
setSoapAction
in interface MessageContext
string
- the SOAP Actionpublic boolean isDoingMTOM()
MessageContext
isDoingMTOM
in interface MessageContext
public boolean isDoingSWA()
MessageContext
isDoingSWA
in interface MessageContext
public void setDoingMTOM(boolean b)
MessageContext
setDoingMTOM
in interface MessageContext
b
- true to mark as using MTOMpublic void setDoingSWA(boolean b)
MessageContext
setDoingSWA
in interface MessageContext
b
- true to mark as using SWApublic boolean isDoingPOX()
MessageContext
isDoingPOX
in interface MessageContext
public void setDoingPOX(boolean b)
MessageContext
setDoingPOX
in interface MessageContext
b
- true to mark as POXpublic boolean isDoingGET()
MessageContext
isDoingGET
in interface MessageContext
public void setDoingGET(boolean b)
MessageContext
setDoingGET
in interface MessageContext
b
- true to mark as REST/GETpublic boolean isSOAP11()
MessageContext
isSOAP11
in interface MessageContext
public void setResponse(boolean b)
MessageContext
setResponse
in interface MessageContext
b
- true to set this as a responseMessageContext.isResponse()
public boolean isResponse()
MessageContext
isResponse
in interface MessageContext
public void setFaultResponse(boolean b)
MessageContext
setFaultResponse
in interface MessageContext
b
- true to mark this as a fault responseMessageContext.isFaultResponse()
public boolean isFaultResponse()
MessageContext
isFaultResponse
in interface MessageContext
public int getTracingState()
MessageContext
getTracingState
in interface MessageContext
public void setTracingState(int tracingState)
MessageContext
setTracingState
in interface MessageContext
tracingState
- Set whether the tracing is enabled or notpublic Stack<FaultHandler> getFaultStack()
getFaultStack
in interface MessageContext
public void pushFaultHandler(FaultHandler fault)
pushFaultHandler
in interface MessageContext
public org.apache.commons.logging.Log getServiceLog()
getServiceLog
in interface MessageContext
public void setServiceLog(org.apache.commons.logging.Log serviceLog)
serviceLog
- log to be used on a per-service basispublic org.apache.axis2.context.MessageContext getAxis2MessageContext()
public void setAxis2MessageContext(org.apache.axis2.context.MessageContext axisMsgCtx)
public void setPaused(boolean value)
public boolean isPaused()
public boolean isServerSide()
public void setServerSide(boolean value)
Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.