Sun SPOT API
Green Release  


com.sun.spot.peripheral
Interface ITimeoutableConnection

All Known Subinterfaces:
RadioConnection, RadiogramConnection
All Known Implementing Classes:
Protocol, Protocol, RadioConnectionBase

public interface ITimeoutableConnection

Thie interface represents any Connection between a pair of Spots that can timeout on receiving data. There are currently two such Connection types: see the references below.

See Also:
RadioConnection, RadiogramConnection

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
 

Method Detail

setTimeout

void setTimeout(long time)
Set the timeout for receiving information on this connection

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

long getTimeout()
Get the timeout for receiving information on this connection

Returns:
- Timeout period in milliseconds. Answers -1 for infinite wait.

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.