Package org.apache.axis2.engine
Class AxisServer
- java.lang.Object
-
- org.apache.axis2.engine.AxisServer
-
- Direct Known Subclasses:
SimpleAxis2Server
public class AxisServer extends Object
This class provide a very convenient way of creating server and deploying services. Once someone call start method it will fire up configuration context and start up the listeners. One can provide repository location and axis.xml as system properties.
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationContext
configContext
protected ListenerManager
listenerManager
-
Constructor Summary
Constructors Constructor Description AxisServer()
Server will start automatically if you call deployServiceAxisServer(boolean startOnDeploy)
If you do not want Axis2 to start the server automatically then pass the "false" else "true"
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurationContext
createDefaultConfigurationContext()
Users extending this class can override this method to supply a custom ConfigurationContextvoid
deployService(String serviceClassName)
Will make Java class into a web serviceConfigurationContext
getConfigurationContext()
Creates a default configuration context if one is not set already via setConfigurationContextvoid
setConfigurationContext(ConfigurationContext configContext)
Set the configuration context.protected void
start()
Will create a configuration context from the avialable data and then it will start the listener managervoid
stop()
Stop the server, automatically terminates the listener manager as well.
-
-
-
Field Detail
-
configContext
protected ConfigurationContext configContext
-
listenerManager
protected ListenerManager listenerManager
-
-
Method Detail
-
deployService
public void deployService(String serviceClassName) throws AxisFault
Will make Java class into a web service- Parameters:
serviceClassName
- : Actual class you want to make as a web service- Throws:
AxisFault
- : If something went wrong
-
start
protected void start() throws AxisFault
Will create a configuration context from the avialable data and then it will start the listener manager- Throws:
AxisFault
- if something went wrong
-
stop
public void stop() throws AxisFault
Stop the server, automatically terminates the listener manager as well.- Throws:
AxisFault
-
setConfigurationContext
public void setConfigurationContext(ConfigurationContext configContext)
Set the configuration context. Please call this before you call deployService or start method- Parameters:
configContext
- ConfigurationContext
-
getConfigurationContext
public ConfigurationContext getConfigurationContext() throws AxisFault
Creates a default configuration context if one is not set already via setConfigurationContext- Returns:
- ConfigurationContext
- Throws:
AxisFault
-
createDefaultConfigurationContext
protected ConfigurationContext createDefaultConfigurationContext() throws AxisFault
Users extending this class can override this method to supply a custom ConfigurationContext- Returns:
- ConfigurationContext
- Throws:
AxisFault
-
-