public class DefaultCockpitEventQueue extends Object implements CockpitEventQueue
| Constructor and Description |
|---|
DefaultCockpitEventQueue() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkScope(ScopeContext currentContext,
ListenerInfo listenerInfo) |
List<CockpitEvent> |
fetchEvents(String widgetID)
Returns all events available for the specified widget and removes them from the queue.
|
protected ScopeContext |
getCurrentScopeContext() |
void |
publishEvent(CockpitEvent event)
Adds an event to the event queue.
|
void |
registerListener(String widgetID,
String eventName,
String scope)
Registers the widget as a listener for the specified event.
|
void |
removeListener(String widgetID)
Remove the specified widget from the set of listeners.
|
void |
setCockpitUserService(CockpitUserService cockpitUserService) |
public void publishEvent(CockpitEvent event)
CockpitEventQueuepublishEvent in interface CockpitEventQueueevent - The event to publish.protected boolean checkScope(ScopeContext currentContext, ListenerInfo listenerInfo)
protected ScopeContext getCurrentScopeContext()
public List<CockpitEvent> fetchEvents(String widgetID)
CockpitEventQueuefetchEvents in interface CockpitEventQueuewidgetID - The widget for which the events should be fetched.public void registerListener(String widgetID, String eventName, String scope)
CockpitEventQueueregisterListener in interface CockpitEventQueuewidgetID - A string that represents the widget.eventName - A string that defines the event.public void removeListener(String widgetID)
CockpitEventQueueremoveListener in interface CockpitEventQueuewidgetID - The widget to remove from the listeners.public void setCockpitUserService(CockpitUserService cockpitUserService)
Copyright © 2018. All rights reserved.