Integratec API Platform
void opJavaApi.OPClientConnection.open ( String  ip,
int  port,
OPStatusCallback  callback 
) throws OPException

Opens and registers a client connection to a master.

Parameters
[in]ipMaster IP address, host name or endpoint.
[in]portMaster TCP port.
[in]callbackCallback function that receives status updates for in progress requests.
Exceptions
OPException
Usage
Specify the master IP address, host name or endpoint using the ip parameter and the master TCP port using the port parameter.
When specifying an endpoint, the ip parameter must be of the form tcp://host:port and the port parameter must be 0.
To close the client connection, call close. The client connection is automatically closed when the instance is destroyed.
If the callback function is specified, it receives status updates for in progress requests.
Callback Example:
// Implement an example callback to print the id and status given
class StatusCallback implements OPStatusCallback {
@Override
public void statusCallback(int connection, WString id, WString statusMsg) {
System.out.println(id);
System.out.println(statusMsg);
}
}
See also
close and isOpen