|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.host.client.interfaces.HostClientService
public abstract class HostClientService
HostClientService provides a framework of methods for managing communication with a Sentilla host server.
Field Summary | |
---|---|
private static boolean |
DEBUG
|
Constructor Summary | |
---|---|
HostClientService()
|
Method Summary | |
---|---|
abstract boolean |
connect()
Attempt to open a socket connection to the host server This call will use the default server host and port, unless previously given in the HostClient constructor. |
abstract boolean |
connect(String host,
int port)
Attempt to open a socket connection to the host server using the given server host and port. |
abstract boolean |
connect(String host,
int port,
int timeout)
Attempt to open a socket connection to the host server using the given server host, port and timeout. |
abstract void |
disconnect()
Disconnect from the server |
abstract int |
getDebug()
Get debug logging level |
abstract String |
getHost()
Returns the current server hostname |
abstract int |
getPort()
Returns the current server port |
abstract boolean |
isConnected()
Is this HostClient currently connected to the server? |
Object |
processMessage(HostMessage msg)
Method which handles actual command communication with the hostserver. |
Object |
processNetworkMessage(HostMessage msg)
Method which handles actual network communication with the hostserver. |
abstract void |
setDebug(int debugLevel)
Set debug logging level |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static boolean DEBUG
Constructor Detail |
---|
public HostClientService()
Method Detail |
---|
public abstract boolean connect() throws UnknownHostException, IOException
UnknownHostException
IOException
public abstract boolean connect(String host, int port) throws UnknownHostException, IOException
host
- the host server addressport
- the host server port number
UnknownHostException
IOException
public abstract boolean connect(String host, int port, int timeout) throws UnknownHostException, IOException
host
- the host server addressport
- the host server port numbertimeout
- the number of milliseconds to wait for a connection
UnknownHostException
IOException
public abstract void disconnect() throws IOException
IOException
public abstract String getHost()
public abstract int getPort()
public abstract void setDebug(int debugLevel)
public abstract int getDebug()
public abstract boolean isConnected()
public Object processMessage(HostMessage msg) throws IOException
msg
- the message object to send to the server.
IOException
- throws IOException on communication errorspublic Object processNetworkMessage(HostMessage msg) throws IOException
msg
- the message object to send to the server.
IOException
- throws IOException on communication errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |