|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.web.bindery.event.shared.EventBus
com.ekuefler.supereventbus.EventBusAdapter
public class EventBusAdapter
An adapter allowing SuperEventBus to be referenced via GWT's built-in
EventBus interface. Calls to methods on this class
are forwarded to an underlying EventBus, effectively allowing an EventBus to be
passed to existing methods that expect a legacy
EventBus. Since only a small subset of
EventBus's functionality is exposed here, this should only be used for existing/legacy
code that can't be refactored to use EventBus directly.
| Constructor Summary | |
|---|---|
EventBusAdapter(EventBus eventBus)
Creates a new adapter wrapping the given event bus. |
|
| Method Summary | ||
|---|---|---|
|
addHandler(Event.Type<H> type,
H handler)
Emulates the behavior of registering a single handler method on the underlying event bus. |
|
|
addHandlerToSource(Event.Type<H> type,
Object source,
H handler)
Not supported. |
|
void |
fireEvent(Event<?> event)
Invokes EventBus.post(T) on the underlying event bus with the given event. |
|
void |
fireEventFromSource(Event<?> event,
Object source)
Not supported. |
|
| Methods inherited from class com.google.web.bindery.event.shared.EventBus |
|---|
dispatchEvent, setSourceOfEvent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventBusAdapter(EventBus eventBus)
| Method Detail |
|---|
public void fireEvent(Event<?> event)
EventBus.post(T) on the underlying event bus with the given event.
fireEvent in class EventBus
public <H> HandlerRegistration addHandler(Event.Type<H> type,
H handler)
addHandler in class EventBus
public <H> HandlerRegistration addHandlerToSource(Event.Type<H> type,
Object source,
H handler)
addHandlerToSource in class EventBus
public void fireEventFromSource(Event<?> event,
Object source)
fireEventFromSource in class EventBus
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||