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
parent, properties
 
Constructor Summary
ConfigurationContext(AxisConfiguration axisConfiguration)
           
 
Method Summary
 ServiceGroupContext fillServiceContextAndServiceGroupContext(MessageContext messageContext)
          Searches for a ServiceGroupContext in the map with given id as the key.
 AxisConfiguration getAxisConfiguration()
           
 OperationContext getOperationContext(java.lang.String messageID)
          Gets a OperationContext given a Message ID.
 java.util.Map getOperationContextMap()
           
 java.io.File getRealPath(java.lang.String path)
          Allows users to resolve the path relative to the root diretory.
 ServiceContext getServiceContext(java.lang.String serviceInstanceID)
          Gets the ServiceContext for a service id.
 ServiceGroupContext getServiceGroupContext(java.lang.String serviceGroupContextId)
           
 java.util.HashMap getServiceGroupContexts()
          Gets all service groups in the system.
 ThreadFactory getThreadPool()
          Returns the thread factory.
 void init(AxisConfiguration axisConfiguration)
          Initializes the Configuration Context
 void registerOperationContext(java.lang.String messageID, OperationContext mepContext)
          Registers a OperationContext with a given message ID.
 void registerServiceContext(java.lang.String serviceInstanceID, ServiceContext serviceContext)
          Registers a ServiceContext with a given service ID.
 void registerServiceGroupContext(ServiceGroupContext serviceGroupContext)
           
 void removeService(javax.xml.namespace.QName name)
           
 void setAxisConfiguration(AxisConfiguration configuration)
           
 void setRootDir(java.io.File file)
           
 void setThreadPool(ThreadFactory pool)
          Sets the thread factory.
 
Methods inherited from class org.apache.axis2.context.AbstractContext
getParent, getProperties, getProperty, setParent, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationContext

public ConfigurationContext(AxisConfiguration axisConfiguration)
Method Detail

removeService

public void removeService(javax.xml.namespace.QName name)

init

public void init(AxisConfiguration axisConfiguration)
          throws AxisFault
Initializes the Configuration Context

Specified by:
init in class AbstractContext
Parameters:
axisConfiguration -
Throws:
AxisFault

getAxisConfiguration

public AxisConfiguration getAxisConfiguration()

setAxisConfiguration

public void setAxisConfiguration(AxisConfiguration configuration)
Parameters:
configuration -

registerOperationContext

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

Parameters:
messageID -
mepContext -

getOperationContext

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

Parameters:
messageID -
Returns:
Returns OperationContext OperationContext

getOperationContextMap

public java.util.Map getOperationContextMap()

registerServiceContext

public void registerServiceContext(java.lang.String serviceInstanceID,
                                   ServiceContext serviceContext)
Registers a ServiceContext with a given service ID.


getServiceContext

public ServiceContext getServiceContext(java.lang.String serviceInstanceID)
Gets the ServiceContext for a service id.

Parameters:
serviceInstanceID -

getThreadPool

public ThreadFactory getThreadPool()
Returns the thread factory.

Returns:
Returns configuration specific thread pool

setThreadPool

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

Parameters:
pool -
Throws:
AxisFault

getRealPath

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

Parameters:
path -

setRootDir

public void setRootDir(java.io.File file)
Parameters:
file -

fillServiceContextAndServiceGroupContext

public ServiceGroupContext 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

registerServiceGroupContext

public void registerServiceGroupContext(ServiceGroupContext serviceGroupContext)

getServiceGroupContext

public ServiceGroupContext getServiceGroupContext(java.lang.String serviceGroupContextId)

getServiceGroupContexts

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

Returns:
Returns hashmap of ServiceGroupContexts.