net.sf.doolin.bus
Class Bus

java.lang.Object
  extended by net.sf.doolin.bus.Bus

public abstract class Bus
extends Object

Bus holder.

Author:
Damien Coraboeuf

Constructor Summary
Bus()
           
 
Method Summary
static IBus get()
          Gets the current bus.
static IBus setContextualBus(IBus bus)
          Sets the bus in the thread context and returns the previous one.
static IBus setDefaultBus(IBus bus)
          Sets the default bus to use and returns the previous one.
 
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

get

public static IBus get()
Gets the current bus. First takes it from the thread context, then uses the default one.

Returns:
Bus to use in this context

setContextualBus

public static IBus setContextualBus(IBus bus)
Sets the bus in the thread context and returns the previous one.

Parameters:
bus - Bus to set (can be null)
Returns:
Previous bus (can be null)

setDefaultBus

public static IBus setDefaultBus(IBus bus)
Sets the default bus to use and returns the previous one.

Parameters:
bus - Bus to set (can be null)
Returns:
Previous bus (can be null)


Copyright © 2011. All Rights Reserved.