com.beust.jbus
Class JBus

java.lang.Object
  extended by com.beust.jbus.JBus
All Implemented Interfaces:
IBus

public class JBus
extends Object
implements IBus


Constructor Summary
JBus()
           
 
Method Summary
 void post(Object event)
          Post an object on the bus.
 void post(Object event, String[] categories)
          Post an object on the bus with the specified categories.
 void register(Object object)
          Register this object to receive notifications.
 void unregister(Object object)
          Unregister an object from the bus.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBus

public JBus()
Method Detail

register

public void register(Object object)
Description copied from interface: IBus
Register this object to receive notifications. The object passed in parameter will be searched for any method annotated with @{link @Subscriber} and each of these methods will be invoked if an object posted on the bus matches its parameter.

Specified by:
register in interface IBus

unregister

public void unregister(Object object)
Description copied from interface: IBus
Unregister an object from the bus.

Specified by:
unregister in interface IBus

post

public void post(Object event)
Description copied from interface: IBus
Post an object on the bus.

Specified by:
post in interface IBus

post

public void post(Object event,
                 String[] categories)
Description copied from interface: IBus
Post an object on the bus with the specified categories. Only subscribers whose category pattern matches at least one of these categories will be invoked.

Specified by:
post in interface IBus


Copyright © 2010. All Rights Reserved.