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 AbleDataBufferManager

All Superinterfaces:
  java.io.Serializable

All Known Subinterfaces:
  AbleAgent, AbleBean, AbleDataSink, AbleDataSource

All Known Implementing Classes:
  AbleAbstractImport, AbleDBExport, AbleDefaultAgent, AbleExport, AbleObject

public interface AbleDataBufferManager
extends java.io.Serializable

The AbleDataBufferManager interface describes the unique behavior required of AbleBeans which pass data using data buffers. A bean implementing this interface has either an inputBuffer, an outputBuffer, or both. Buffers are collections or arrays, and are not necessarily indexable. A bean expecting to process data via data buffers has dataflow enabled.

Method Summary
`void` | `addDestBufferConnection(AbleBufferConnection theAbleBufferConnection)` Adds a destination buffer connection.
`void` | `addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)` Adds a source buffer connection.
`java.util.Vector` | `getDestBufferConnections()` Returns the list of all destination (output) buffer connections.
`java.lang.Object` | `getInputBuffer()` Returns a reference to the input buffer.
`java.lang.Object` | `getInputBuffer(int theIndex)` Returns the value of a single element of the input buffer.
`java.lang.String` | `getInputBufferAsString()` Returns the contents of the input buffer as a String.
`java.lang.String[]` | `getInputBufferAsStringArray()` Returns the contents of the input buffer as an array of strings.
`java.util.Enumeration` | `getInputBufferContents()` Returns the contents of the input buffer as an enumeration.
`java.lang.Object` | `getOutputBuffer()` Returns a reference to the output buffer.
`java.lang.Object` | `getOutputBuffer(int theIndex)` Returns the value of a single element of the output buffer.
`java.lang.String` | `getOutputBufferAsString()` Returns the contents of the output buffer as a String.
`java.lang.String[]` | `getOutputBufferAsStringArray()` Returns the contents of the output buffer as an array of Strings.
`java.util.Enumeration` | `getOutputBufferContents()` Returns the contents of the output buffer as an enumeration.
`java.util.Vector` | `getSourceBufferConnections()` Returns a list of all source (input) buffer connections.
`boolean` | `hasInputBuffer()` Indicates if this bean has an input buffer.
`boolean` | `hasOutputBuffer()` Indicates if this bean has an output buffer.
`boolean` | `isConnectable()` Indicates if this bean supports buffer connections.
`boolean` | `isDataFlowEnabled()` Indicates if the bean will process data in buffers.
`void` | `processBufferConnections()` Processes all buffer connections.
`void` | `removeAllBufferConnections()` Remove all buffer connections whether source or destination.
`void` | `removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection)` Remove a destination buffer connection.
`void` | `removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)` Removes a source buffer connection.
`void` | `setDataFlowEnabled(boolean theDataFlowEnabledState)` Sets the data flow processing state of the bean.
`void` | `setInputBuffer(int theIndex, java.lang.Object theObject)` Sets the value of a single element of the input buffer.
`void` | `setInputBuffer(java.lang.Object theInputBuffer)` Sets the input buffer to the specified object.
`void` | `setOutputBuffer(int theIndex, java.lang.Object theObject)` Sets the value of a single element of the output buffer.
`void` | `setOutputBuffer(java.lang.Object theOutputBuffer)` Sets the output buffer to the specified object.

Method Detail

### setDataFlowEnabled

    public void setDataFlowEnabled(boolean theDataFlowEnabledState)

  Sets the data flow processing state of the bean. A bean implementing `AbleBeanContainer` should recalculate its processing list.

  Parameters:
    `theDataFlowEnabledState` - Indicates if this bean will process data in buffers. When set to true, this bean will be included in its parent's process list.

### isDataFlowEnabled

    public boolean isDataFlowEnabled()

  Indicates if the bean will process data in buffers.

  Returns:
    true if the bean will process data in buffers; false otherwise.

### setInputBuffer

    public void setInputBuffer(java.lang.Object theInputBuffer)
                        throws AbleException

  Sets the input buffer to the specified object.

  Parameters:
    `theInputBuffer` - Any object, such as a String[], Vector, Hashtable, and so on, that can act as a buffer of input data. A reference to the object is saved; the object is not cloned. Note that once the input buffer is set, it must not be tampered with while an AbleBean is reading data from it.

  Throws:
    `AbleException` - If an error occurs.

### getInputBuffer

    public java.lang.Object getInputBuffer()
                                    throws AbleException

  Returns a reference to the input buffer.

  Returns:
    A reference to the object that is the current input buffer, or null if no input buffer has been set.
  Throws:
    `AbleException` - If an error occurs.

### setInputBuffer

    public void setInputBuffer(int theIndex,
                               java.lang.Object theObject)
                        throws AbleException

  Sets the value of a single element of the input buffer.

  Parameters:
    `theIndex` - The location in the input buffer to be set to the specified value.

    `theObject` - The new value of the element at the specified location.

  Throws:
    `AbleException` - If the input buffer does not support indexing.

### getInputBuffer

    public java.lang.Object getInputBuffer(int theIndex)
                                    throws AbleException

  Returns the value of a single element of the input buffer.

  Parameters:
    `theIndex` - The location to retrieve from the input buffer.

  Returns:
    The object at the specified location, or null if no input buffer exists or if the location does not contain a value.

  Throws:
    `AbleException` - If the input buffer does not support indexing.

### hasInputBuffer

    public boolean hasInputBuffer()

  Indicates if this bean has an input buffer.

  Returns:
    true if the input buffer has been set; that is, the buffer is not null; otherwise false is returned.

### getInputBufferAsStringArray

    public java.lang.String[] getInputBufferAsStringArray()
                                                   throws AbleException

  Returns the contents of the input buffer as an array of strings.

  Returns:
    An array of string values of the input buffer, or null if no input buffer has been sent.
  Throws:
    `AbleException` - If the input buffer cannot be converted to an array of string values.

### getInputBufferAsString

    public java.lang.String getInputBufferAsString()
                                            throws AbleException

  Returns the contents of the input buffer as a String.

  Returns:
    A string representation of the input buffer, or null if no input buffer has been set.
  Throws:
    `AbleException` - If the input buffer cannot be converted to String.

### getInputBufferContents

    public java.util.Enumeration getInputBufferContents()
                                                 throws AbleException

  Returns the contents of the input buffer as an enumeration.

  Returns:
    An enumeration of values from the input buffer, or null if no input buffer has been set.
  Throws:
    `AbleException` - If the input buffer cannot be returned as an enumeration.

### setOutputBuffer

    public void setOutputBuffer(java.lang.Object theOutputBuffer)
                         throws AbleException

  Sets the output buffer to the specified object.

  Parameters:
    `theOutputBuffer` - Any object, such as a String[], Vector, Hashtable, and so on, that can act as a buffer of output data. A reference to the object is saved; the object is not cloned. Note that once the output buffer is set, it must not be tampered with while an AbleBean is writing data to it.

  Throws:
    `AbleException` - If an error occurs.

### getOutputBuffer

    public java.lang.Object getOutputBuffer()
                                     throws AbleException

  Returns a reference to the output buffer.

  Returns:
    A reference to the object that is the current output buffer, or null if no output buffer has been set.
  Throws:
    `AbleException` - If an error occurs.

### setOutputBuffer

    public void setOutputBuffer(int theIndex,
                                java.lang.Object theObject)
                         throws AbleException

  Sets the value of a single element of the output buffer.

  Parameters:
    `theIndex` - The location in the output buffer to be set to the specified value.

    `theObject` - The new value of the element at the specified location.

  Throws:
    `AbleException` - If the output buffer does not support indexing.

### getOutputBuffer

    public java.lang.Object getOutputBuffer(int theIndex)
                                     throws AbleException

  Returns the value of a single element of the output buffer.

  Parameters:
    `theIndex` - The location in the output buffer to be retrieved.

  Returns:
    The object at the specified location, or null if no output buffer exists or if the location does not contain a value.

  Throws:
    `AbleException` - If the output buffer does not support indexing.

### hasOutputBuffer

    public boolean hasOutputBuffer()

  Indicates if this bean has an output buffer.

  Returns:
    true if the output buffer has been set; that is, the buffer is not null; otherwise false is returned.

### getOutputBufferAsStringArray

    public java.lang.String[] getOutputBufferAsStringArray()
                                                    throws AbleException

  Returns the contents of the output buffer as an array of Strings.

  Returns:
    An array of string values of the output buffer, or null if no output buffer has been set.
  Throws:
    `AbleException` - If the output buffer cannot be converted to an array of String values.

### getOutputBufferAsString

    public java.lang.String getOutputBufferAsString()
                                             throws AbleException

  Returns the contents of the output buffer as a String.

  Returns:
    A string representation of the output buffer, or null if no output buffer has been set.
  Throws:
    `AbleException` - If the output buffer cannot be converted to String.

### getOutputBufferContents

    public java.util.Enumeration getOutputBufferContents()
                                                  throws AbleException

  Returns the contents of the output buffer as an enumeration.

  Returns:
    An enumeration of the output buffer, or null if no output buffer has been set.
  Throws:
    `AbleException` - If the output buffer cannot be returned as an enumeration.

### addSourceBufferConnection

    public void addSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)

  Adds a source buffer connection.

  Parameters:
    `theAbleBufferConnection` - An AbleBufferConnection object including a bean whose output buffer populates this bean's input buffer.

### removeSourceBufferConnection

    public void removeSourceBufferConnection(AbleBufferConnection theAbleBufferConnection)

  Removes a source buffer connection.

  Parameters:
    `theAbleBufferConnection` - The AbleBufferConnection object to be removed.

### getSourceBufferConnections

    public java.util.Vector getSourceBufferConnections()

  Returns a list of all source (input) buffer connections. Typically only one of these connections is to an active bean.

  Returns:
    All source buffer connections.

### addDestBufferConnection

    public void addDestBufferConnection(AbleBufferConnection theAbleBufferConnection)

  Adds a destination buffer connection.

  Parameters:
    `theAbleBufferConnection` - An AbleBufferConnection object including a bean whose input buffer is to be populated from this bean's output buffer.

### removeDestBufferConnection

    public void removeDestBufferConnection(AbleBufferConnection theAbleBufferConnection)

  Remove a destination buffer connection.

  Parameters:
    `theAbleBufferConnection` - The AbleBufferConnection object to be removed.

### getDestBufferConnections

    public java.util.Vector getDestBufferConnections()

  Returns the list of all destination (output) buffer connections.

  Returns:
    All destination buffer connections.

### isConnectable

    public boolean isConnectable()

  Indicates if this bean supports buffer connections.

  Returns:
    true if this bean supports buffer connections; false otherwise.

### processBufferConnections

    public void processBufferConnections()
                                  throws AbleException

  Processes all buffer connections. Moves data from connected source beans' outputBuffers to this bean's inputBuffer.

  Throws:
    `AbleException` - If an error occurs.

### removeAllBufferConnections

    public void removeAllBufferConnections()

  Remove all buffer connections whether source or destination.

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