gov.sandia.ccaffeine.dc.user_iface.applet
Class RemoteServer

java.lang.Object
  extended by gov.sandia.ccaffeine.dc.user_iface.applet.RemoteServer

public class RemoteServer
extends java.lang.Object

A confusing name: RemoteServer is an object that stands for a Remote server.


Field Summary
protected  long numberOfMillisecondsBetweenConnectionAttempts
           
protected  int numberOfTimesWeTryToConnectToCca
           
protected  int timeout
           
 
Constructor Summary
RemoteServer()
           
 
Method Summary
 void createConnection()
          Connect to the cca MUXER.
 java.lang.String getHost()
          Get the host name for the server.
 java.io.InputStream getInputStream()
          Get the InputStream to the server.
 java.io.OutputStream getOutputStream()
          Get the OutputStream from the server.
 int getPort()
          Get the port for the server.
 int getTimeout()
          Get the number of milliseconds a read operation will wait.
 void setHost(java.lang.String host)
          Set the host name for the server.
 void setPort(int serverPort)
          Set the port for the server.
 void setTimeout(int timeout)
          Set the number of milliseconds a read operation will wait.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfTimesWeTryToConnectToCca

protected final int numberOfTimesWeTryToConnectToCca
See Also:
Constant Field Values

numberOfMillisecondsBetweenConnectionAttempts

protected final long numberOfMillisecondsBetweenConnectionAttempts
See Also:
Constant Field Values

timeout

protected int timeout
Constructor Detail

RemoteServer

public RemoteServer()
Method Detail

createConnection

public void createConnection()
                      throws java.net.ConnectException
Connect to the cca MUXER. If a connection can not be established then throw an excpetion WARNING: Depending on the settings of the numberOfTimesWeTryToConnectToCca attribute and the numberOfMillisecondsBetweenConnectionAttempts attribute, this method could take several seconds to complete.

Throws:
Throws - ConnectionExcpetion if a connection to the MUXER can NOT be established.
java.net.ConnectException

setHost

public void setHost(java.lang.String host)
Set the host name for the server.


getHost

public java.lang.String getHost()
Get the host name for the server.


setPort

public void setPort(int serverPort)
Set the port for the server.


getPort

public int getPort()
Get the port for the server.


getOutputStream

public java.io.OutputStream getOutputStream()
Get the OutputStream from the server.


getInputStream

public java.io.InputStream getInputStream()
Get the InputStream to the server.


getTimeout

public int getTimeout()
Get the number of milliseconds a read operation will wait. A value of 0 means the socket will wait forever.

Returns:
The number of milliseconds a read operation will wait.

setTimeout

public void setTimeout(int timeout)
Set the number of milliseconds a read operation will wait. A value of 0 means the socket will wait forever.