|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.web.bindery.event.shared.EventBus
com.google.gwt.event.shared.EventBus
com.google.gwt.event.shared.SimpleEventBus
com.tibco.bpm.web.client.model.pagebus.hub.ManagedEventBus
public class ManagedEventBus
An EventBus extension that enables the use of the ManagedEvent class to pass events over the PageBus ManagedHub. The the normal GWT Event/Handler model is implemented and events are transparently fired over the ManagedHub.
Static members are used to:
Handlers can be added and events fired just as with any GWT EventBus. In addition any HasHandlers implementation can be added.
This can be used with any normal GwtEvent in addition to the special functionality provided for any ManagedEvent extension class.
©2011 Cloud Software Group, Inc.
ManagedEvent
Nested Class Summary | |
---|---|
class |
ManagedEventBus.ManagedHandlerRegistration
|
Method Summary | ||
---|---|---|
|
addHandler(com.google.web.bindery.event.shared.Event.Type<H> type,
H handler)
|
|
|
addHandler(com.google.web.bindery.event.shared.Event.Type<H> type,
H handler,
java.lang.String handlerName)
|
|
|
addHandlerToSource(com.google.web.bindery.event.shared.Event.Type<H> type,
java.lang.Object source,
H handler)
|
|
void |
addManagedHandler(com.google.gwt.event.shared.HasHandlers managedHandler)
Adds the given managedHandler. |
|
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
|
|
void |
fireEventFromSource(com.google.gwt.event.shared.GwtEvent<?> event,
java.lang.Object source)
|
|
static ManagedEventBus |
getBus()
|
|
static java.util.HashSet<ManagedEventBusError> |
getManagedEventBusErrors()
Gets the managedEventBusErrors field value. |
|
static void |
logEvent(java.lang.String regClassName,
ManagedEvent<?> event,
boolean alert)
|
|
static void |
logEventAlert(java.lang.String regClassName,
ManagedEvent<?> event,
boolean alert)
|
|
static void |
registerManagedEvent(ManagedEvent<?> managedEvent)
Registers the given managedEvent. |
|
void |
removeManagedHandler(com.google.gwt.event.shared.HasHandlers managedHandler)
Removes the given managedHandler. |
|
static void |
setHub(Hub hub)
Sets the Hub instance used to publish and subscribe to the PageBus ManagedHub. |
|
static void |
setHub(Hub hub,
OnManagedEventBusErrorCallback onManagedEventBusErrorCallback)
Sets the Hub instance used to publish and subscribe to the PageBus ManagedHub. |
|
static void |
unRegisterManagedEvent(ManagedEvent<?> managedEvent)
Unregisters the given managedEvent. |
Methods inherited from class com.google.gwt.event.shared.SimpleEventBus |
---|
addHandler, addHandlerToSource, fireEvent, fireEventFromSource |
Methods inherited from class com.google.gwt.event.shared.EventBus |
---|
castFireEvent, castFireEventFromSource, wrap |
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 |
Method Detail |
---|
public static void logEvent(java.lang.String regClassName, ManagedEvent<?> event, boolean alert)
public static void logEventAlert(java.lang.String regClassName, ManagedEvent<?> event, boolean alert)
public static ManagedEventBus getBus()
public static void registerManagedEvent(ManagedEvent<?> managedEvent)
ManagedEvent.getTopic()
This can be called before or after calling setHub.
managedEvent
- The ManagedEvent instance being registered.
ManagedEventDuplicateException
public static void unRegisterManagedEvent(ManagedEvent<?> managedEvent)
This method throws ManagedEventNotRegisteredException if the ManagedEvent is not registered.
This can be called before or after calling setHub.
managedEvent
- The ManagedEvent instance being unregistered.
ManagedEventNotRegisteredException
public static void setHub(Hub hub)
The Hub instance must be connected prior to making this call.
A null value is passed for OnManagedEventBusErrorCallback.
hub
- The ManagedHub instance.setHub(Hub, OnManagedEventBusErrorCallback)
public static void setHub(Hub hub, OnManagedEventBusErrorCallback onManagedEventBusErrorCallback)
The Hub instance must be connected prior to making this call.
The given #OnManagedEventBusErrorCallback
is invoked if any
error is returned on subscribing to a ManagedEvent topic. This value may
be null. The getManagedEventBusErrors()
method can also be used to
check for subscription errors.
hub
- The connected Hub instance.onManagedEventBusErrorCallback
- The handler for subscribe errors. This value may be null.public static java.util.HashSet<ManagedEventBusError> getManagedEventBusErrors()
These errors can occur when calling one of the following ManagedEventBus methods:
More than one error may be added for a given failure. For example, if a subscription fails for an InlineHubClient the subscription will have a null handle. This will generate a "Null Subscription Handle" error in addition to the subscription failure error.
public <H> com.google.web.bindery.event.shared.HandlerRegistration addHandler(com.google.web.bindery.event.shared.Event.Type<H> type, H handler)
addHandler
in class com.google.gwt.event.shared.SimpleEventBus
public <H> com.google.web.bindery.event.shared.HandlerRegistration addHandler(com.google.web.bindery.event.shared.Event.Type<H> type, H handler, java.lang.String handlerName)
public <H> com.google.web.bindery.event.shared.HandlerRegistration addHandlerToSource(com.google.web.bindery.event.shared.Event.Type<H> type, java.lang.Object source, H handler)
addHandlerToSource
in class com.google.gwt.event.shared.SimpleEventBus
public void addManagedHandler(com.google.gwt.event.shared.HasHandlers managedHandler)
managedHandler
- A HasHandlers implementation to be added.public void removeManagedHandler(com.google.gwt.event.shared.HasHandlers managedHandler)
managedHandler
- A HasHandlers implementation to be removed.public void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
fireEvent
in interface com.google.gwt.event.shared.HasHandlers
fireEvent
in class com.google.gwt.event.shared.SimpleEventBus
public void fireEventFromSource(com.google.gwt.event.shared.GwtEvent<?> event, java.lang.Object source)
fireEventFromSource
in class com.google.gwt.event.shared.SimpleEventBus
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |