Celtix User APIs

org.objectweb.celtix
Class Bus

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

public abstract class Bus
extends Object

The Bus class provides access to configuration, factories and managers for use by an application.


Field Summary
static String BUS_CLASS_PROPERTY
           
 
Constructor Summary
Bus()
           
 
Method Summary
abstract  BindingManager getBindingManager()
          Returns the BindingManager of this Bus.
abstract  Configuration getConfiguration()
          Returns the Configuration of this Bus.
static Bus getCurrent()
          Returns the current Bus on this thread.
abstract  HandlerFactoryManager getHandlerFactoryManager()
          Returns the HandlerFactoryManager of this Bus.
abstract  BusLifeCycleManager getLifeCycleManager()
          Returns the BusLifeCycleManager of this Bus.
abstract  PluginManager getPluginManager()
          Returns the PluginManager of this Bus.
abstract  org.objectweb.celtix.resource.ResourceManager getResourceManager()
          Returns the ResourceManager of this Bus.
abstract  TransportFactoryManager getTransportFactoryManager()
          Returns the TransportFactoryManager of this Bus.
abstract  WorkQueueManager getWorkQueueManager()
          Returns the WorkQueueManager of this Bus.
abstract  WSDLManager getWSDLManager()
          Returns the ClientRegistry of this Bus.
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.
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.
abstract  void shutdown(boolean wait)
          Shuts down the Bus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUS_CLASS_PROPERTY

public static final String BUS_CLASS_PROPERTY
See Also:
Constant Field Values
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. If no bus has been initialised on this thread, return the default bus.

Returns:
the current Bus on this thread.

setCurrent

public static void setCurrent(Bus bus)
Sets the current Bus. If a bus is explicitly initialised on a thread, this is the current bus. If no thread has been initialised (implicitly or explicitly), setting the current bus will set the default bus for all threads

Parameters:
bus - the current bus

shutdown

public abstract void shutdown(boolean wait)
                       throws BusException
Shuts down the Bus.

Parameters:
wait - If true, waits for the Bus to shutdown before returning, otherwise returns immediately.
Throws:
BusException

getConfiguration

public abstract Configuration getConfiguration()
Returns the Configuration of this Bus.

Returns:
Configuration the configuration of this bus.

getHandlerFactoryManager

public abstract HandlerFactoryManager getHandlerFactoryManager()
Returns the HandlerFactoryManager of this Bus.

Returns:
HandlerFactoryManager the handler factory manager of this Bus.

getTransportFactoryManager

public abstract TransportFactoryManager getTransportFactoryManager()
Returns the TransportFactoryManager of this Bus.

Returns:
TransportRegistry the servant registry of this Bus.

getBindingManager

public abstract BindingManager getBindingManager()
Returns the BindingManager of this Bus.

Returns:
BindingManager the binding manager of this Bus.

getWSDLManager

public abstract WSDLManager getWSDLManager()
Returns the ClientRegistry of this Bus.

Returns:
WSDLManager the wsdl manager of this Bus.

getPluginManager

public abstract PluginManager getPluginManager()
Returns the PluginManager of this Bus.

Returns:
PluginManager the plugin manager of this Bus.

getLifeCycleManager

public abstract BusLifeCycleManager getLifeCycleManager()
Returns the BusLifeCycleManager of this Bus.

Returns:
BusLifeCycleManager of this Bus.

getWorkQueueManager

public abstract WorkQueueManager getWorkQueueManager()
Returns the WorkQueueManager of this Bus.

Returns:
WorkQueueManager of this Bus.

getResourceManager

public abstract org.objectweb.celtix.resource.ResourceManager getResourceManager()
Returns the ResourceManager of this Bus.

Returns:
ResourceManager of this Bus.

run

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


initialize

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

Celtix User APIs