Package org.apache.axis2.context
Class ServiceContext
java.lang.Object
org.apache.axis2.context.AbstractContext
org.apache.axis2.context.ServiceContext
- All Implemented Interfaces:
Externalizable,Serializable,SafeSerializable
Well this is never clearly defined, what it does or the life-cycle.
So do NOT use this as it might not live up to your expectation.
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.axis2.context.AbstractContext
COPY_PROPERTIES, lastTouchedTime, parent, properties -
Constructor Summary
ConstructorsConstructorDescriptionPublic constructor (only here because this class is Externalizable) -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method checks to see if additional work needs to be done in order to complete the object reconstitution.createOperationContext(QName name) createOperationContext(AxisOperation axisOp) Returns a name associated with the ServiceGroupContext associated with this ServiceContext.Get the ID associated with this object instance.To get the ERP for a given service , if the transport is present and not running then it will add as a listener to ListenerManager , there it will init that and start the listener , and finally ask the EPR from transport for a given servicegetName()Returns a name associated with this ServiceContext.booleanvoidputContextProperties(ServiceContext context, boolean doParentProperties) This will do a copy of the properties from this context object to the properties of the specified context object.voidreadExternal(ObjectInput inObject) Restore the contents of the object that was previously saved.voidsetCachingOperationContext(boolean cacheLastOperationContext) voidsetLastOperationContext(OperationContext lastOperationContext) voidsetMyEPR(EndpointReference myEPR) voidsetTargetEPR(EndpointReference targetEPR) voidSave 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
-
Field Details
-
SERVICE_OBJECT
- See Also:
-
-
Constructor Details
-
ServiceContext
public ServiceContext()Public constructor (only here because this class is Externalizable)
-
-
Method Details
-
createOperationContext
-
createOperationContext
-
getAxisService
-
getConfigurationContext
-
getServiceGroupContext
-
getMyEPR
To get the ERP for a given service , if the transport is present and not running then it will add as a listener to ListenerManager , there it will init that and start the listener , and finally ask the EPR from transport for a given service- Parameters:
transport- : Name of the transport- Returns:
- Throws:
AxisFault
-
getTargetEPR
-
setTargetEPR
-
setMyEPR
-
getLastOperationContext
-
setLastOperationContext
-
isCachingOperationContext
public boolean isCachingOperationContext() -
setCachingOperationContext
public void setCachingOperationContext(boolean cacheLastOperationContext) -
getName
Returns a name associated with this ServiceContext. Note: this name is from the corresponding AxisService object.- Returns:
- The name string, or null if no name can be found
-
getGroupName
Returns a name associated with the ServiceGroupContext associated with this ServiceContext.- Returns:
- The name string, or null if no name can be found
-
writeExternal
Save the contents of this object. NOTE: Transient fields and static fields are not saved. Also, objects that represent "static" data are not saved, except for enough information to be able to find matching objects when the message context is re-constituted.- Specified by:
writeExternalin interfaceExternalizable- Parameters:
out- The stream to write the object contents to- Throws:
IOException
-
readExternal
Restore the contents of the object that was previously saved. NOTE: The field data must read back in the same order and type as it was written. Some data will need to be validated when resurrected.- Specified by:
readExternalin interfaceExternalizable- Parameters:
in- The stream to read the object contents from- Throws:
IOExceptionClassNotFoundException
-
activate
This method checks to see if additional work needs to be done in order to complete the object reconstitution. Some parts of the object restored from the readExternal() cannot be completed until we have a configurationContext from the active engine. The configurationContext is used to help this object to plug back into the engine's configuration and deployment objects.- Parameters:
cc- The configuration context object representing the active configuration
-
putContextProperties
This will do a copy of the properties from this context object to the properties of the specified context object.- Parameters:
context- The ServiceContext object to hold the merged propertiesdoParentProperties- Indicates whether to go up the context hierachy copy the properties at each level
-
getLogCorrelationIDString
Get the ID associated with this object instance.- Returns:
- A string that can be output to a log file as an identifier for this object instance. It is suitable for matching related log entries.
-
getRootContext
- Specified by:
getRootContextin classAbstractContext
-