public class OCSClient extends Object
| Constructor and Description |
|---|
OCSClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(String host,
int port)
Connects to the specified Host and Port.
|
void |
disconnect()
Closes the current connection.
|
boolean |
isClosed()
Returns true iff the OCS socket is currently closed.
|
String |
sendMessage(String message)
Send a message through the OCS socket using the default timeout as
specified in the Alpaca properties file.
|
String |
sendMessage(String message,
int timeout)
Send a message through the OCS socket specifying the timeout.
|
public static final String ENCODING
public void connect(String host, int port) throws IOException
host - port - ExceptionIOExceptionpublic void disconnect()
throws IOException
ExceptionIOExceptionpublic boolean isClosed()
public String sendMessage(String message) throws Exception
message - ExceptionCopyright © 2016 ECG. All rights reserved.