com.ibm.able
Interface AbleAgent
- All Superinterfaces:
- AbleBean, AbleBeanContainer, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, AbleUserDefinedFunctionManager, java.io.Serializable
- All Known Implementing Classes:
- AbleDefaultAgent
- public interface AbleAgent
- extends AbleBean, AbleBeanContainer, AbleUserDefinedFunctionManager
The AbleAgent interface provides methods to manipulate contained beans,
determine the agent's input structure,
and maintain a registry of user-definable methods on those beans.
Implementors must provide:
- Methods to add and remove event connections, which are serializable event listeners.
- Methods to set and get a flag indicating there is a contained bean that is the currently active datasource,
and a method to get that datasource to allow other agents to learn its inputBuffer structure.
- Methods to get the number of epochs, which is the number of times the active data source
has had all its records processed.
- Methods to set and get the process list, which is a subset of contained
beans using data buffer processing in the order they are to be processed.
If there is an active datasource, it is the first bean in the list.
Methods inherited from interface com.ibm.able.AbleBean |
getComment, getLogger, getName, getParent, getState, getTraceLogger, init, init, isChanged, process, process, quitAll, removeAllConnections, reset, resumeAll, setChanged, setComment, setLogger, setName, setParent, setState, setTraceLogger, suspendAll |
Methods inherited from interface com.ibm.able.AbleDataBufferManager |
addDestBufferConnection, addSourceBufferConnection, getDestBufferConnections, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getSourceBufferConnections, hasInputBuffer, hasOutputBuffer, isConnectable, isDataFlowEnabled, processBufferConnections, removeAllBufferConnections, removeDestBufferConnection, removeSourceBufferConnection, setDataFlowEnabled, setInputBuffer, setInputBuffer, setOutputBuffer, setOutputBuffer |
Methods inherited from interface com.ibm.able.AbleEventQueueManager |
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing |
setActiveDataSource
public void setActiveDataSource(boolean theState)
throws AbleException
- Sets the flag indicating if this agent contains an active data source.
- Parameters:
theState
- The state is true
if the agent contains
an active data source, and false
otherwise.- Throws:
AbleException
- If an error occurs.
isActiveDataSource
public boolean isActiveDataSource()
throws AbleException
- Indicates if this agent has an active data source.
- Returns:
true
if agent contains an active data source;
false
otherwise.- Throws:
AbleException
- If an error occurs.
getDataSource
public AbleDataSource getDataSource()
throws AbleException
- Returns the current active DataSource from the contained beans,
null if none.
- Returns:
- The current active data source
- Throws:
AbleException
- If an error occurs.
addEventConnection
public void addEventConnection(AbleEventConnection theConnection)
throws AbleException
- Adds an event connection.
- Parameters:
theConnection
- The connection to add.- Throws:
AbleException
- If an error occurs.
removeEventConnection
public void removeEventConnection(AbleEventConnection theConnection)
throws AbleException
- Removes an event connection.
- Parameters:
theConnection
- The connection to remove.- Throws:
AbleException
- If an error occurs.
The implementor may choose to throw
an exception if the connection does not exist.
removeAllEventConnections
public void removeAllEventConnections()
throws AbleException
- Remove all event connections.
- Throws:
AbleException
- If an error occurs.
setProcessList
public void setProcessList(java.util.Vector theProcessList)
throws AbleException
- Set the sequential list of beans to process. While the agent will
maintain this list as beans are added and removed, it may be that
some applications would prefer to set the list directly whether to
control the overhead, or explicitly sequence the list. For example,
the active datasource may be connected to three beans. After the
datasource is processed, the sequence in which those three beans
are processed is arbitrary. It may be that your agent would
want a specific sequence, and in that case it would be appropriate
to use this method rather than rely on the default sequence.
A property change event is fired to registered listeners.
- Parameters:
theProcessList
- The list of beans in the sequence to be processed.- Throws:
AbleException
- If an error occurs.
getProcessList
public java.util.Vector getProcessList()
throws AbleException
- Returns the sequential processing list for data buffer processing.
If there is an active datasource, it is the first bean in the list.
- Returns:
- The ordered list of beans to process.
- Throws:
AbleException
- If an error occurs.
getNumEpochs
public long getNumEpochs()
throws AbleException
- Returns the number of training epochs, which is the number of
times an active data source has had all its records processed.
An agent's reset method should set this value back to zero.
An agent which does require epoch count should return zero.
- Returns:
- The number of epochs.
- Throws:
AbleException
- If an error occurs.
(C) Copyright IBM Corporation 1999, 2003