Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:

1. Methods to add and remove event connections, which are serializable event listeners.
2. 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.
3. Methods to get the number of epochs, which is the number of times the active data source has had all its records processed.
4. 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.

Method Summary
`void` | `addEventConnection(AbleEventConnection theConnection)` Adds an event connection.
`AbleDataSource` | `getDataSource()` Returns the current active DataSource from the contained beans, null if none.
`java.util.Vector` | `getEventConnections()` Returns event connections used by this agent.
`long` | `getNumEpochs()` Returns the number of training epochs, which is the number of times an active data source has had all its records processed.
`java.util.Vector` | `getProcessList()` Returns the sequential processing list for data buffer processing.
`boolean` | `isActiveDataSource()` Indicates if this agent has an active data source.
`void` | `removeAllEventConnections()` Remove all event connections.
`void` | `removeEventConnection(AbleEventConnection theConnection)` Removes an event connection.
`void` | `setActiveDataSource(boolean theState)` Sets the flag indicating if this agent contains an active data source.
`void` | `setProcessList(java.util.Vector theProcessList)` Set the sequential list of beans to process.

Methods inherited from interface com.ibm.able.AbleBean
`getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, init, init, isChanged, process, process, quitAll, removeAllConnections, removeProperty, reset, resumeAll, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger, suspendAll`

Methods inherited from interface com.ibm.able.AbleDataBufferManager
`addDestBufferConnection, addSourceBufferConnection, getDestBufferConnections, getInputBuffer, getInputBuffer, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getSourceBufferConnections, hasInputBuffer, hasOutputBuffer, isConnectable, isDataFlowEnabled, processBufferConnections, removeAllBufferConnections, removeDestBufferConnection, removeSourceBufferConnection, setDataFlowEnabled, setInputBuffer, setInputBuffer, setOutputBuffer, setOutputBuffer`

Methods inherited from interface com.ibm.able.AbleEventListener
`handleAbleEvent`

Methods inherited from interface com.ibm.able.AbleEventListenerManager
`addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener`

Methods inherited from interface com.ibm.able.AbleEventQueueManager
`flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing`

Methods inherited from interface com.ibm.able.AbleEventQueueProcessor
`processAbleEvent, processNoEventProcessingEnabledSituation, processTimerEvent`

Methods inherited from interface com.ibm.able.AblePropertyChangeManager
`addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection`

Methods inherited from interface com.ibm.able.AbleSerializable
`getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName`

Methods inherited from interface com.ibm.able.AbleBeanContainer
`addBean, containsBean, containsBean, getBean, getBeans, getName, initAllBeans, removeAllBeans, removeBean, removeBean, resetAllBeans`

Methods inherited from interface com.ibm.able.AbleUserDefinedFunctionManager
`addUserDefinedFunction, containsUserDefinedFunction, getUserDefinedFunction, getUserDefinedFunctions, invokeUserDefinedFunction, removeUserDefinedFunction, setUserDefinedFunctions`

Method Detail

### 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.

### getEventConnections

    public java.util.Vector getEventConnections()

  Returns event connections used by this agent.

  Returns:
    Vector of AbleEventConnection objects. If there are no event connections, a Vector of 0 elements will be returned.
  See Also:
    `AbleEventConnection`

### 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.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005