org.apache.axis2.engine
Class AxisConfiguration

java.lang.Object
  extended byorg.apache.axis2.engine.AxisConfiguration
All Implemented Interfaces:
ParameterInclude

public class AxisConfiguration
extends Object
implements ParameterInclude

Class AxisConfigurationImpl


Field Summary
protected  ParameterInclude paramInclude
           
protected  PhasesInfo phasesinfo
           
 
Constructor Summary
AxisConfiguration()
          Constructor AxisConfigurationImpl.
 
Method Summary
 void addDefaultModuleVersion(String moduleName, String moduleVersion)
          Adds a dafault module version , which can be done either programatically or by using axis2.xml .
 void addMessageReceiver(String mepURL, MessageReceiver messageReceiver)
           
 void addModule(ModuleDescription module)
          Method addModule.
 void addModuleConfig(ModuleConfiguration moduleConfiguration)
          Adds module configuration, if there is moduleConfig tag in service.
 void addObservers(AxisObserver axisObserver)
           
 void addParameter(Parameter param)
          Method addParameter.
 void addService(AxisService service)
          Method addService.
 void addServiceGroup(AxisServiceGroup axisServiceGroup)
           
 void addTransportIn(TransportInDescription transport)
          Method addTransportIn.
 void addTransportOut(TransportOutDescription transport)
          Method addTransportOut.
 void deserializeParameters(OMElement parameters)
           
 void engageModule(QName 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(String moduleName, String versionID)
          Engages a module using give name and its version ID.
static String getAxis2HomeDirectory()
           
 ModuleDescription getDefaultModule(String moduleName)
           
 String getDefaultModuleVersion(String moduleName)
           
 Collection getEngagedModules()
          Method getEngagedModules.
 Hashtable getFaultyModules()
           
 Hashtable getFaultyServices()
           
 ArrayList getGlobalOutPhases()
           
 HostConfiguration getHostConfiguration()
           
 ArrayList getInFaultFlow()
           
 ArrayList getInPhasesUptoAndIncludingPostDispatch()
           
 MessageReceiver getMessageReceiver(String mepURL)
           
 ModuleDescription getModule(QName name)
          Method getModule.
 ClassLoader getModuleClassLoader()
           
 ModuleConfiguration getModuleConfig(QName moduleName)
           
 HashMap getModules()
           
 ArrayList getOutFaultFlow()
           
 Parameter getParameter(String name)
          Method getParameter.
 ArrayList getParameters()
          Gets all the parameters in a given description.
 PhasesInfo getPhasesInfo()
           
 PolicyInclude getPolicyInclude()
           
 String getRepository()
           
 AxisService getService(String name)
          Method getService.
 ClassLoader getServiceClassLoader()
           
 AxisServiceGroup getServiceGroup(String serviceNameAndGroupString)
           
 Iterator getServiceGroups()
           
 HashMap getServices()
           
 ClassLoader getSystemClassLoader()
           
 TransportInDescription getTransportIn(QName name)
           
 TransportOutDescription getTransportOut(QName name)
           
 HashMap getTransportsIn()
           
 HashMap getTransportsOut()
           
 boolean isEngaged(QName moduleName)
           
 boolean isParameterLocked(String parameterName)
          Checks whether a given parameter is locked.
 ModuleDescription loadModulefromResources(String moduleName)
          Loads module from class path - the mar files in a jar file inside modules/ directory
 void notifyObservers(int event_type, AxisService service)
           
 void removeService(String name)
          Method removeService.
 void setGlobalOutPhase(ArrayList outPhases)
           
 void setHostConfiguration(HostConfiguration hostConfiguration)
           
 void setInFaultPhases(ArrayList list)
           
 void setInPhasesUptoAndIncludingPostDispatch(ArrayList inPhasesUptoAndIncludingPostDispatch)
           
 void setModuleClassLoader(ClassLoader classLoader)
           
 void setOutFaultPhases(ArrayList list)
           
 void setPhasesinfo(PhasesInfo phasesInfo)
           
 void setPolicyInclude(PolicyInclude policyInclude)
           
 void setRepository(String axis2Repository)
           
 void setServiceClassLoader(ClassLoader classLoader)
           
 void setSystemClassLoader(ClassLoader classLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paramInclude

protected final ParameterInclude paramInclude

phasesinfo

protected PhasesInfo phasesinfo
Constructor Detail

AxisConfiguration

public AxisConfiguration()
Constructor AxisConfigurationImpl.

Method Detail

addMessageReceiver

public void addMessageReceiver(String mepURL,
                               MessageReceiver messageReceiver)

addModule

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

Parameters:
module -
Throws:
AxisFault

addModuleConfig

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

Parameters:
moduleConfiguration -

addObservers

public void addObservers(AxisObserver axisObserver)

addParameter

public void addParameter(Parameter param)
                  throws AxisFault
Method addParameter.

Specified by:
addParameter in interface ParameterInclude
Parameters:
param -
Throws:
AxisFault

addService

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

Parameters:
service -
Throws:
AxisFault

addServiceGroup

public void addServiceGroup(AxisServiceGroup axisServiceGroup)
                     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

deserializeParameters

public void deserializeParameters(OMElement parameters)
                           throws AxisFault
Specified by:
deserializeParameters in interface ParameterInclude
Throws:
AxisFault

engageModule

public void engageModule(QName 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 -
Throws:
AxisFault

engageModule

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

Parameters:
moduleName -
versionID -
Throws:
AxisFault

loadModulefromResources

public ModuleDescription loadModulefromResources(String moduleName)
                                          throws AxisFault
Loads module from class path - the mar files in a jar file inside modules/ directory

Parameters:
moduleName -
Returns:
Returns ModuleDescription.
Throws:
AxisFault

notifyObservers

public void notifyObservers(int event_type,
                            AxisService service)

removeService

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

Parameters:
name -
Throws:
AxisFault

getEngagedModules

public Collection getEngagedModules()
Method getEngagedModules.

Returns:
Collection

getFaultyModules

public Hashtable getFaultyModules()

getFaultyServices

public Hashtable getFaultyServices()

getGlobalOutPhases

public ArrayList getGlobalOutPhases()

getHostConfiguration

public HostConfiguration getHostConfiguration()

getInFaultFlow

public ArrayList getInFaultFlow()
Returns:
Returns ArrayList.

getInPhasesUptoAndIncludingPostDispatch

public ArrayList getInPhasesUptoAndIncludingPostDispatch()

getMessageReceiver

public MessageReceiver getMessageReceiver(String mepURL)

getModule

public ModuleDescription getModule(QName name)
Method getModule. first it will check whether the given module is there in the hashMap , if so just return that and the name can be either with version string or without vresion string

if it not found and , the nane does not have version string in it then try to check whether default vresion of module available in the sytem for the give name , if so return that

Parameters:
name -
Returns:
Returns ModuleDescription.

getModuleClassLoader

public ClassLoader getModuleClassLoader()

getModuleConfig

public ModuleConfiguration getModuleConfig(QName moduleName)

getModules

public HashMap getModules()
Returns:
Returns HashMap.

getOutFaultFlow

public ArrayList getOutFaultFlow()
Returns:
Returns ArrayList.

getParameter

public Parameter getParameter(String name)
Method getParameter.

Specified by:
getParameter in interface ParameterInclude
Parameters:
name -
Returns:
Returns Parameter.

getParameters

public ArrayList getParameters()
Description copied from interface: ParameterInclude
Gets all the parameters in a given description.

Specified by:
getParameters in interface ParameterInclude
Returns:
Returns ArrayList.

getPhasesInfo

public PhasesInfo getPhasesInfo()

getRepository

public String getRepository()

getService

public AxisService getService(String name)
Method getService.

Parameters:
name -
Returns:
Returns AxisService.

getServiceClassLoader

public ClassLoader getServiceClassLoader()

getServiceGroup

public AxisServiceGroup getServiceGroup(String serviceNameAndGroupString)

getServiceGroups

public Iterator getServiceGroups()

getServices

public HashMap getServices()

getSystemClassLoader

public ClassLoader getSystemClassLoader()

getTransportIn

public TransportInDescription getTransportIn(QName name)
                                      throws AxisFault
Throws:
AxisFault

getTransportOut

public TransportOutDescription getTransportOut(QName name)
                                        throws AxisFault
Throws:
AxisFault

getTransportsIn

public HashMap getTransportsIn()

getTransportsOut

public HashMap getTransportsOut()

isEngaged

public boolean isEngaged(QName moduleName)

isParameterLocked

public boolean isParameterLocked(String parameterName)
Checks whether a given parameter is locked.

Specified by:
isParameterLocked in interface ParameterInclude
Parameters:
parameterName -
Returns:
Returns boolean.

setGlobalOutPhase

public void setGlobalOutPhase(ArrayList outPhases)

setHostConfiguration

public void setHostConfiguration(HostConfiguration hostConfiguration)

setInFaultPhases

public void setInFaultPhases(ArrayList list)
Parameters:
list -

setInPhasesUptoAndIncludingPostDispatch

public void setInPhasesUptoAndIncludingPostDispatch(ArrayList inPhasesUptoAndIncludingPostDispatch)

setModuleClassLoader

public void setModuleClassLoader(ClassLoader classLoader)

setOutFaultPhases

public void setOutFaultPhases(ArrayList list)
Parameters:
list -

setPhasesinfo

public void setPhasesinfo(PhasesInfo phasesInfo)

setRepository

public void setRepository(String axis2Repository)

setServiceClassLoader

public void setServiceClassLoader(ClassLoader classLoader)

setSystemClassLoader

public void setSystemClassLoader(ClassLoader classLoader)

setPolicyInclude

public void setPolicyInclude(PolicyInclude policyInclude)

getPolicyInclude

public PolicyInclude getPolicyInclude()

getAxis2HomeDirectory

public static String getAxis2HomeDirectory()

addDefaultModuleVersion

public void addDefaultModuleVersion(String moduleName,
                                    String moduleVersion)
Adds a dafault module version , which can be done either programatically 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, we will engage the default version.

Parameters:
moduleName -
moduleVersion -

getDefaultModuleVersion

public String getDefaultModuleVersion(String moduleName)

getDefaultModule

public ModuleDescription getDefaultModule(String moduleName)