org.apache.axis2.engine
Class AxisConfiguration

java.lang.Object
  extended byorg.apache.axis2.description.AxisDescription
      extended byorg.apache.axis2.engine.AxisConfiguration
All Implemented Interfaces:
DescriptionConstants, ParameterInclude

public class AxisConfiguration
extends AxisDescription

Class AxisConfiguration


Field Summary
protected  PhasesInfo phasesinfo
           
 
Fields inherited from interface org.apache.axis2.description.DescriptionConstants
CLASSLOADER_KEY, CONTEXTPATH_KEY, EXECUTION_CHAIN_KEY, EXECUTION_FAULT_CHAIN_KEY, EXECUTION_OUT_CHAIN_KEY, IN_FAULTFLOW_KEY, INFLOW_KEY, MESSAGE_RECEIVER_KEY, MODULEREF_KEY, OPERATION_KEY, OUT_FAULTFLOW_KEY, OUTFLOW_KEY, PARAMETER_KEY, PHASES_KEY, SERVICE_CLASS_NAME, STYLE_KEY
 
Constructor Summary
AxisConfiguration()
          Constructor AxisConfigurationImpl.
 
Method Summary
 void addDataLocator(java.lang.String dialect, AxisDataLocator dataLocator)
          For internal used only! To store instance of DataLocator when it is first loaded.
 void addDataLocatorClassNames(java.lang.String dialect, java.lang.String classname)
          Allows to define/configure Data Locator for specified dialect at Axis 2 Configuration.
 void addDefaultModuleVersion(java.lang.String moduleName, java.lang.String moduleVersion)
          Adds a default module version, which can be done either programmatically or by using axis2.xml.
 void addLocalPolicyAssertion(javax.xml.namespace.QName name)
           
 void addMessageBuilder(java.lang.String contentType, Builder messageBuilder)
          Register a messageBuilder implementation against a content type.
 void addMessageFormatter(java.lang.String contentType, MessageFormatter messageFormatter)
          Register a messageFormatter implementation against a content type.
 void addMessageReceiver(java.lang.String mepURL, MessageReceiver messageReceiver)
           
 void addModule(AxisModule module)
          Method addModule.
 void addModuleConfig(ModuleConfiguration moduleConfiguration)
          Adds module configuration, if there is a moduleConfig tag in service.
 void addObservers(AxisObserver axisObserver)
           
 void addService(AxisService service)
          Method addService.
 void addServiceGroup(AxisServiceGroup axisServiceGroup)
           
 void addTargetResolver(TargetResolver tr)
           
 void addToAllServicesMap(java.lang.String serviceName, AxisService axisService)
           
 void addTransportIn(TransportInDescription transport)
          Method addTransportIn.
 void addTransportOut(TransportOutDescription transport)
          Method addTransportOut.
 void disengageModule(AxisModule module)
          To dis-engage a module from the system.
 void engageModule(AxisModule axisModule, AxisConfiguration axisConfig)
          Engaging a module to different level
 void engageModule(javax.xml.namespace.QName moduleref)
          Deprecated. Please use the String version instead
 void engageModule(java.lang.String moduleref)
          Engages the default module version corresponding to given module name , or if the module name contains version number in it then it will engage the correct module.
 void engageModule(java.lang.String moduleName, java.lang.String versionID)
          Engages a module using given name and its version ID.
 ClusterManager getClusterManager()
           
 AxisDataLocator getDataLocator(java.lang.String dialect)
          Return DataLocator instance for specified dialect.
 java.lang.String getDataLocatorClassName(java.lang.String dialect)
          Return classname of DataLocator configured for specified dialect.
 AxisModule getDefaultModule(java.lang.String moduleName)
           
 java.lang.String getDefaultModuleVersion(java.lang.String moduleName)
           
 java.util.Collection getEngagedModules()
          Method getEngagedModules.
 java.util.Hashtable getFaultyModules()
           
 java.util.Hashtable getFaultyServices()
           
 java.util.ArrayList getGlobalInFlow()
           
 java.util.List getGlobalModules()
           
 java.util.ArrayList getGlobalOutPhases()
           
 java.util.ArrayList getInFaultFlow()
           
 java.lang.Object getKey()
           
 java.util.List getLocalPolicyAssertions()
           
 Builder getMessageBuilder(java.lang.String contentType)
           
 MessageFormatter getMessageFormatter(java.lang.String contentType)
           
 MessageReceiver getMessageReceiver(java.lang.String mepURL)
           
 AxisModule getModule(java.lang.String name)
          Method getModule.
 java.lang.ClassLoader getModuleClassLoader()
           
 ModuleConfiguration getModuleConfig(java.lang.String moduleName)
           
 java.util.HashMap getModules()
           
 java.util.List getModulesForPolicyNamesapce(java.lang.String namesapce)
           
 java.util.ArrayList getObserversList()
           
 java.util.ArrayList getOutFaultFlow()
           
 PhasesInfo getPhasesInfo()
           
 java.net.URL getRepository()
           
 AxisService getService(java.lang.String name)
          Method getService.
 java.lang.ClassLoader getServiceClassLoader()
           
 AxisService getServiceForActivation(java.lang.String serviceName)
          Service can start and stop, once stopped it cannot be accessed, so we need a way to get the service even if service is not active.
 AxisServiceGroup getServiceGroup(java.lang.String serviceNameAndGroupString)
           
 java.util.Iterator getServiceGroups()
           
 java.util.HashMap getServices()
           
 java.lang.ClassLoader getSystemClassLoader()
           
 TargetResolver getTargetResolverChain()
          getTargetResolverChain returns an instance of TargetResolver which iterates over the registered TargetResolvers, calling each one in turn when resolveTarget is called.
 TransportInDescription getTransportIn(java.lang.String name)
           
 TransportOutDescription getTransportOut(java.lang.String name)
           
 java.util.HashMap getTransportsIn()
           
 java.util.HashMap getTransportsOut()
           
 boolean isAssertionLocal(javax.xml.namespace.QName name)
           
 boolean isEngaged(java.lang.String moduleName)
           
 boolean isStart()
           
 void notifyObservers(int event_type, AxisModule moule)
           
 void notifyObservers(int event_type, AxisService service)
           
 void notifyObservers(int event_type, AxisServiceGroup serviceGroup)
           
 void registerLocalPolicyAssertions(AxisModule axisModule)
           
 void registerModulePolicySupport(AxisModule axisModule)
           
 void removeFaultyService(java.lang.String key)
           
 void removeLocalPolicyAssertion(javax.xml.namespace.QName name)
           
 void removeModule(java.lang.String module)
          To remove a given module from the system
 void removeService(java.lang.String name)
          Method removeService.
 AxisServiceGroup removeServiceGroup(java.lang.String serviceGroupName)
           
 void setClusterManager(ClusterManager clusterManager)
           
 void setGlobalOutPhase(java.util.ArrayList outPhases)
           
 void setInFaultPhases(java.util.ArrayList list)
           
 void setInPhasesUptoAndIncludingPostDispatch(java.util.ArrayList inPhasesUptoAndIncludingPostDispatch)
           
 void setModuleClassLoader(java.lang.ClassLoader classLoader)
           
 void setOutFaultPhases(java.util.ArrayList list)
           
 void setPhasesInfo(PhasesInfo phasesInfo)
           
 void setRepository(java.net.URL axis2Repository)
           
 void setServiceClassLoader(java.lang.ClassLoader classLoader)
           
 void setStart(boolean start)
           
 void setSystemClassLoader(java.lang.ClassLoader classLoader)
           
 void startService(java.lang.String serviceName)
           
 void stopService(java.lang.String serviceName)
           
 void validateSystemPredefinedPhases()
          Checks whether the system pre-defined phases for all the flows, have been changed.
 
Methods inherited from class org.apache.axis2.description.AxisDescription
addChild, addChild, addParameter, applyPolicy, applyPolicy, deserializeParameters, getAxisConfiguration, getChild, getChildren, getParameter, getParameters, getParameterValue, getParent, getPolicyInclude, isParameterLocked, removeChild, removeParameter, setParent, setPolicyInclude
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

phasesinfo

protected PhasesInfo phasesinfo
Constructor Detail

AxisConfiguration

public AxisConfiguration()
Constructor AxisConfigurationImpl.

Method Detail

addMessageReceiver

public void addMessageReceiver(java.lang.String mepURL,
                               MessageReceiver messageReceiver)

addMessageBuilder

public void addMessageBuilder(java.lang.String contentType,
                              Builder messageBuilder)
Register a messageBuilder implementation against a content type. This is used by Axis2 to support different message formats.

Parameters:
contentType -
messageBuilder -

addMessageFormatter

public void addMessageFormatter(java.lang.String contentType,
                                MessageFormatter messageFormatter)
Register a messageFormatter implementation against a content type. This is used by Axis2 to support serialization of messages to different message formats. (Eg: JSON)

Parameters:
contentType -
messageFormatter -

addModule

public void addModule(AxisModule module)
               throws AxisFault
Method addModule.

Parameters:
module -
Throws:
AxisFault

removeModule

public void removeModule(java.lang.String module)
To remove a given module from the system

Parameters:
module -

addModuleConfig

public void addModuleConfig(ModuleConfiguration moduleConfiguration)
Adds module configuration, if there is a moduleConfig tag in service.

Parameters:
moduleConfiguration -

addObservers

public void addObservers(AxisObserver axisObserver)

addService

public void addService(AxisService service)
                throws AxisFault
Method addService.

Parameters:
service -
Throws:
AxisFault

addServiceGroup

public void addServiceGroup(AxisServiceGroup axisServiceGroup)
                     throws AxisFault
Throws:
AxisFault

addToAllServicesMap

public void addToAllServicesMap(java.lang.String serviceName,
                                AxisService axisService)

removeServiceGroup

public AxisServiceGroup removeServiceGroup(java.lang.String serviceGroupName)
                                    throws AxisFault
Throws:
AxisFault

addTransportIn

public void addTransportIn(TransportInDescription transport)
                    throws AxisFault
Method addTransportIn.

Parameters:
transport -
Throws:
AxisFault

addTransportOut

public void addTransportOut(TransportOutDescription transport)
                     throws AxisFault
Method addTransportOut.

Parameters:
transport -
Throws:
AxisFault

engageModule

public void engageModule(javax.xml.namespace.QName moduleref)
                  throws AxisFault
Deprecated. Please use the String version instead

Engages the default module version corresponding to the given module name, or if the module name contains version number in it then it will engage the correct module. Both the below cases are valid : - 1. engageModule("addressing"); 2. engageModule("addressing-1.23");

Parameters:
moduleref - QName of module to engage
Throws:
AxisFault

engageModule

public void engageModule(java.lang.String moduleref)
                  throws AxisFault
Engages the default module version corresponding to given module name , or if the module name contains version number in it then it will engage the correct module. Both of the below two cases are valid 1. engageModule("addressing"); 2. engageModule("addressing-1.23");

Parameters:
moduleref - name of module to engage
Throws:
AxisFault

engageModule

public void engageModule(java.lang.String moduleName,
                         java.lang.String versionID)
                  throws AxisFault
Engages a module using given name and its version ID.

Parameters:
moduleName -
versionID -
Throws:
AxisFault

engageModule

public void engageModule(AxisModule axisModule,
                         AxisConfiguration axisConfig)
                  throws AxisFault
Description copied from class: AxisDescription
Engaging a module to different level

Specified by:
engageModule in class AxisDescription
Parameters:
axisModule -
axisConfig -
Throws:
AxisFault

disengageModule

public void disengageModule(AxisModule module)
To dis-engage a module from the system. This will remove all the handlers belonging to this module from all the handler chains.

Parameters:
module -

notifyObservers

public void notifyObservers(int event_type,
                            AxisService service)

notifyObservers

public void notifyObservers(int event_type,
                            AxisModule moule)

notifyObservers

public void notifyObservers(int event_type,
                            AxisServiceGroup serviceGroup)

removeService

public void removeService(java.lang.String name)
                   throws AxisFault
Method removeService.

Parameters:
name -
Throws:
AxisFault

getEngagedModules

public java.util.Collection getEngagedModules()
Method getEngagedModules.

Returns:
Collection

getGlobalModules

public java.util.List getGlobalModules()

getFaultyModules

public java.util.Hashtable getFaultyModules()

getFaultyServices

public java.util.Hashtable getFaultyServices()

removeFaultyService

public void removeFaultyService(java.lang.String key)

getGlobalOutPhases

public java.util.ArrayList getGlobalOutPhases()

getInFaultFlow

public java.util.ArrayList getInFaultFlow()
Returns:
Returns ArrayList.

getGlobalInFlow

public java.util.ArrayList getGlobalInFlow()

getMessageReceiver

public MessageReceiver getMessageReceiver(java.lang.String mepURL)

getMessageBuilder

public Builder getMessageBuilder(java.lang.String contentType)
Parameters:
contentType -
Returns:
the configured message builder implementation class name against the given content type.

getMessageFormatter

public MessageFormatter getMessageFormatter(java.lang.String contentType)
Parameters:
contentType -
Returns:
the configured message formatter implementation class name against the given content type.

getModule

public AxisModule getModule(java.lang.String name)
Method getModule. First it will check whether the given module is there in the hashMap, if so returns that and the name, which can be either with version string or without version string.

If its not found and the name does not contain the version string in it then checks whether the default version of the module is available in the sytem for the given name, then returns that.

Parameters:
name -
Returns:
Returns ModuleDescription.

getModuleClassLoader

public java.lang.ClassLoader getModuleClassLoader()

getModuleConfig

public ModuleConfiguration getModuleConfig(java.lang.String moduleName)

getModules

public java.util.HashMap getModules()
Returns:
Returns HashMap.

getOutFaultFlow

public java.util.ArrayList getOutFaultFlow()
Returns:
Returns ArrayList.

getPhasesInfo

public PhasesInfo getPhasesInfo()

getRepository

public java.net.URL getRepository()

getService

public AxisService getService(java.lang.String name)
                       throws AxisFault
Method getService.

Parameters:
name -
Returns:
Returns AxisService.
Throws:
AxisFault

getServiceForActivation

public AxisService getServiceForActivation(java.lang.String serviceName)
Service can start and stop, once stopped it cannot be accessed, so we need a way to get the service even if service is not active.

Returns:
AxisService

getServiceClassLoader

public java.lang.ClassLoader getServiceClassLoader()

getServiceGroup

public AxisServiceGroup getServiceGroup(java.lang.String serviceNameAndGroupString)

getServiceGroups

public java.util.Iterator getServiceGroups()

getServices

public java.util.HashMap getServices()

getSystemClassLoader

public java.lang.ClassLoader getSystemClassLoader()

getTransportIn

public TransportInDescription getTransportIn(java.lang.String name)

getTransportOut

public TransportOutDescription getTransportOut(java.lang.String name)

getTransportsIn

public java.util.HashMap getTransportsIn()

getTransportsOut

public java.util.HashMap getTransportsOut()

isEngaged

public boolean isEngaged(java.lang.String moduleName)
Specified by:
isEngaged in class AxisDescription

setGlobalOutPhase

public void setGlobalOutPhase(java.util.ArrayList outPhases)

setInFaultPhases

public void setInFaultPhases(java.util.ArrayList list)
Parameters:
list -

setInPhasesUptoAndIncludingPostDispatch

public void setInPhasesUptoAndIncludingPostDispatch(java.util.ArrayList inPhasesUptoAndIncludingPostDispatch)

setModuleClassLoader

public void setModuleClassLoader(java.lang.ClassLoader classLoader)

setOutFaultPhases

public void setOutFaultPhases(java.util.ArrayList list)
Parameters:
list -

setPhasesInfo

public void setPhasesInfo(PhasesInfo phasesInfo)

setRepository

public void setRepository(java.net.URL axis2Repository)

setServiceClassLoader

public void setServiceClassLoader(java.lang.ClassLoader classLoader)

setSystemClassLoader

public void setSystemClassLoader(java.lang.ClassLoader classLoader)

addDefaultModuleVersion

public void addDefaultModuleVersion(java.lang.String moduleName,
                                    java.lang.String moduleVersion)
Adds a default module version, which can be done either programmatically or by using axis2.xml. The default module version is important if user asks to engage a module without given version ID, in which case, the default version is engaged.

Parameters:
moduleName -
moduleVersion -

getDefaultModuleVersion

public java.lang.String getDefaultModuleVersion(java.lang.String moduleName)

getDefaultModule

public AxisModule getDefaultModule(java.lang.String moduleName)

getClusterManager

public ClusterManager getClusterManager()

setClusterManager

public void setClusterManager(ClusterManager clusterManager)

getKey

public java.lang.Object getKey()
Specified by:
getKey in class AxisDescription

stopService

public void stopService(java.lang.String serviceName)
                 throws AxisFault
Throws:
AxisFault

startService

public void startService(java.lang.String serviceName)
                  throws AxisFault
Throws:
AxisFault

getModulesForPolicyNamesapce

public java.util.List getModulesForPolicyNamesapce(java.lang.String namesapce)

registerModulePolicySupport

public void registerModulePolicySupport(AxisModule axisModule)

registerLocalPolicyAssertions

public void registerLocalPolicyAssertions(AxisModule axisModule)

getObserversList

public java.util.ArrayList getObserversList()

isStart

public boolean isStart()

setStart

public void setStart(boolean start)

getTargetResolverChain

public TargetResolver getTargetResolverChain()
getTargetResolverChain returns an instance of TargetResolver which iterates over the registered TargetResolvers, calling each one in turn when resolveTarget is called.


addTargetResolver

public void addTargetResolver(TargetResolver tr)

addLocalPolicyAssertion

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

getLocalPolicyAssertions

public java.util.List getLocalPolicyAssertions()

removeLocalPolicyAssertion

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

isAssertionLocal

public boolean isAssertionLocal(javax.xml.namespace.QName name)

addDataLocatorClassNames

public void addDataLocatorClassNames(java.lang.String dialect,
                                     java.lang.String classname)
Allows to define/configure Data Locator for specified dialect at Axis 2 Configuration.

Parameters:
classname - - class name of the Data Locator configured to support retrieval for the specified dialect.

addDataLocator

public void addDataLocator(java.lang.String dialect,
                           AxisDataLocator dataLocator)
For internal used only! To store instance of DataLocator when it is first loaded. This allows to reuse of the DataLocator after it is initially loaded.

Parameters:
dataLocator - - specified an DataLocator instance to support retrieval of the specified dialect.

getDataLocator

public AxisDataLocator getDataLocator(java.lang.String dialect)
Return DataLocator instance for specified dialect.


getDataLocatorClassName

public java.lang.String getDataLocatorClassName(java.lang.String dialect)
Return classname of DataLocator configured for specified dialect.


validateSystemPredefinedPhases

public void validateSystemPredefinedPhases()
                                    throws DeploymentException
Checks whether the system pre-defined phases for all the flows, have been changed. If they have been changed, throws a DeploymentException.

Throws:
DeploymentException


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