|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.bus.client.api.BusLifecycleAdapter
public class BusLifecycleAdapter
Do-nothing implementation of BusLifecycleListener
. Convenient for
subclassing (instead of implementing BusLifecycleListener directly) when you
are only interested in one or two of the event types.
For example:
bus.addLifecycleListener(new BusLifecycleAdapter() {
@Override
public void busOnline(BusLifecycleEvent e) {
// do stuff
}
});
Constructor Summary | |
---|---|
BusLifecycleAdapter()
|
Method Summary | |
---|---|
void |
busAssociating(BusLifecycleEvent e)
Indicates that the bus is about to transition from the local only to the connecting state. |
void |
busDisassociating(BusLifecycleEvent e)
Indicates that the bus is about to transition from the connecting to the local only state. |
void |
busOffline(BusLifecycleEvent e)
Indicates that the bus has just transitioned from the connected to the connecting state. |
void |
busOnline(BusLifecycleEvent e)
Indicates that the bus has just transitioned from the connecting to the connected state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BusLifecycleAdapter()
Method Detail |
---|
public void busAssociating(BusLifecycleEvent e)
BusLifecycleListener
busAssociating
in interface BusLifecycleListener
e
- the object describing the event (includes a reference to the bus
that fired the event).public void busDisassociating(BusLifecycleEvent e)
BusLifecycleListener
When you want to try to connect to the server again (for example, to fail
over to another server, after a set timeout has elapsed, or in response to
the user clicking a "Reconnect" button in the user interface), call
ClientMessageBusImpl.init()
. This will transition the bus back to
the connecting state.
busDisassociating
in interface BusLifecycleListener
e
- the object describing the event (includes a reference to the bus
that fired the event).public void busOnline(BusLifecycleEvent e)
BusLifecycleListener
busOnline
in interface BusLifecycleListener
e
- the object describing the event (includes a reference to the bus
that fired the event).public void busOffline(BusLifecycleEvent e)
BusLifecycleListener
BusLifecycleListener.busOnline(BusLifecycleEvent)
event.
If the bus gives up trying to reconnect, you will receive a
BusLifecycleListener.busDisassociating(BusLifecycleEvent)
event.
At the time when this event is delivered, messages intended for the remote bus will be enqueued for delivery when (and if) the bus goes back online.
busOffline
in interface BusLifecycleListener
e
- the object describing the event (includes a reference to the bus
that fired the event).
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |