|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axis2.context.AbstractContext
org.apache.axis2.context.MessageContext
MessageContext holds service specific state information.
Field Summary | |
org.apache.axiom.attachments.Attachments |
attachments
message attachments NOTE: Serialization of message attachments is handled as part of the overall message serialization. |
static java.lang.String |
CHARACTER_SET_ENCODING
Field CHARACTER_SET_ENCODING |
static java.lang.ThreadLocal |
currentMessageContext
A place to store the current MessageContext |
static java.lang.String |
DEFAULT_CHAR_SET_ENCODING
Field DEFAULT_CHAR_SET_ENCODING. |
static java.lang.String |
DISABLE_ASYNC_CALLBACK_ON_TRANSPORT_ERROR
This property allows someone (e.g. |
int |
FLOW
|
static int |
IN_FAULT_FLOW
|
static int |
IN_FLOW
|
protected Options |
options
|
static int |
OUT_FAULT_FLOW
|
static int |
OUT_FLOW
|
boolean |
outputWritten
|
static java.lang.String |
REMOTE_ADDR
|
static java.lang.String |
TRANSPORT_ADDR
|
static java.lang.String |
TRANSPORT_HEADERS
|
static java.lang.String |
TRANSPORT_IN
Field TRANSPORT_IN |
static java.lang.String |
TRANSPORT_NON_BLOCKING
To invoke fireAndforget method we have to hand over transport sending logic to a thread other wise user has to wait till it get transport response (in the case of HTTP its HTTP 202) |
static java.lang.String |
TRANSPORT_OUT
Field TRANSPORT_OUT |
static java.lang.String |
TRANSPORT_SUCCEED
Field TRANSPORT_SUCCEED |
static java.lang.String |
UTF_16
Field UTF_16. |
static java.lang.String |
UTF_8
Field UTF_8. |
Fields inherited from class org.apache.axis2.context.AbstractContext |
COPY_PROPERTIES, lastTouchedTime, parent, properties |
Constructor Summary | |
MessageContext()
Constructor |
Method Summary | |
void |
activate(ConfigurationContext cc)
This method checks to see if additional work needs to be done in order to complete the object reconstitution. |
void |
activateWithOperationContext(OperationContext operationCtx)
This method checks to see if additional work needs to be done in order to complete the object reconstitution. |
java.lang.String |
addAttachment(javax.activation.DataHandler dataHandler)
Adds an attachment to the attachment Map of this message context. |
void |
addAttachment(java.lang.String contentID,
javax.activation.DataHandler dataHandler)
Adds an attachment to the attachment Map of this message context. |
void |
addInboundExecutedPhase(Handler phase)
Add a Phase to the collection of executed phases for the inbound path. |
void |
addOutboundExecutedPhase(Handler phase)
Add a Phase to the collection of executed phases for the outbound path. |
void |
addRelatesTo(RelatesTo reference)
|
boolean |
containsSelfManagedDataKey(java.lang.Class clazz,
java.lang.Object key)
Check to see if the key for the self managed data is available |
MessageContext |
extractCopyMessageContext()
Return a Read-Only copy of this message context that has been extracted from the object hierachy. |
javax.activation.DataHandler |
getAttachment(java.lang.String contentID)
Access the DataHandler of the attachment contained in the map corresponding to the given content ID. |
org.apache.axiom.attachments.Attachments |
getAttachmentMap()
You can directly access the attachment map of the message context from here. |
AxisMessage |
getAxisMessage()
|
AxisOperation |
getAxisOperation()
|
AxisService |
getAxisService()
|
AxisServiceGroup |
getAxisServiceGroup()
|
ConfigurationContext |
getConfigurationContext()
|
int |
getCurrentHandlerIndex()
|
static MessageContext |
getCurrentMessageContext()
|
int |
getCurrentPhaseIndex()
|
org.apache.neethi.Policy |
getEffectivePolicy()
|
org.apache.axiom.soap.SOAPEnvelope |
getEnvelope()
|
java.util.ArrayList |
getExecutionChain()
|
EndpointReference |
getFaultTo()
|
int |
getFLOW()
|
EndpointReference |
getFrom()
|
java.util.Iterator |
getInboundExecutedPhases()
Get an iterator over the inbound executed phase list. |
java.lang.String |
getIncomingTransportName()
|
java.lang.String |
getLogCorrelationID()
Get a "raw" version of the logCorrelationID. |
java.lang.String |
getLogIDString()
Get a formatted version of the logCorrelationID. |
java.lang.String |
getMessageID()
|
Parameter |
getModuleParameter(java.lang.String key,
java.lang.String moduleName,
HandlerDescription handler)
Retrieves both module specific configuration parameters as well as other parameters. |
OperationContext |
getOperationContext()
|
Options |
getOptions()
|
java.util.Iterator |
getOutboundExecutedPhases()
Get an iterator over the outbound executed phase list. |
Parameter |
getParameter(java.lang.String key)
Retrieves configuration descriptor parameters at any level. |
java.util.Map |
getProperties()
Retrieves all property values. |
java.lang.Object |
getProperty(java.lang.String name)
Retrieves a property value. |
RelatesTo |
getRelatesTo()
|
RelatesTo |
getRelatesTo(java.lang.String type)
|
RelatesTo[] |
getRelationships()
|
EndpointReference |
getReplyTo()
|
ConfigurationContext |
getRootContext()
|
java.lang.Object |
getSelfManagedData(java.lang.Class clazz,
java.lang.Object key)
Retrieve a value of self managed data previously saved with the specified key. |
ServiceContext |
getServiceContext()
|
java.lang.String |
getServiceContextID()
|
ServiceGroupContext |
getServiceGroupContext()
|
java.lang.String |
getServiceGroupContextId()
|
SessionContext |
getSessionContext()
|
java.lang.String |
getSoapAction()
|
EndpointReference |
getTo()
|
TransportInDescription |
getTransportIn()
|
TransportOutDescription |
getTransportOut()
|
java.lang.String |
getWSAAction()
|
boolean |
isDoingMTOM()
|
boolean |
isDoingREST()
|
boolean |
isDoingSwA()
|
boolean |
isEngaged(java.lang.String moduleName)
|
boolean |
isHeaderPresent()
Deprecated. The bonus you used to get from this is now built in to SOAPEnvelope.getHeader() |
boolean |
isNewThreadRequired()
|
boolean |
isOutputWritten()
|
boolean |
isPaused()
|
boolean |
isProcessingFault()
|
boolean |
isResponseWritten()
|
boolean |
isServerSide()
|
boolean |
isSOAP11()
|
void |
pause()
Pause the execution of the current handler chain |
void |
readExternal(java.io.ObjectInput in)
Restore the contents of the MessageContext that was previously saved. |
void |
removeAttachment(java.lang.String contentID)
Removes the attachment with the given content ID from the Attachments Map Do nothing if a attachment cannot be found by the given content ID. |
void |
removeFirstInboundExecutedPhase()
Remove the first Phase in the collection of executed phases for the inbound path. |
void |
removeFirstOutboundExecutedPhase()
Remove the first Phase in the collection of executed phases for the outbound path. |
void |
removeSelfManagedData(java.lang.Class clazz,
java.lang.Object key)
Removes the mapping of the specified key if the specified key has been set for self managed data |
void |
resetInboundExecutedPhases()
Reset the list of executed inbound phases. |
void |
resetOutboundExecutedPhases()
Reset the list of executed outbound phases. |
void |
setAttachmentMap(org.apache.axiom.attachments.Attachments attachments)
Setting of the attachments map should be performed at the receipt of a message only. |
void |
setAxisMessage(AxisMessage axisMessage)
|
void |
setAxisOperation(AxisOperation axisOperation)
|
void |
setAxisService(AxisService axisService)
|
void |
setAxisServiceGroup(AxisServiceGroup axisServiceGroup)
|
void |
setConfigurationContext(ConfigurationContext context)
|
void |
setCurrentHandlerIndex(int currentHandlerIndex)
|
static void |
setCurrentMessageContext(MessageContext ctx)
|
void |
setCurrentPhaseIndex(int currentPhaseIndex)
|
void |
setDoingMTOM(boolean b)
|
void |
setDoingREST(boolean b)
|
void |
setDoingSwA(boolean b)
|
void |
setEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope)
|
void |
setExecutionChain(java.util.ArrayList executionChain)
Set the execution chain of Handler in this MessageContext. |
void |
setFaultTo(EndpointReference reference)
|
void |
setFLOW(int FLOW)
|
void |
setFrom(EndpointReference reference)
|
void |
setInboundExecutedPhasesExplicit(java.util.LinkedList inb)
|
void |
setIncomingTransportName(java.lang.String incomingTransportName)
|
void |
setIsSOAP11Explicit(boolean t)
|
void |
setMessageID(java.lang.String messageId)
|
void |
setNewThreadRequired(boolean b)
|
void |
setOperationContext(OperationContext context)
|
void |
setOptions(Options options)
Set the options for myself. |
void |
setOptionsExplicit(Options op)
|
void |
setOutboundExecutedPhasesExplicit(java.util.LinkedList outb)
|
void |
setOutputWritten(boolean b)
|
void |
setPaused(boolean paused)
|
void |
setProcessingFault(boolean b)
|
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set a property for this message context. |
void |
setRelationships(RelatesTo[] list)
|
void |
setReplyTo(EndpointReference referance)
|
void |
setResponseWritten(boolean b)
|
void |
setSelfManagedData(java.lang.Class clazz,
java.lang.Object key,
java.lang.Object value)
Add a key-value pair of self managed data to the set associated with this message context. |
void |
setSelfManagedDataMapExplicit(java.util.LinkedHashMap map)
|
void |
setServerSide(boolean b)
|
void |
setServiceContext(ServiceContext context)
|
void |
setServiceContextID(java.lang.String serviceContextID)
Sets the service context id. |
void |
setServiceGroupContext(ServiceGroupContext serviceGroupContext)
|
void |
setServiceGroupContextId(java.lang.String serviceGroupContextId)
|
void |
setSessionContext(SessionContext sessionContext)
|
void |
setSoapAction(java.lang.String soapAction)
|
void |
setTo(EndpointReference to)
|
void |
setTransportIn(TransportInDescription in)
|
void |
setTransportOut(TransportOutDescription out)
|
void |
setWSAAction(java.lang.String actionURI)
setWSAAction |
void |
setWSAMessageId(java.lang.String messageID)
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
Save the contents of this MessageContext instance. |
Methods inherited from class org.apache.axis2.context.AbstractContext |
flush, getLastTouchedTime, getParent, mergeProperties, setLastTouchedTime, setParent, setProperties, touch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static java.lang.ThreadLocal currentMessageContext
protected Options options
public static final int IN_FLOW
public static final int IN_FAULT_FLOW
public static final int OUT_FLOW
public static final int OUT_FAULT_FLOW
public static final java.lang.String REMOTE_ADDR
public static final java.lang.String TRANSPORT_ADDR
public static final java.lang.String TRANSPORT_HEADERS
public transient org.apache.axiom.attachments.Attachments attachments
public static final java.lang.String TRANSPORT_OUT
public static final java.lang.String TRANSPORT_IN
public static final java.lang.String CHARACTER_SET_ENCODING
public static final java.lang.String UTF_8
public static final java.lang.String UTF_16
public static final java.lang.String TRANSPORT_SUCCEED
public static final java.lang.String DEFAULT_CHAR_SET_ENCODING
public int FLOW
public static final java.lang.String TRANSPORT_NON_BLOCKING
public static final java.lang.String DISABLE_ASYNC_CALLBACK_ON_TRANSPORT_ERROR
public boolean outputWritten
Constructor Detail |
public MessageContext()
Method Detail |
public static MessageContext getCurrentMessageContext()
public static void setCurrentMessageContext(MessageContext ctx)
public java.lang.String toString()
public java.lang.String getLogCorrelationID()
public java.lang.String getLogIDString()
public void pause()
public AxisOperation getAxisOperation()
public AxisService getAxisService()
public AxisServiceGroup getAxisServiceGroup()
public ConfigurationContext getConfigurationContext()
public int getCurrentHandlerIndex()
public int getCurrentPhaseIndex()
public org.apache.axiom.soap.SOAPEnvelope getEnvelope()
public java.util.ArrayList getExecutionChain()
public void addInboundExecutedPhase(Handler phase)
phase
- The phase to add to the list.public void removeFirstInboundExecutedPhase()
public java.util.Iterator getInboundExecutedPhases()
public void resetInboundExecutedPhases()
public void addOutboundExecutedPhase(Handler phase)
phase
- The phase to add to the list.public void removeFirstOutboundExecutedPhase()
public java.util.Iterator getOutboundExecutedPhases()
public void resetOutboundExecutedPhases()
public EndpointReference getFaultTo()
public EndpointReference getFrom()
public java.lang.String getMessageID()
public Parameter getModuleParameter(java.lang.String key, java.lang.String moduleName, HandlerDescription handler)
key
- :
Parameter NamemoduleName
- :
Name of the modulehandler
- HandlerDescription
Parameter
public OperationContext getOperationContext()
public Parameter getParameter(java.lang.String key)
key
-
Parameter
public void setProperty(java.lang.String name, java.lang.Object value)
setProperty
in class AbstractContext
name
- name of the propertyvalue
- the value to setpublic java.lang.Object getProperty(java.lang.String name)
getProperty
in class AbstractContext
name
- name of the property to search for
public java.util.Map getProperties()
setProperty(String,Object)
. In addition,
any changes to the properties are not reflected on this map.
getProperties
in class AbstractContext
public RelatesTo[] getRelationships()
public RelatesTo getRelatesTo(java.lang.String type)
public RelatesTo getRelatesTo()
public EndpointReference getReplyTo()
public ServiceContext getServiceContext()
public java.lang.String getServiceContextID()
public ServiceGroupContext getServiceGroupContext()
public java.lang.String getServiceGroupContextId()
public SessionContext getSessionContext()
public void setSessionContext(SessionContext sessionContext)
public java.lang.String getSoapAction()
public EndpointReference getTo()
public TransportInDescription getTransportIn()
public TransportOutDescription getTransportOut()
public java.lang.String getWSAAction()
public boolean isDoingMTOM()
public boolean isDoingREST()
public boolean isDoingSwA()
public boolean isNewThreadRequired()
public boolean isOutputWritten()
public boolean isPaused()
public void setPaused(boolean paused)
public boolean isProcessingFault()
public boolean isResponseWritten()
public boolean isSOAP11()
public boolean isServerSide()
public AxisMessage getAxisMessage()
public void setAxisMessage(AxisMessage axisMessage)
public void setAxisOperation(AxisOperation axisOperation)
public void setAxisService(AxisService axisService)
public void setAxisServiceGroup(AxisServiceGroup axisServiceGroup)
public void setConfigurationContext(ConfigurationContext context)
context
- public void setCurrentHandlerIndex(int currentHandlerIndex)
public void setCurrentPhaseIndex(int currentPhaseIndex)
public void setDoingMTOM(boolean b)
b
- public void setDoingREST(boolean b)
b
- public void setDoingSwA(boolean b)
b
- public void setEnvelope(org.apache.axiom.soap.SOAPEnvelope envelope) throws AxisFault
envelope
-
AxisFault
public void setExecutionChain(java.util.ArrayList executionChain)
executionChain
- public void setFaultTo(EndpointReference reference)
reference
- public void setFrom(EndpointReference reference)
reference
- public void setMessageID(java.lang.String messageId)
messageId
- public void setNewThreadRequired(boolean b)
b
- public void setOperationContext(OperationContext context)
context
- The OperationContextpublic void setOutputWritten(boolean b)
b
- public void setProcessingFault(boolean b)
b
- public void addRelatesTo(RelatesTo reference)
reference
- public void setReplyTo(EndpointReference referance)
referance
- public void setResponseWritten(boolean b)
b
- public void setServerSide(boolean b)
b
- public void setServiceContext(ServiceContext context)
context
- public void setServiceContextID(java.lang.String serviceContextID)
serviceContextID
- public void setServiceGroupContext(ServiceGroupContext serviceGroupContext)
public void setServiceGroupContextId(java.lang.String serviceGroupContextId)
public void setSoapAction(java.lang.String soapAction)
soapAction
- public void setTo(EndpointReference to)
to
- public void setTransportIn(TransportInDescription in)
in
- public void setTransportOut(TransportOutDescription out)
out
- public void setWSAAction(java.lang.String actionURI)
public void setWSAMessageId(java.lang.String messageID)
public int getFLOW()
public void setFLOW(int FLOW)
public Options getOptions()
public void setOptions(Options options)
options
- the options to setpublic java.lang.String getIncomingTransportName()
public void setIncomingTransportName(java.lang.String incomingTransportName)
public void setRelationships(RelatesTo[] list)
public org.apache.neethi.Policy getEffectivePolicy()
public boolean isEngaged(java.lang.String moduleName)
public boolean isHeaderPresent()
public void setAttachmentMap(org.apache.axiom.attachments.Attachments attachments)
attachments
- public org.apache.axiom.attachments.Attachments getAttachmentMap()
public void addAttachment(java.lang.String contentID, javax.activation.DataHandler dataHandler)
contentID
- :
will be the content ID of the MIME partdataHandler
- public java.lang.String addAttachment(javax.activation.DataHandler dataHandler)
dataHandler
-
public javax.activation.DataHandler getAttachment(java.lang.String contentID)
contentID
- :
Content ID of the MIME attachment
public void removeAttachment(java.lang.String contentID)
contentID
- of the attachmentpublic void setSelfManagedData(java.lang.Class clazz, java.lang.Object key, java.lang.Object value)
clazz
- The class of the caller that owns the key-value pairkey
- The key for this data objectvalue
- The data objectpublic java.lang.Object getSelfManagedData(java.lang.Class clazz, java.lang.Object key)
clazz
- The class of the caller that owns the key-value pairkey
- The key for the data
public boolean containsSelfManagedDataKey(java.lang.Class clazz, java.lang.Object key)
clazz
- The class of the caller that owns the key-value pairkey
- The key to look for
public void removeSelfManagedData(java.lang.Class clazz, java.lang.Object key)
clazz
- The class of the caller that owns the key-value pairkey
- The key of the object to be removedpublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The stream to write the object contents to
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The stream to read the object contents from
java.io.IOException
java.lang.ClassNotFoundException
public void activate(ConfigurationContext cc)
cc
- The configuration context object representing the active configurationpublic void activateWithOperationContext(OperationContext operationCtx)
operationCtx
- The operation context object that is a member of the active object graphpublic MessageContext extractCopyMessageContext()
public void setIsSOAP11Explicit(boolean t)
public void setInboundExecutedPhasesExplicit(java.util.LinkedList inb)
public void setOutboundExecutedPhasesExplicit(java.util.LinkedList outb)
public void setSelfManagedDataMapExplicit(java.util.LinkedHashMap map)
public void setOptionsExplicit(Options op)
public ConfigurationContext getRootContext()
getRootContext
in class AbstractContext
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |