|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.adapter.event.AbstractEventGenerator
Provides a base implementation of an event generator; an event generator is responsible for polling for an Event and posting an Event to the Event router.
Field Summary | |
protected java.util.HashSet |
m_setOfEventTypes
|
Constructor Summary | |
AbstractEventGenerator()
|
Method Summary | |
protected void |
assertValidLicense()
Verifies the existence of a valid license for this adapter; if there is no valid license available, this method throws an exception to prevent the instantiation of a ManagedConnectionFactory object. |
protected ValidationResult |
checkLicense()
Returns true if the adapter can locate a valid license in the runtime environment. |
protected java.util.HashSet |
createSetOfEventTypes(java.util.Set currentSetOfEventTypes,
java.util.List listOfNewTypes,
java.util.List listOfDeadTypes)
Creates a set of event types that are known to the router. |
protected abstract void |
doCleanUpOnQuit()
Performs any clean-up needed once this object determines that it is time to quit running. |
protected abstract void |
doInit(java.util.Map map)
EIS specific initialization, only called once. |
protected IEventDefinition |
getEventDefinition(java.lang.String strEventType)
|
protected java.util.Iterator |
getEventTypes()
|
protected java.util.Map |
getInitializationParms()
Accessor for initialization parms |
LogContext |
getLogContext()
Retrieves an object that determines the logging configuration for this instance in the logging framework. |
ILogger |
getLogger()
Retrieves an object used to log information to. |
protected IEventRouter |
getRouter()
Accessor for router object. |
protected long |
getSleepCount()
Accessor for sleep count |
protected void |
handlePostEventException(IEvent event,
java.lang.Exception exc)
Convenience method to handle an exception while posting an event; currently this method invokes logPostEventException. |
void |
init(IEventRouter router,
java.util.Map map)
intializes the EventGenerator. |
protected boolean |
isEventTypeKnownToRouter(java.lang.String strEventType)
|
boolean |
isInitialized()
Validation method. |
protected void |
logDeadTypes(java.util.List listOfDeadTypes)
Logs the list of dead types as information |
protected void |
logEventTypes(ILogger logger,
java.util.Set setOfEventTypes)
Convenience method for event type logging |
protected void |
logNewTypes(java.util.List listOfNewTypes)
Logs the list of new types as information |
protected void |
logPostEventException(IEvent event,
java.lang.Exception exc)
Convenience method for logging an exception that occured while attempting to post an event to the event router. |
void |
refresh()
Refreshes the set of event types known to this worker. |
protected abstract void |
removeDeadTypes(java.util.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(java.util.List listOfNewTypes)
Allows this instance to apply any EIS specific setup logic needed to handle new event types provided by the event router. |
abstract void |
start()
Starts the EventGenerator |
abstract void |
stop()
Stops the Event Generator |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.HashSet m_setOfEventTypes
Constructor Detail |
public AbstractEventGenerator()
Method Detail |
public void init(IEventRouter router, java.util.Map map) throws java.lang.Exception
IEventRouter
- routerMap
- initialization parmspublic boolean isInitialized()
protected abstract void doInit(java.util.Map map) throws java.lang.Exception
protected IEventRouter getRouter()
protected java.util.Map getInitializationParms()
protected long getSleepCount()
public LogContext getLogContext()
public ILogger getLogger()
protected abstract void doCleanUpOnQuit() throws java.lang.Exception
protected boolean isEventTypeKnownToRouter(java.lang.String strEventType)
strEventType
is known to the event router. If
an event type is known to the router, it should be posted to the router.protected IEventDefinition getEventDefinition(java.lang.String strEventType)
strEventType
if present in our set of event types; null if not.protected java.util.Iterator getEventTypes()
protected void logEventTypes(ILogger logger, java.util.Set setOfEventTypes)
protected void logNewTypes(java.util.List listOfNewTypes)
protected void logDeadTypes(java.util.List listOfDeadTypes)
protected java.util.HashSet createSetOfEventTypes(java.util.Set currentSetOfEventTypes, java.util.List listOfNewTypes, java.util.List listOfDeadTypes)
currentSetOfEventTypes
- - a snapshot of the current set of event
types configured for this event generator; can be nulllistOfNewTypes
- - this method will add any types found in the
list provided by the router not currently in the set of types known to this
worker if this parameter is not null.listOfDeadTypes
- - this method will add any types not found in the
list of event types provided by the router and were in the set maintained
by this instance prior to the refresh.public void refresh() throws java.lang.Exception
setupNewTypes
. Similarly, if there are any event types that
were previously known this worker that are no longer used by the router,
this method invokes the removeDeadTypes
method.
protected void handlePostEventException(IEvent event, java.lang.Exception exc)
protected void logPostEventException(IEvent event, java.lang.Exception exc)
protected void assertValidLicense() throws java.lang.Exception
ManagedConnectionFactory
object. Adapter
developers should override the checkLicense
method to perform
the adapter specific license check.
protected ValidationResult checkLicense()
ValidationResult
object may or may not
have additional information associated with it. The additional information
is used to generate a "better" exception on a failed validation attempt.public abstract void start() throws java.lang.Exception
public abstract void stop() throws java.lang.Exception
protected abstract void setupNewTypes(java.util.List listOfNewTypes)
listOfNewTypes
- - a list of new types (IEventDefinition objects)that
were not in the set of event types maintained by this instance prior
to the refresh.protected abstract void removeDeadTypes(java.util.List listOfDeadTypes)
listOfDeadTypes
- - 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.
|
WebLogic Integration | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |