org.apache.axis2.context
Class ConfigurationContext

java.lang.Object
  extended byorg.apache.axis2.context.AbstractContext
      extended byorg.apache.axis2.context.ConfigurationContext

public class ConfigurationContext
extends AbstractContext

This contains all the configuration information for Axis2.


Field Summary
 
Fields inherited from class org.apache.axis2.context.AbstractContext
COPY_PROPERTIES, lastTouchedTime, parent, properties
 
Constructor Summary
ConfigurationContext(AxisConfiguration axisConfiguration)
           
 
Method Summary
 void addServiceGroupContextintoApplicatoionScopeTable(ServiceGroupContext serviceGroupContext)
           
 void cleanupContexts()
           
 void fillServiceContextAndServiceGroupContext(MessageContext messageContext)
          Searches for a ServiceGroupContext in the map with given id as the key.
protected  void finalize()
           
 OperationContext findOperationContext(java.lang.String operationName, java.lang.String serviceName, java.lang.String serviceGroupName)
           
 AxisConfiguration getAxisConfiguration()
           
 java.lang.String getContextRoot()
           
 ListenerManager getListenerManager()
           
 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 diretory.
 ConfigurationContext getRootContext()
           
 java.lang.String getServiceContextPath()
           
 ServiceGroupContext getServiceGroupContext(java.lang.String Id)
          Returns a ServiceGroupContext object associated with the specified ID from the internal table.
 ServiceGroupContext getServiceGroupContextFromSoapSessionTable(java.lang.String serviceGroupContextId, MessageContext msgContext)
           
 java.util.Hashtable getServiceGroupContexts()
          Gets all service groups in the system.
 long getServiceGroupContextTimoutInterval()
          This will be used to fetch the serviceGroupContextTimoutInterval from any place available.
 java.lang.String getServicePath()
           
 ThreadFactory getThreadPool()
          Returns the thread factory.
 void initCluster()
           
 boolean registerOperationContext(java.lang.String messageID, OperationContext mepContext)
          Registers a OperationContext with a given message ID.
 void registerServiceGroupContextintoSoapSessionTable(ServiceGroupContext serviceGroupContext)
           
 void removeServiceGroupContext(AxisServiceGroup serviceGroup)
           
 void setAxisConfiguration(AxisConfiguration configuration)
           
 void setContextRoot(java.lang.String contextRoot)
           
 void setServicePath(java.lang.String servicePath)
           
 void setThreadPool(ThreadFactory pool)
          Sets the thread factory.
 void setTransportManager(ListenerManager listenerManager)
           
 void terminate()
           
 void unregisterOperationContext(java.lang.String key)
          Unregisters the operation context associated with the given messageID
 
Methods inherited from class org.apache.axis2.context.AbstractContext
flush, getLastTouchedTime, getParent, getProperties, getProperty, mergeProperties, setLastTouchedTime, setParent, setProperties, setProperty, touch
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationContext

public ConfigurationContext(AxisConfiguration axisConfiguration)
Method Detail

initCluster

public void initCluster()
                 throws AxisFault
Throws:
AxisFault

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

fillServiceContextAndServiceGroupContext

public void fillServiceContextAndServiceGroupContext(MessageContext messageContext)
                                              throws AxisFault
Searches for a ServiceGroupContext in the map with given id as the key.
 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
 

Parameters:
messageContext - : MessageContext
Throws:
AxisFault - : If something goes wrong

registerOperationContext

public boolean registerOperationContext(java.lang.String messageID,
                                        OperationContext mepContext)
Registers a OperationContext with a given message ID. If the given message id already has a registered operation context, no change is made and the methid resturns false.

Parameters:
messageID -
mepContext -

unregisterOperationContext

public void unregisterOperationContext(java.lang.String key)
Unregisters the operation context associated with the given messageID

Parameters:
key -

registerServiceGroupContextintoSoapSessionTable

public void registerServiceGroupContextintoSoapSessionTable(ServiceGroupContext serviceGroupContext)

addServiceGroupContextintoApplicatoionScopeTable

public void addServiceGroupContextintoApplicatoionScopeTable(ServiceGroupContext serviceGroupContext)

getAxisConfiguration

public AxisConfiguration getAxisConfiguration()

getOperationContext

public OperationContext getOperationContext(java.lang.String id)
Gets a OperationContext given a Message ID.

Returns:
Returns OperationContext OperationContext

findOperationContext

public OperationContext findOperationContext(java.lang.String operationName,
                                             java.lang.String serviceName,
                                             java.lang.String serviceGroupName)

getRealPath

public java.io.File getRealPath(java.lang.String path)
Allows users to resolve the path relative to the root diretory.

Parameters:
path -

getServiceGroupContextFromSoapSessionTable

public ServiceGroupContext getServiceGroupContextFromSoapSessionTable(java.lang.String serviceGroupContextId,
                                                                      MessageContext msgContext)

getServiceGroupContext

public ServiceGroupContext getServiceGroupContext(java.lang.String Id)
Returns a ServiceGroupContext object associated with the specified ID from the internal table.

Parameters:
Id - The ID string associated with the ServiceGroupContext object
Returns:
The ServiceGroupContext object, or null if not found

getServiceGroupContexts

public java.util.Hashtable getServiceGroupContexts()
Gets all service groups in the system.

Returns:
Returns hashmap of ServiceGroupContexts.

getThreadPool

public ThreadFactory getThreadPool()
Returns the thread factory.

Returns:
Returns configuration specific thread pool

setAxisConfiguration

public void setAxisConfiguration(AxisConfiguration configuration)
Parameters:
configuration -

setThreadPool

public void setThreadPool(ThreadFactory pool)
                   throws AxisFault
Sets the thread factory.

Parameters:
pool -
Throws:
AxisFault

getListenerManager

public ListenerManager getListenerManager()

setTransportManager

public void setTransportManager(ListenerManager listenerManager)

cleanupContexts

public void cleanupContexts()

terminate

public void terminate()
               throws AxisFault
Throws:
AxisFault

getServiceContextPath

public java.lang.String getServiceContextPath()

getServicePath

public java.lang.String getServicePath()

setServicePath

public void setServicePath(java.lang.String servicePath)

getContextRoot

public java.lang.String getContextRoot()

setContextRoot

public void setContextRoot(java.lang.String contextRoot)

getServiceGroupContextTimoutInterval

public long getServiceGroupContextTimoutInterval()
This will be used to fetch the serviceGroupContextTimoutInterval from any place available.

Returns:
long

removeServiceGroupContext

public void removeServiceGroupContext(AxisServiceGroup serviceGroup)

getRootContext

public ConfigurationContext getRootContext()
Specified by:
getRootContext in class AbstractContext


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.