SunSPOT API V5.0


com.sun.spot.peripheral
Class RadioConnectionBase

java.lang.Object
  extended by com.sun.squawk.io.ConnectionBase
      extended by com.sun.spot.peripheral.RadioConnectionBase
All Implemented Interfaces:
ITimeoutableConnection, Connection
Direct Known Subclasses:
Protocol, RadiogramConnImpl

public abstract class RadioConnectionBase
extends ConnectionBase
implements ITimeoutableConnection

Abstract base class for classes that implement a radio Connection that can time out if an expected acknowledgment doesn't arrive for a sent packet.


Field Summary
static long DEFAULT_TIMEOUT
          Default timeout in milliseconds
 
Constructor Summary
RadioConnectionBase()
          Default constructor initialises with infinite timeout.
 
Method Summary
 long getTimeout()
          Get the timeout for receiving information on this connection
 void setTimeout(long time)
          Set the timeout for receiving information on this connection
 
Methods inherited from class com.sun.squawk.io.ConnectionBase
close, open, openDataInputStream, openDataOutputStream, openInputStream, openOutputStream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
Default timeout in milliseconds

See Also:
Constant Field Values
Constructor Detail

RadioConnectionBase

public RadioConnectionBase()
Default constructor initialises with infinite timeout.

Method Detail

setTimeout

public void setTimeout(long time)
Description copied from interface: ITimeoutableConnection
Set the timeout for receiving information on this connection

Specified by:
setTimeout in interface ITimeoutableConnection
Parameters:
time - - Timeout period in milliseconds. Set this to -1 to turn off timeouts (infinite wait), or to 0 or more to wait that long for data before throwing a TimeoutException.

getTimeout

public long getTimeout()
Description copied from interface: ITimeoutableConnection
Get the timeout for receiving information on this connection

Specified by:
getTimeout in interface ITimeoutableConnection
Returns:
- Timeout period in milliseconds. Answers -1 for infinite wait.

SunSPOT API V5.0


Copyright � 2006-2008 Sun Microsystems, Inc. All Rights Reserved.