|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis2.context.AbstractContext org.apache.axis2.context.OperationContext
public class OperationContext
An OperationContext represents a running "instance" of an operation, which is represented by an AxisOperation object. This concept is needed to allow messages to be grouped into operations as in WSDL 2.0-speak operations are essentially arbitrary message exchange patterns. So as messages are being exchanged the OperationContext remembers the state of where in the message exchange pattern it is in.
The base implementation of OperationContext supports MEPs which have one input message and/or one output message. That is, it supports the all the MEPs that are in the WSDL 2.0 specification. In order to support another MEP one must extend this class and register its creation in the OperationContexFactory.
Field Summary |
---|
Fields inherited from class org.apache.axis2.context.AbstractContext |
---|
COPY_PROPERTIES, lastTouchedTime, parent, properties |
Constructor Summary | |
---|---|
OperationContext()
Simple constructor (needed for deserialization, shouldn't be used otherwise!) |
|
OperationContext(AxisOperation axisOperation,
ServiceContext serviceContext)
Constructs a new OperationContext. |
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 |
addMessageContext(MessageContext msgContext)
When a new message is added to the MEPContext the logic
should be included remove the MEPContext from the table in the
EngineContext . |
void |
cleanup()
Removes the pointers to this OperationContext in the
ConfigurationContext 's OperationContextMap so that this
OperationContext will eventually get garbage collected
along with the MessageContext 's it contains. |
AxisOperation |
getAxisOperation()
|
ConfigurationContext |
getConfigurationContext()
Returns the EngineContext in which the parent ServiceContext lives. |
java.lang.String |
getLogCorrelationIDString()
Get the ID associated with this object instance. |
MessageContext |
getMessageContext(java.lang.String messageLabel)
|
java.util.HashMap |
getMessageContexts()
|
java.lang.String |
getOperationName()
Get the name associated with the operation. |
ConfigurationContext |
getRootContext()
|
ServiceContext |
getServiceContext()
Returns the ServiceContext in which this OperationContext lives. |
java.lang.String |
getServiceGroupName()
Get the name associated with the service group. |
java.lang.String |
getServiceName()
Get the name associated with the service. |
boolean |
isComplete()
Checks to see if the MEP is complete. |
boolean |
isEquivalent(OperationContext ctx)
Compares key parts of the state from the current instance of this class with the specified instance to see if they are equivalent. |
void |
isolateMessageContext(MessageContext mc)
Isolate the specified message context object to prepare for serialization. |
void |
readExternal(java.io.ObjectInput inObject)
Restore the contents of the object that was previously saved. |
void |
removeMessageContext(java.lang.String label)
Remove the indicated message context. |
void |
restoreMessageContext(MessageContext msg)
Restore the specified MessageContext object in the table used to hold the message contexts associated with this operation. |
void |
setComplete(boolean complete)
|
void |
setKey(java.lang.String key)
|
void |
writeExternal(java.io.ObjectOutput o)
Save the contents of this object. |
Methods inherited from class org.apache.axis2.context.AbstractContext |
---|
clearPropertyDifferences, flush, getLastTouchedTime, getLocalProperty, getParent, getProperties, getProperty, getPropertyDifferences, getPropertyNames, getPropertyNonReplicable, isAncestor, mergeProperties, removeProperty, removePropertyNonReplicable, setLastTouchedTime, setNonReplicableProperty, setParent, setProperties, setProperty, touch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OperationContext()
public OperationContext(AxisOperation axisOperation, ServiceContext serviceContext)
axisOperation
- the AxisOperation whose running instances' state this
OperationContext represents.serviceContext
- the parent ServiceContext representing any state related to
the set of all operations of the service.Method Detail |
---|
public void addMessageContext(MessageContext msgContext) throws AxisFault
MEPContext
the logic
should be included remove the MEPContext from the table in the
EngineContext
. Example: IN_IN_OUT At the second IN
message the MEPContext should be removed from the AxisOperation.
msgContext
-
AxisFault
public void cleanup()
OperationContext
in the
ConfigurationContext
's OperationContextMap so that this
OperationContext
will eventually get garbage collected
along with the MessageContext
's it contains. Note that if
the caller wants to make sure its safe to clean up this OperationContext
he should call isComplete() first. However, in cases like IN_OPTIONAL_OUT
and OUT_OPTIONAL_IN, it is possibe this will get called without the MEP
being complete due to the optional nature of the MEP.
public AxisOperation getAxisOperation()
public ConfigurationContext getConfigurationContext()
public MessageContext getMessageContext(java.lang.String messageLabel) throws AxisFault
messageLabel
-
AxisFault
public void removeMessageContext(java.lang.String label) throws AxisFault
label
-
AxisFault
public java.util.HashMap getMessageContexts()
public ServiceContext getServiceContext()
public boolean isComplete()
public void setComplete(boolean complete)
public void setKey(java.lang.String key)
public void writeExternal(java.io.ObjectOutput o) 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 inObject) 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 isolateMessageContext(MessageContext mc)
mc
- The message context objectpublic void restoreMessageContext(MessageContext msg)
msg
- The message context objectpublic java.lang.String getOperationName()
public java.lang.String getServiceName()
public java.lang.String getServiceGroupName()
public boolean isEquivalent(OperationContext ctx)
ctx
- The object to compare with
public java.lang.String getLogCorrelationIDString()
public ConfigurationContext getRootContext()
getRootContext
in class AbstractContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |