com.eventgnosis.sources
Class EventSourceListenerBase

java.lang.Object
  extended bycom.eventgnosis.system.SystemObject
      extended bycom.eventgnosis.sources.EventSourceListenerBase
All Implemented Interfaces:
InputEvents

public abstract class EventSourceListenerBase
extends SystemObject
implements InputEvents

Base class for source system objects, those system objects that read from external protocols/devices/systems.
Each source system object must extend this class.


Field Summary
 
Fields inherited from class com.eventgnosis.system.SystemObject
CONFIG_MGR, DEST_CREATION_MGR, DEST_MGR, DOWN, ERROR, FILTER_STACK_MGR, HIER_SEP, INITIALIZING, MAX_LEVELS, QUEUE_MGR, SHUTTINGDOWN, SRC_ADAPTER_MGR, SRC_LISTENER_MGR, STARTED, statusMap, UNKNOWN, UP
 
Constructor Summary
EventSourceListenerBase()
           
 
Method Summary
abstract  java.lang.String connect()
          Establishes the remote communications connection.
Can be called to create the first connection as well as to reconnect after disconnection.
 SystemObject createDestination(Event ev)
          Must be overridden for each of the base types of system objects.
This method finds successor system object for event flow based on emml configuration(called destination name).
abstract  java.lang.String disconnect()
          Disconnects the remote connection.
 java.lang.String doWork(long timeout)
          Do work for all child members as a generic default.
Each SystemObject can have its own member children, thread, and/or event processors.
If object is not yet started, starts it up.
abstract  java.lang.String getProtocolName()
           
 
Methods inherited from class com.eventgnosis.system.SystemObject
addMember, checkForLock, continueOperation, findObject, getCanDelete, getConfig, getConfigMgr, getConfigXml, getDestination, getDestinationInfo, getDestinationName, getDestName, getEventStatisticsXml, getEventStats, getEventStream, getLog, getMember, getMember, getMyManager, getName, getNumMembers, getObjectId, getQueueStatisticsXml, getRuntimeXml, getShutdownTime, getStartTime, getStatus, getStatusAsString, getSummaryXml, getThreadName, getToString, installChildByName, isDisabled, isLocked, kill, locateObject, processEvent, removeAllMembers, removeMember, removeSelf, setCanDelete, setConfigMgr, setDestination, setDestinationName, setLocked, setStartupErrors, setUnlocked, setVars, shutdown, startupErrors, submit, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.eventgnosis.system.InputEvents
getNextEvent
 

Constructor Detail

EventSourceListenerBase

public EventSourceListenerBase()
Method Detail

connect

public abstract java.lang.String connect()
Establishes the remote communications connection.
Can be called to create the first connection as well as to reconnect after disconnection.

Returns:
errorStr null if no error; otherwise, delineates error

createDestination

public SystemObject createDestination(Event ev)
Description copied from class: SystemObject
Must be overridden for each of the base types of system objects.
This method finds successor system object for event flow based on emml configuration(called destination name).

Overrides:
createDestination in class SystemObject
Parameters:
ev - Event - in case destination creation depends on event contents (dynamic destination creation). This is currently not supported.
Returns:
destination SystemObject on witch submit(event) will be called

disconnect

public abstract java.lang.String disconnect()
Disconnects the remote connection.

Returns:
errorStr null if no error; otherwise, delineates error

doWork

public java.lang.String doWork(long timeout)
Description copied from class: SystemObject
Do work for all child members as a generic default.
Each SystemObject can have its own member children, thread, and/or event processors.
If object is not yet started, starts it up.

Overrides:
doWork in class SystemObject
Parameters:
timeout - The timeout in milliseconds by which the call it to return. This is an advisory number that is implementation specific.

getProtocolName

public abstract java.lang.String getProtocolName()