|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.util.queue.StorageEventHandler
public abstract class StorageEventHandler
StorageEventHandler is base class for MapEventHandler and QueueEventHandler. There is exactly zero or one instance per StoragePluginManager, it hold all EventHelper instances (one for each configured rule for each EventPlugin) TODO: Should be one for each EventPlugin to support multiple eventPlugins using thresholds as the EventPlugin must be the listener for the events (to transport them to the configured sinks)
Field Summary | |
---|---|
static java.lang.String |
EVENT_HANDLER
|
protected I_EventDispatcher |
eventDispatcher
|
protected java.util.Map |
wantedEventsMap
Contains the configured eventTypes from EventPlugin (typically one only) |
Constructor Summary | |
---|---|
StorageEventHandler(I_EventDispatcher dispatcher)
|
Method Summary | |
---|---|
EventHelper |
generateEventHelper(StorageId storageId)
Create an EventHelper instance which matches exactly the given storageId (no wildcards). |
EventHelper[] |
getEventHelpers()
|
private EventHelper |
getMatchingEvent(EventHelper helper,
I_Storage storage)
Check if the given storageId matches any of the wanted events. |
boolean |
hasRegisteredEventHelpers()
|
void |
initialRegistration(java.util.Map storageMap)
Callback from StoragePluginManager on registration |
abstract void |
registerEventType(I_EventDispatcher dispatcher,
java.lang.String event)
Base class fills this.eventsHelperMap |
void |
registerListener(I_Storage storage)
|
void |
removeListener(I_Storage storage)
|
void |
removeListeners(java.util.Map storageMap)
|
void |
unRegisterEventHelpers(I_EventDispatcher l)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map wantedEventsMap
protected I_EventDispatcher eventDispatcher
public static final java.lang.String EVENT_HANDLER
Constructor Detail |
---|
public StorageEventHandler(I_EventDispatcher dispatcher)
Method Detail |
---|
public void registerListener(I_Storage storage) throws XmlBlasterException
XmlBlasterException
public void removeListener(I_Storage storage)
public void removeListeners(java.util.Map storageMap) throws XmlBlasterException
XmlBlasterException
public boolean hasRegisteredEventHelpers()
public EventHelper[] getEventHelpers()
public void unRegisterEventHelpers(I_EventDispatcher l)
private EventHelper getMatchingEvent(EventHelper helper, I_Storage storage) throws XmlBlasterException
helper
- The exact matching EventHelper (no wildcards) which wants to be notifiedstorage
- The storage to check
XmlBlasterException
public abstract void registerEventType(I_EventDispatcher dispatcher, java.lang.String event) throws XmlBlasterException
dispatcher
- event
-
XmlBlasterException
public void initialRegistration(java.util.Map storageMap) throws XmlBlasterException
storageMap
- The caller has synchronized the storageMap
XmlBlasterException
public EventHelper generateEventHelper(StorageId storageId) throws XmlBlasterException
storageId
-
XmlBlasterException
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |