|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bea.adapter.event.AbstractEventGenerator
com.bea.adapter.event.AbstractPushEventGenerator
The primary responsibilites of this class is to listen for events and call postEvents. The PostEvents method will be implemented in the concrete implementation.
| Field Summary |
| Fields inherited from class com.bea.adapter.event.AbstractEventGenerator |
m_setOfEventTypes |
| Constructor Summary | |
AbstractPushEventGenerator()
|
|
| Method Summary | |
protected void |
doCleanUpOnQuit()
Performs any clean-up needed once this object determines that it is time to quit running. |
void |
performPush(PushEvent e)
IPushListener implementation. |
protected abstract void |
postEvents(IEventRouter router,
PushEvent event)
Posts EIS events to the event router. |
protected abstract void |
removeDeadTypes(List listOfDeadTypes)
Allows this instance to apply any EIS specific setup logic needed to handle dead event types; an event type is considered dead if it is no longer in the list of event types known to the router. |
protected abstract void |
setupNewTypes(List listOfNewTypes)
Allows this instance to apply any EIS specific setup logic needed to handle new event types provided by the event router. |
void |
start()
Adds this object, as a listener, to any IPushHandlers created. |
void |
stop()
Removes this object, as a listener, from all IPushHandler objects |
| Methods inherited from class com.bea.adapter.event.AbstractEventGenerator |
assertValidLicense, checkLicense, createSetOfEventTypes, doInit, getEventDefinition, getEventTypes, getInitializationParms, getLogContext, getLogger, getRouter, getSleepCount, handlePostEventException, init, isEventTypeKnownToRouter, isInitialized, logDeadTypes, logEventTypes, logNewTypes, logPostEventException, refresh |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractPushEventGenerator()
| Method Detail |
protected abstract void postEvents(IEventRouter router,
PushEvent event)
throws Exception
isEventTypeKnownToRouter before processing an event because
this worker should not waste computing cycles on generating events that
the router does not care about. This method is invoked in a block of code
that is synchronized around the set of event types maintained by this
instance. Thus, any concurrent calls to the refresh from
another thread will need to wait until this method returns.
Iterator i = getEventTypes();
while (i.hasNext())
{
String strEventType = (String)i.next();
IEventDefinition eventDef = new EventDefinition();
eventDef.setName(strEventType);
IEvent event =
new Event("<" + strEventType + ">bogus" + strEventType + ">");
event.setEventDefinition(eventDef);
try
{
m_router.postEvent(event);
}
catch (Exception exc)
{
handlePostEventException(event, exc);
} // end try/catch
} // end while
Exceptionpublic void performPush(PushEvent e)
performPush in interface IPushListener
protected void doCleanUpOnQuit()
throws Exception
doCleanUpOnQuit in class AbstractEventGeneratorException - - an exceptional condition was encountered while
attempting to clean-up resources used by this instance.
public void start()
throws Exception
start in interface IEventGeneratorstart in class AbstractEventGeneratorException
public void stop()
throws Exception
stop in interface IEventGeneratorstop in class AbstractEventGeneratorException
protected abstract void setupNewTypes(List listOfNewTypes)
throws Exception
setupNewTypes in class AbstractEventGeneratorlistOfNewTypes - - a list of new types (IEventDefinition objects)that
were not in the set of event types maintained by this instance prior
to the refresh.
Exception
protected abstract void removeDeadTypes(List listOfDeadTypes)
throws Exception
removeDeadTypes in class AbstractEventGeneratorlistOfDeadTypes - - a list of event types (IEventDefinition objects)
that were not in the list of event types provided by the router and
were in the set maintained by this instance prior to the refresh.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||