kaos.robots.er1
Class ER1Client

java.lang.Object
  extended by kaos.robots.er1.ER1Client

public class ER1Client
extends java.lang.Object

Generic socket client class that takes a data listener and a protocol handler to process socket data.


Constructor Summary
ER1Client(java.lang.String[] args)
           
 
Method Summary
 boolean _connect(java.lang.String address, int port)
           
 boolean checkResponse(java.lang.String response, java.lang.String command)
           
 boolean connect()
           
 void disconnect()
           
 java.net.Socket getSocket()
           
 void parseCommandLine(java.lang.String[] args)
           
 java.lang.String readString()
           
 java.lang.String sendCommand(java.lang.String command)
           
 boolean sendString(java.lang.String s)
           
 void usage()
           
 void waitFor(java.lang.String command)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ER1Client

public ER1Client(java.lang.String[] args)
Method Detail

getSocket

public java.net.Socket getSocket()

connect

public boolean connect()

_connect

public boolean _connect(java.lang.String address,
                        int port)

readString

public java.lang.String readString()

sendString

public boolean sendString(java.lang.String s)

disconnect

public void disconnect()

parseCommandLine

public void parseCommandLine(java.lang.String[] args)

usage

public void usage()

waitFor

public void waitFor(java.lang.String command)

sendCommand

public java.lang.String sendCommand(java.lang.String command)

checkResponse

public boolean checkResponse(java.lang.String response,
                             java.lang.String command)