|
Synapta Services Builder for CICS Version 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is the primary means of communication with connectors. The interface itself is generic, meaning that it does not make assumptions about the connector 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 abort the task. |
void |
close()
Releases all resources. |
void |
execute(java.lang.String taskID,
java.lang.String inputs)
Excute the task 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 task. |
int |
getTimeOut()
Returns the timeOut property. |
java.lang.String |
open(java.lang.String path)
Initializes the connector. |
void |
setMaxSize(int size)
Sets the maxSize property. |
void |
setTimeOut(int time)
Sets the timeOut property. |
Method Detail |
public java.lang.String open(java.lang.String path) throws com.attachmate.connectors.ConnectorAccessException
Initializes the connector. Must be successfully called prior to calling
execute()
com.attachmate.connectors.ConnectorAccessException
public void execute(java.lang.String taskID, java.lang.String inputs) throws com.attachmate.connectors.ConnectorAccessException
Excute the task identified by the taskID using the specified inputs.
If successful, call getData()
to retrieve results.
taskID
- correlates to a named serialized taskinputs
- String containing the inputs needed to accomplish specified task. The inputs must match the metadata if provided.
com.attachmate.connectors.ConnectorAccessException
public void cancel()
If execute()
was successful, then cancel will attempt to abort the task.
If the task is already complete, the retrieved data will be discarded.
public java.lang.String getData() throws com.attachmate.connectors.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().
com.attachmate.connectors.ConnectorAccessException
public void close() throws com.attachmate.connectors.ConnectorAccessException
Releases all resources.
After close has been called, open()
must be called
again prior to executing another task.
com.attachmate.connectors.ConnectorAccessException
public java.lang.String getMetaData(java.lang.String taskID) throws com.attachmate.connectors.ConnectorAccessException
Returns the metadata for the specified task. open()
must be called before the metadata will be available.
taskID
- indicates the specific task. If "-1", then metadata for all tasks is returned.
com.attachmate.connectors.ConnectorAccessException
public 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()
public 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.
-1
indicates all the data will be returned on the next call to getData().public 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.
size
- new value for the maxSize property. -1
indicates all the data will be returned on the next call to getData()
.public 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.
public 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.
time
- new value for the timeOut property.
|
Synapta Services Builder for CICS Version 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |