org.apache.axis2.engine
Class AxisServer

java.lang.Object
  extended by org.apache.axis2.engine.AxisServer
Direct Known Subclasses:
SimpleAxis2Server

public class AxisServer
extends java.lang.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
protected  ConfigurationContext configContext
           
protected  ListenerManager listenerManager
           
 
Constructor Summary
AxisServer()
          Server will start automatically if you call deployService
AxisServer(boolean startOnDeploy)
          If you do not want Axis2 to start the server automatically then pass the "false" else "true"
 
Method Summary
protected  ConfigurationContext createDefaultConfigurationContext()
          Users extending this class can override this method to supply a custom ConfigurationContext
 void deployService(java.lang.String serviceClassName)
          Will make Java class into a web service
 ConfigurationContext getConfigurationContext()
          Creates a default configuration context if one is not set already via setConfigurationContext
 void 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 manager
 void stop()
          Stop the server, automatically terminates the listener manager as well.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configContext

protected ConfigurationContext configContext

listenerManager

protected ListenerManager listenerManager
Constructor Detail

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 Detail

deployService

public void deployService(java.lang.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


Copyright © 2007 Apache Web Services Project. All Rights Reserved.