Celtix User APIs

org.objectweb.celtix
Class Bus

java.lang.Object
  extended by org.objectweb.celtix.Bus

public abstract class Bus
extends Object


Constructor Summary
Bus()
           
 
Method Summary
abstract  BindingManager getBindingManager()
           
abstract  Configuration getConfiguration()
           
static Bus getCurrent()
          Returns the current Bus on this thread.
abstract  HandlerFactoryManager getHandlerFactoryManager()
           
abstract  BusLifeCycleManager getLifeCycleManager()
           
abstract  PluginManager getPluginManager()
           
abstract  TransportFactoryManager getTransportFactoryManager()
           
abstract  WorkQueueManager getWorkQueueManager()
           
abstract  WSDLManager getWSDLManager()
           
static Bus init()
          Returns a newly created and fully initialised Bus.
static Bus init(String[] args)
          Returns a newly created and fully initialised Bus.
static Bus init(String[] args, Map<String,Object> properties)
          Returns a newly created and fully initialised Bus.
static Bus init(String[] args, Map<String,Object> properties, ClassLoader classLoader)
          Returns a newly created and fully initialised Bus.
protected abstract  void initialize(String[] args, Map<String,Object> properties)
           
abstract  void run()
          Starts processing bus events, and returns only after the Bus has been shut down (from another thread).
static void setCurrent(Bus bus)
          Sets the current Bus This method has been added to make the association between a Service and a Bus - as a runtime environment for the Service more explicit.
abstract  void shutdown(boolean wait)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bus

public Bus()
Method Detail

init

public static Bus init()
                throws BusException
Returns a newly created and fully initialised Bus.

Returns:
Bus the newly created Bus.
Throws:
BusException - If there is an error initializing Bus.

init

public static Bus init(String[] args)
                throws BusException
Returns a newly created and fully initialised Bus.

Parameters:
args - any args, such as domain name, bus class, and other configuration options that can be used to initialize this Bus.
Returns:
Bus the newly created Bus.
Throws:
BusException - If there is an error initializing Bus.

init

public static Bus init(String[] args,
                       Map<String,Object> properties)
                throws BusException
Returns a newly created and fully initialised Bus.

Parameters:
args - any args, such as domain name, bus class, and other configuration options that can be used to initialize this Bus.
properties - any properties, such as bus identifier, bus class, and other configuration options that can be used to identify and initialize this Bus. The properties are superceded by the settings in the args parameter, and they in turn supercede system properties.
Returns:
Bus the newly created Bus.
Throws:
BusException - If there is an error initializing Bus.

init

public static Bus init(String[] args,
                       Map<String,Object> properties,
                       ClassLoader classLoader)
                throws BusException
Returns a newly created and fully initialised Bus.

Parameters:
args - any args, such as domain name, bus class, and other configuration options that can be used to initialize this Bus.
properties - any properties, such as domain name, bus class, and other configuration options that can be used to initialize this Bus. The properties are superceded by the settings in the args parameter, and they in turn supercede system properties.
classLoader - an optional classloader to use when instantiating a Bus needs to be instantiated (defaults to the current thread's context classloader).
Returns:
Bus the newly created Bus.
Throws:
BusException - If there is an error initializing Bus.

getCurrent

public static Bus getCurrent()
Returns the current Bus on this thread.

Returns:
the current Bus on this thread.

setCurrent

public static void setCurrent(Bus bus)
Sets the current Bus This method has been added to make the association between a Service and a Bus - as a runtime environment for the Service more explicit. Recurring to the last Bus created in the process or the current Bus on a thread is necessary as the JAX-WS ServiceFactory must be implemented as a Singleton. By exposing these APIs the dependency becomes more obvious and - more importantly - can be controlled by the application developer.

Parameters:
bus - The Bus designated to be the current one on this thread.

shutdown

public abstract void shutdown(boolean wait)
                       throws BusException
Throws:
BusException

getConfiguration

public abstract Configuration getConfiguration()

getHandlerFactoryManager

public abstract HandlerFactoryManager getHandlerFactoryManager()

getTransportFactoryManager

public abstract TransportFactoryManager getTransportFactoryManager()

getBindingManager

public abstract BindingManager getBindingManager()

getWSDLManager

public abstract WSDLManager getWSDLManager()

getPluginManager

public abstract PluginManager getPluginManager()

getLifeCycleManager

public abstract BusLifeCycleManager getLifeCycleManager()

getWorkQueueManager

public abstract WorkQueueManager getWorkQueueManager()

run

public abstract void run()
Starts processing bus events, and returns only after the Bus has been shut down (from another thread).


initialize

protected abstract void initialize(String[] args,
                                   Map<String,Object> properties)
                            throws BusException
Throws:
BusException

Celtix User APIs