lejos.nxt.comm
Class NXTCommConnector

java.lang.Object
  extended by lejos.nxt.comm.NXTCommConnector

public abstract class NXTCommConnector
extends Object

Standard interface to connect/wait for a connection.

Author:
andy

Constructor Summary
NXTCommConnector()
           
 
Method Summary
abstract  NXTConnection connect(String target, int mode)
          Open a connection to the specified name/address using the given I/O mode
abstract  NXTConnection waitForConnection(int timeout, int mode)
          Wait for an incomming connection, or for the request to timeout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NXTCommConnector

public NXTCommConnector()
Method Detail

connect

public abstract NXTConnection connect(String target,
                                      int mode)
Open a connection to the specified name/address using the given I/O mode

Parameters:
target - The name or address of the device/host to connect to.
mode - The I/O mode to use for this connection
Returns:
A NXTConnection object for the new connection or null if error.

waitForConnection

public abstract NXTConnection waitForConnection(int timeout,
                                                int mode)
Wait for an incomming connection, or for the request to timeout.

Parameters:
timeout - Time in ms to wait for the connection to be made
mode - I/O mode to be used for the accpeted connection.
Returns:
A NXTConnection object for the new connection or null if error.