Verastream Transaction Integrator 4.0

com.attachmate.connectors
Interface IConnectorAccess


public interface IConnectorAccess

This interface is an alternate means to communication with the Transaction Integrator. The interface itself is generic, meaning that it does not make assumptions about the service implementation, type of data being accessed or any communications or transport mechanisms.

A general synchronous scenario would be something like:


Method Summary
 void cancel()
           If execute() was successful, then cancel will attempt to terminate the client operation.
 void close()
           Releases all resources.
 void execute(java.lang.String taskID, java.lang.String inputs)
           Execute the client operation identified by the taskID using the specified inputs.
 int getAvailable()
           Returns the amount of data left after a successful call to execute.
 java.lang.String getData()
           If execute() was successful, then getData returns XML containing the retrieved data.
 int getMaxSize()
           Returns the maxSize property.
 java.lang.String getMetaData(java.lang.String taskID)
          Returns the metadata for the specified client operation.
 int getTimeOut()
           Returns the timeOut property.
 java.lang.String open(java.lang.String path)
          Note: this method is no longer required, and performs no action.
 void setMaxSize(int size)
           Sets the maxSize property.
 void setTimeOut(int time)
           Sets the timeOut property.
 

Method Detail

open

java.lang.String open(java.lang.String path)
                      throws ConnectorAccessException

Note: this method is no longer required, and performs no action.

Parameters:
this - value is ignored at runtime
Returns:
Returns the version of the data referenced by the path argument
Throws:
ConnectorAccessException

execute

void execute(java.lang.String taskID,
             java.lang.String inputs)
             throws ConnectorAccessException

Execute the client operation identified by the taskID using the specified inputs.
If successful, call getData() to retrieve results.

Parameters:
taskID - correlates to a named client operation
inputs - String containing the inputs needed to accomplish specified client operation. The inputs must match the metadata of the client operation.
Throws:
ConnectorAccessException

cancel

void cancel()

If execute() was successful, then cancel will attempt to terminate the client operation.
If the client operation is already complete, the retrieved data will be discarded.


getData

java.lang.String getData()
                         throws ConnectorAccessException

If execute() was successful, then getData returns XML containing the retrieved data.
The maximum amount of data that may be returned is specified by maxSize()
To determine if more data is available, call getAvailable().

Returns:
Returns an XML string containing requested data. Use getMetaData to get the details of the XML data format.
Throws:
ConnectorAccessException

close

void close()
           throws ConnectorAccessException

Releases all resources. After close has been called, open() must be called again prior to executing another client operation.

Throws:
ConnectorAccessException

getMetaData

java.lang.String getMetaData(java.lang.String taskID)
                             throws ConnectorAccessException

Returns the metadata for the specified client operation. open() must be called before the metadata will be available.

Parameters:
taskID - indicates the specific client operation. The name of any valid client operation that has been deployed to the execution environment can be supplied.
Returns:
An XML string containing the client operation metadata
Throws:
ConnectorAccessException

getAvailable

int getAvailable()

Returns the amount of data left after a successful call to execute.
The maximum amount of data that may be returned by any one call to getData() is specified by maxSize()

Returns:
The amount of data remaining.

getMaxSize

int getMaxSize()

Returns the maxSize property. MaxSize is the maximum amount of data that may be returned by calling getData(). Less data may be returned.

Returns:
The value of the maxSize property. -1 indicates all the data will be returned on the next call to getData().

setMaxSize

void setMaxSize(int size)

Sets the maxSize property. MaxSize is the maximum amount of data that may be returned by calling getData(). Less data may be returned.

Parameters:
size - new value for the maxSize property. -1 indicates all the data will be returned on the next call to getData().

getTimeOut

int getTimeOut()

Returns the timeOut property. The default is -1, which indicates no time out. The execute() method will return after the timeout has expired regardless of how much data has been retrieved.

Returns:
timeout value in milliseconds.

setTimeOut

void setTimeOut(int time)

Sets the timeOut property. The default is -1, which indicates no time out. The execute() method will return after the timeout has expired regardless of how much data has been retrieved.

Parameters:
time - new value for the timeOut property.

Verastream Transaction Integrator 4.0