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()
           
 AxisConfiguration getAxisConfiguration()
           
 String getContextRoot()
           
 ListenerManager getListenerManager()
           
 OperationContext getOperationContext(String id)
          Gets a OperationContext given a Message ID.
 Map getOperationContextMap()
           
 File getRealPath(String path)
          Allows users to resolve the path relative to the root diretory.
 String getRESTContextPath()
           
 String getRESTPath()
           
 String getServiceContextPath()
           
 ServiceGroupContext getServiceGroupContext(String serviceGroupContextId, MessageContext msgContext)
           
 Hashtable getServiceGroupContexts()
          Gets all service groups in the system.
 long getServiceGroupContextTimoutInterval()
          This will be used to fetch the serviceGroupContextTimoutInterval from any place available.
 String getServicePath()
           
 ThreadFactory getThreadPool()
          Returns the thread factory.
 void registerOperationContext(String messageID, OperationContext mepContext)
          Registers a OperationContext with a given message ID.
 void registerServiceGroupContext(ServiceGroupContext serviceGroupContext)
           
 void setAxisConfiguration(AxisConfiguration configuration)
           
 void setContextRoot(String contextRoot)
           
 void setRESTPath(String restPath)
           
 void setServicePath(String servicePath)
           
 void setThreadPool(ThreadFactory pool)
          Sets the thread factory.
 void setTransportManager(ListenerManager listenerManager)
           
 
Methods inherited from class org.apache.axis2.context.AbstractContext
getLastTouchedTime, getParent, getProperties, getProperty, 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

finalize

protected void finalize()
                 throws Throwable
Throws:
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 -
Throws:
AxisFault

registerOperationContext

public void registerOperationContext(String messageID,
                                     OperationContext mepContext)
Registers a OperationContext with a given message ID.

Parameters:
messageID -
mepContext -

registerServiceGroupContext

public void registerServiceGroupContext(ServiceGroupContext serviceGroupContext)

addServiceGroupContextintoApplicatoionScopeTable

public void addServiceGroupContextintoApplicatoionScopeTable(ServiceGroupContext serviceGroupContext)

getAxisConfiguration

public AxisConfiguration getAxisConfiguration()

getOperationContext

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

Returns:
Returns OperationContext OperationContext

getOperationContextMap

public Map getOperationContextMap()

getRealPath

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

Parameters:
path -

getServiceGroupContext

public ServiceGroupContext getServiceGroupContext(String serviceGroupContextId,
                                                  MessageContext msgContext)

getServiceGroupContexts

public 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()

getServiceContextPath

public String getServiceContextPath()

getRESTContextPath

public String getRESTContextPath()

getServicePath

public String getServicePath()

getRESTPath

public String getRESTPath()

getContextRoot

public String getContextRoot()

setServicePath

public void setServicePath(String servicePath)

setRESTPath

public void setRESTPath(String restPath)

setContextRoot

public void setContextRoot(String contextRoot)

getServiceGroupContextTimoutInterval

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