The Synapta Services Builder COM Interface exposes a native implementation of IConnectorAccess.
For details on IConnectorAccess, see Javadocs for Attachmate Interfaces.
Open
HRESULT open([in]BSTR path, [out, retval] BSTR * version )
Initializes the connector for task execution. This method must be called prior to executing a task.
Syntax
version = connector.open(path)
Input Parameters
Name Description Type path A path to the task file to open. This can be a file or a URL. String Output Parameters
Name Description Type version The version of the task file. String
Close
HRESULT close()
Releases all resources associated with the current task file. After close has been called, you must call
open()
again before executing another task.Syntax
connector.close()
GetMetaData
HRESULT getMetaData([in]BSTR taskId, [out, retval] BSTR * metadata)
Returns the metadata for the specified task.
Open()
must be called before the metadata will be available.Syntax
metadata = connector.getMetaData(taskId)
Input Parameters
Name Description Type taskId The name of the task. If "-1", then metadata for all tasks is returned. String Output Parameters
Name Description Type metaData XML string containing the task metadata String
GetTimeOut
HRESULT getTimeOut( [out, retval] long * timeout)
Gets the task timeout value. The default is -1, which indicates no timeout. The
execute()
method will return after the timeout has expired, even if the task hasn't finished.Syntax
timeout = connector.getTimeOut()
Output Parameters
Name Description Type timeOut The timeout value in milliseconds. 32-bit Integer
SetTimeOut
HRESULT setTimeOut( [in] long timeout)
Sets the task timeout value. The default is -1, which indicates no timeout. The
execute()
method will return after the timeout has expired, even if the task hasn't finished.Syntax
connector.setTimeOut(timeOut)
Input Parameters
Name Description Type timeOut The timeout value in milliseconds. 32-bit Integer
Execute
HRESULT execute( [in] BSTR taskId, [in] BSTR inputs)
Executes the specified task. If the execution is successful, the results can be retrieved with a call to
getData()
.Syntax
connector.execute(taskId, inputs)
Input Parameters
Name Description Type taskID The task name. String inputs The XML inputs for the task. String
Cancel
HRESULT cancel()
If
execute()
was successful, this method attempts to stop the task. If the task is already complete, then the retrieved data will be discarded.Syntax
connector.cancel()
GetAvailable
HRESULT getAvailable([out, retval] long * available)
Returns the amount of data available after a successful call to execute. The maximum amount of data that may be returned by any one call to
getData()
is specified by themaxSize()
property.Syntax
available = connector.getAvailable()
Output Parameters
Name Description Type available The amount of data remaining. 32-bit Integer
GetMaxSize
HRESULT getMaxSize([out, retval] long * size)
Returns the maximum amount of data that may be returned by any one call to
getData()
.Syntax
size = connector.getMaxSize()
Output Parameters
Name Description Type size The maximum amount of data that may be returned by any one call to getData()
.32-bit Integer
SetMaxSize
HRESULT setMaxSize([in] long * size)
Sets the maximum amount of data that may be returned by any one call to
getData()
.Syntax
size = connector.setMaxSize()
Output Parameters
Name Description Type size The maximum amount of data that may be returned by any one call to getData()
.32-bit Integer
GetData
HRESULT getData([out, retval] BSTR * data)
If
execute()
was successful, thengetData()
returns the XML result set for the task. The maximum amount of data that may be returned is specified by themaxSize()
property.Syntax
data = connector.getData()
Output Parameters
Name Description Type data The XML results of the task execution. String
![]() |
|
![]() |
Using Native Win32 Technologies |
![]() |
COM Interface Sample Application |
![]() |
Javadocs for Attachmate Interfaces |
![]() |