Package lejos.remote.nxt
Class BTConnector
- java.lang.Object
-
- lejos.remote.nxt.NXTCommConnector
-
- lejos.remote.nxt.BTConnector
-
public class BTConnector extends NXTCommConnector
-
-
Constructor Summary
Constructors Constructor Description BTConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()Cancel a connection attempt.BTConnectionconnect(java.lang.String target, int mode)Open a connection to the specified name/address using the given I/O modeBTConnectionwaitForConnection(int timeout, int mode)Wait for an incoming connection, or for the request to timeout.
-
-
-
Method Detail
-
connect
public BTConnection connect(java.lang.String target, int mode)
Description copied from class:NXTCommConnectorOpen a connection to the specified name/address using the given I/O mode- Specified by:
connectin classNXTCommConnector- 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 BTConnection waitForConnection(int timeout, int mode)
Description copied from class:NXTCommConnectorWait for an incoming connection, or for the request to timeout.- Specified by:
waitForConnectionin classNXTCommConnector- Parameters:
timeout- Time in ms to wait for the connection to be mademode- I/O mode to be used for the accepted connection.- Returns:
- A NXTConnection object for the new connection or null if error.
-
cancel
public boolean cancel()
Description copied from class:NXTCommConnectorCancel a connection attempt.- Specified by:
cancelin classNXTCommConnector- Returns:
- true if the connection attempt has been aborted.
-
-