|
||||||||||
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.ConfigurationContext
public class ConfigurationContext
Axis2 states are held in two information models, called description hierarchy and context hierarchy. Description hierarchy hold deployment configuration and it's values does not change unless deployment configuration change occurs where Context hierarchy hold run time information. Both hierarchies consists four levels, Global, Service Group, Operation and Message. Please look at "Information Model" section of "Axis2 Architecture Guide" for more information.
Configuration Context hold Global level run-time information. This allows same configurations to be used by two Axis2 instances and most Axis2 wide configurations can changed by setting name value pairs of the configurationContext. This hold all OperationContexts, ServiceGroups, Sessions, and ListenerManager.
Field Summary | |
---|---|
protected java.util.List |
contextListeners
|
Fields inherited from class org.apache.axis2.context.AbstractContext |
---|
COPY_PROPERTIES, lastTouchedTime, parent, properties |
Constructor Summary | |
---|---|
ConfigurationContext(AxisConfiguration axisConfiguration)
Constructor |
Method Summary | |
---|---|
void |
addContextListener(ContextListener contextListener)
Register a ContextListener to be notified of all sub-context events. |
void |
addServiceGroupContextIntoApplicationScopeTable(ServiceGroupContext serviceGroupContext)
Adds the given ServiceGroupContext into the Application Scope table |
void |
addServiceGroupContextIntoSoapSessionTable(ServiceGroupContext serviceGroupContext)
Adds the given ServiceGroupContext into the SOAP session table |
void |
cleanupContexts()
Called during shutdown to clean up all Contexts |
MessageContext |
createMessageContext()
Create a MessageContext, and notify any registered ContextListener. |
ServiceGroupContext |
createServiceGroupContext(AxisServiceGroup serviceGroup)
Create a ServiceGroupContext for the specified service group, and notify any registered ContextListener. |
void |
deployService(AxisService service)
Deploy a service to the embedded AxisConfiguration, and initialize it. |
void |
fillServiceContextAndServiceGroupContext(MessageContext messageContext)
Searches for a ServiceGroupContext in the map with given id as the key. |
OperationContext |
findOperationContext(java.lang.String operationName,
java.lang.String serviceName,
java.lang.String serviceGroupName)
Finds the OperationContext given the Operation name, Service Name, and ServiceGroupName |
AxisConfiguration |
getAxisConfiguration()
Returns the AxisConfiguration |
java.lang.String |
getContextRoot()
Retrieves the ContextRoot |
ListenerManager |
getListenerManager()
Retrieve the ListenerManager |
OperationContext |
getOperationContext(java.lang.String id)
Gets a OperationContext given a Message ID. |
java.io.File |
getRealPath(java.lang.String path)
Allows users to resolve the path relative to the root directory. |
ConfigurationContext |
getRootContext()
|
java.lang.String |
getServiceContextPath()
Retrieves the ServiceContext path |
ServiceGroupContext |
getServiceGroupContext(java.lang.String serviceGroupCtxId)
Returns a ServiceGroupContext object associated with the specified ID from the internal table. |
ServiceGroupContext |
getServiceGroupContextFromSoapSessionTable(java.lang.String serviceGroupContextId,
MessageContext msgContext)
Retrieve the ServiceGroupContext from the SOAP session table |
java.lang.String[] |
getServiceGroupContextIDs()
Gets all service groups in the system. |
java.util.Hashtable |
getServiceGroupContexts()
Deprecated. Use getServiceGroupContextIDs() & getServiceGroupContext(String) |
long |
getServiceGroupContextTimoutInterval()
This will be used to fetch the serviceGroupContextTimoutInterval from any place available. |
java.lang.String |
getServicePath()
Retrieves the ServicePath |
ThreadFactory |
getThreadPool()
Returns the thread factory. |
void |
initCluster()
Initializes the ClusterManager for this ConfigurationContext |
boolean |
isAnyOperationContextRegistered()
|
boolean |
registerOperationContext(java.lang.String messageID,
OperationContext mepContext)
Registers a OperationContext with a given message ID. |
boolean |
registerOperationContext(java.lang.String messageID,
OperationContext mepContext,
boolean override)
Registers a OperationContext with a given message ID. |
void |
removeContextListener(ContextListener contextListener)
Remove an already registered ContextListener |
void |
removeServiceGroupContext(AxisServiceGroup serviceGroup)
Removes the given ServiceGroup from the ServiceGroup context |
void |
removeServiceGroupContext(java.lang.String serviceGroupContextId)
Remove a ServiceGroupContext |
void |
setAxisConfiguration(AxisConfiguration configuration)
Set the AxisConfiguration to the specified configuration |
void |
setContextRoot(java.lang.String contextRoot)
Sets the context root to the given string |
void |
setServicePath(java.lang.String servicePath)
Sets the ServicePath to the given string |
void |
setThreadPool(ThreadFactory pool)
Sets the thread factory. |
void |
setTransportManager(ListenerManager listenerManager)
Set the TransportManager to the given ListenerManager |
void |
terminate()
Invoked during shutdown to stop the ListenerManager and perform configuration cleanup |
void |
unregisterOperationContext(java.lang.String key)
Unregisters the operation context associated with the given messageID |
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 |
Field Detail |
---|
protected java.util.List contextListeners
Constructor Detail |
---|
public ConfigurationContext(AxisConfiguration axisConfiguration)
axisConfiguration
- - AxisConfiguration for which to create a contextMethod Detail |
---|
public void initCluster() throws AxisFault
AxisFault
public void addContextListener(ContextListener contextListener)
ContextListener
to be notified of all sub-context events.
contextListener
- A ContextListenerremoveContextListener(org.apache.axis2.context.ContextListener)
public void removeContextListener(ContextListener contextListener)
ContextListener
contextListener
- A ContextListeneraddContextListener(org.apache.axis2.context.ContextListener)
public void fillServiceContextAndServiceGroupContext(MessageContext messageContext) throws AxisFault
If(key != null && found) check for a service context for the intended service. if (!found) create one and hook up to ServiceGroupContext else create new ServiceGroupContext with the given key or if key is null with a new key create a new service context for the service
messageContext
- : MessageContext
AxisFault
- : If something goes wrongpublic boolean registerOperationContext(java.lang.String messageID, OperationContext mepContext)
messageID
- mepContext
- public boolean registerOperationContext(java.lang.String messageID, OperationContext mepContext, boolean override)
messageID
- mepContext
- override
- public void unregisterOperationContext(java.lang.String key)
key
- public boolean isAnyOperationContextRegistered()
public void addServiceGroupContextIntoSoapSessionTable(ServiceGroupContext serviceGroupContext)
serviceGroupContext
- ServiceGroup Context to addpublic void addServiceGroupContextIntoApplicationScopeTable(ServiceGroupContext serviceGroupContext)
serviceGroupContext
- The Service Group Context to addpublic void deployService(AxisService service) throws AxisFault
service
- service to deploy
AxisFault
- if there's a problempublic AxisConfiguration getAxisConfiguration()
public OperationContext getOperationContext(java.lang.String id)
id
-
OperationContext
public OperationContext findOperationContext(java.lang.String operationName, java.lang.String serviceName, java.lang.String serviceGroupName)
operationName
- - OperationName to findserviceName
- - ServiceName to findserviceGroupName
- - ServiceGroupName to find
OperationContext
public MessageContext createMessageContext()
public ServiceGroupContext createServiceGroupContext(AxisServiceGroup serviceGroup)
serviceGroup
- an AxisServiceGroup
public java.io.File getRealPath(java.lang.String path)
path
-
public ServiceGroupContext getServiceGroupContextFromSoapSessionTable(java.lang.String serviceGroupContextId, MessageContext msgContext) throws AxisFault
serviceGroupContextId
- Service Group Context ID to search onmsgContext
- Message Context to search on
AxisFault
- if ServiceGroupContext cannot be foundpublic ServiceGroupContext getServiceGroupContext(java.lang.String serviceGroupCtxId)
serviceGroupCtxId
- The ID string associated with the ServiceGroupContext object
public java.lang.String[] getServiceGroupContextIDs()
public java.util.Hashtable getServiceGroupContexts()
getServiceGroupContextIDs()
& getServiceGroupContext(String)
public ThreadFactory getThreadPool()
public void setAxisConfiguration(AxisConfiguration configuration)
configuration
- public void setThreadPool(ThreadFactory pool) throws AxisFault
pool
- The thread pool
AxisFault
- If a thread pool has already been setpublic void removeServiceGroupContext(java.lang.String serviceGroupContextId)
serviceGroupContextId
- The ID of the ServiceGroupContextpublic ListenerManager getListenerManager()
public void setTransportManager(ListenerManager listenerManager)
listenerManager
- The ListenerManager for which to set the TransportManagerpublic void cleanupContexts()
public void terminate() throws AxisFault
AxisFault
public java.lang.String getServiceContextPath()
public java.lang.String getServicePath()
public void setServicePath(java.lang.String servicePath)
servicePath
- The service path for which to setpublic java.lang.String getContextRoot()
public void setContextRoot(java.lang.String contextRoot)
contextRoot
- The context root for which to setpublic long getServiceGroupContextTimoutInterval()
public void removeServiceGroupContext(AxisServiceGroup serviceGroup)
serviceGroup
- public ConfigurationContext getRootContext()
getRootContext
in class AbstractContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |