Package org.apache.axis2.engine
Class AxisServer
java.lang.Object
org.apache.axis2.engine.AxisServer
- Direct Known Subclasses:
SimpleAxis2Server
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 -
Constructor Summary
ConstructorsConstructorDescriptionServer 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
Modifier and TypeMethodDescriptionprotected ConfigurationContextUsers extending this class can override this method to supply a custom ConfigurationContextvoiddeployService(String serviceClassName) Will make Java class into a web serviceCreates a default configuration context if one is not set already via setConfigurationContextvoidsetConfigurationContext(ConfigurationContext configContext) Set the configuration context.protected voidstart()Will create a configuration context from the avialable data and then it will start the listener managervoidstop()Stop the server, automatically terminates the listener manager as well.
-
Field Details
-
configContext
-
listenerManager
-
-
Constructor Details
-
AxisServer
public AxisServer(boolean startOnDeploy) If you do not want Axis2 to start the server automatically then pass the "false" else "true"- Parameters:
startOnDeploy- : boolean
-
AxisServer
public AxisServer()Server will start automatically if you call deployService
-
-
Method Details
-
deployService
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
Will create a configuration context from the avialable data and then it will start the listener manager- Throws:
AxisFault- if something went wrong
-
stop
Stop the server, automatically terminates the listener manager as well.- Throws:
AxisFault
-
setConfigurationContext
Set the configuration context. Please call this before you call deployService or start method- Parameters:
configContext- ConfigurationContext
-
getConfigurationContext
Creates a default configuration context if one is not set already via setConfigurationContext- Returns:
- ConfigurationContext
- Throws:
AxisFault
-
createDefaultConfigurationContext
Users extending this class can override this method to supply a custom ConfigurationContext- Returns:
- ConfigurationContext
- Throws:
AxisFault
-