com.apelon.apelonserver.client
Class ServerConnectionSocket

java.lang.Object
  extended by com.apelon.apelonserver.client.ServerConnection
      extended by 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
           
 
Constructor Summary
ServerConnectionSocket(String host, int port)
          Establish a socket connection to a remote server.
 
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.
 
Methods inherited from class com.apelon.apelonserver.client.ServerConnection
ping, setQueryServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rtt

protected static long rtt
Constructor Detail

ServerConnectionSocket

public ServerConnectionSocket(String host,
                              int port)
                       throws ApelonException
Establish a socket connection to a remote server.

Parameters:
host - the name of the host
port - integer port number
Throws:
ApelonException - error
Method Detail

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.