com.apelon.apelonserver.client
Class ServerConnectionSocket
java.lang.Object
com.apelon.apelonserver.client.ServerConnection
com.apelon.apelonserver.client.ServerConnectionSocket
- Direct Known Subclasses:
- ServerConnectionSecureSocket, TransientSCSocket
public class ServerConnectionSocket
- extends ServerConnection
A ServerConnectionSocket establishes a connection to
a running socket based server.
The remote socket server must be started independently.
Use the following code to establish a connection:
ServerConnection sc = new ServerConnectionSocket(host, port);
- Version:
- 1.0.0
- Author:
- Apelon, Inc.
Field Summary |
protected static long |
rtt
|
Method Summary |
void |
close()
Close the socket connection. |
protected String |
executeQueryRemote(String query)
|
String |
toString()
Put this method in so that we can call toString on the server connection
and retrieve a nice string to place into a status area about the host
and port. |
rtt
protected static long rtt
ServerConnectionSocket
public ServerConnectionSocket(String host,
int port)
throws ApelonException
- Establish a socket connection to a remote server.
- Parameters:
host
- the name of the hostport
- integer port number
- Throws:
ApelonException
- error
executeQueryRemote
protected String executeQueryRemote(String query)
throws ApelonException
- Specified by:
executeQueryRemote
in class ServerConnection
- Throws:
ApelonException
close
public void close()
throws Exception
- Close the socket connection.
- Overrides:
close
in class ServerConnection
- Throws:
Exception
- if there is an error during close of socket
toString
public String toString()
- Put this method in so that we can call toString on the server connection
and retrieve a nice string to place into a status area about the host
and port.
Creation date: (5/18/2000 3:11:50 PM)
- Overrides:
toString
in class Object
- Returns:
- java.lang.String
Copyright © 2011. All Rights Reserved.