org.mbari.siam.utils
Class TCPClient

java.lang.Object
  extended by org.mbari.siam.utils.TCPClient
Direct Known Subclasses:
OSDTTestClient

public class TCPClient
extends java.lang.Object


Field Summary
protected  java.io.BufferedReader _fromServer
           
protected  boolean _isConnected
           
protected static org.apache.log4j.Logger _log4j
           
protected  TCPProtocol _protocol
           
protected  java.lang.String _serverHost
           
protected  java.net.Socket _socket
           
protected  int _tcpPort
           
protected  java.io.PrintWriter _toServer
           
 
Constructor Summary
TCPClient()
           
TCPClient(java.lang.String serverHost, int port, TCPProtocol protocol)
           
TCPClient(TCPProtocol protocol)
           
 
Method Summary
 void configure(java.lang.String[] args)
           
 void connect()
           
 void disconnect()
           
 boolean isConnected()
           
 java.lang.String writeRead(java.lang.String data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log4j

protected static org.apache.log4j.Logger _log4j

_serverHost

protected java.lang.String _serverHost

_tcpPort

protected int _tcpPort

_toServer

protected java.io.PrintWriter _toServer

_fromServer

protected java.io.BufferedReader _fromServer

_socket

protected java.net.Socket _socket

_protocol

protected TCPProtocol _protocol

_isConnected

protected boolean _isConnected
Constructor Detail

TCPClient

public TCPClient(java.lang.String serverHost,
                 int port,
                 TCPProtocol protocol)

TCPClient

public TCPClient(TCPProtocol protocol)

TCPClient

public TCPClient()
Method Detail

configure

public void configure(java.lang.String[] args)
               throws java.lang.Exception
Throws:
java.lang.Exception

isConnected

public boolean isConnected()

connect

public void connect()
             throws java.lang.Exception
Throws:
java.lang.Exception

disconnect

public void disconnect()
                throws java.lang.Exception
Throws:
java.lang.Exception

writeRead

public java.lang.String writeRead(java.lang.String data)
                           throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.