|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NetworkDeviceStatusListener
Defines the listener interface for events related to network devices.
Method Summary | |
---|---|
void |
connected(NetworkDevice device,
NetworkInterface netif)
Reports when device has been connected. |
void |
connectionFailed(NetworkDevice device,
String reason)
Reports when device could not connect for some reason. |
void |
currentDataRate(NetworkDevice device,
long dataRate)
Reports the current data rate of a given device if it has
changed since the last report. |
void |
disconnected(NetworkDevice device)
Reports when device has been disconnected. |
boolean |
timingOut(NetworkDevice device)
Reports when device is about to be disconnected
because the inactivity timeout period given at construction time
has elapsed. |
Method Detail |
---|
void connected(NetworkDevice device, NetworkInterface netif)
device
has been connected.
Along that call, the implementation passes a NetworkInterface
object that represents the interface that
has been assigned to that connection. Among other facilities, this
class allows to retrieve the associated Internet addresses.
device
- The network device which has been connected.netif
- The associated NetworkInterface object.void connectionFailed(NetworkDevice device, String reason)
device
could not connect for some reason.
device
- The network device which connection failed.reason
- A short string describing the error that occurred.void currentDataRate(NetworkDevice device, long dataRate)
device
if it has
changed since the last report. Data rate is informed only when the
network device has been connected beforehand. Right after a
connection, the platform must call this
method at least one time.
The implementation should not excessively call this method and by no means oftener than every one second.
device
- The network device which data rate has changed.dataRate
- The current data rate in kbps.NetworkDevice.getMaximumSpeed()
boolean timingOut(NetworkDevice device)
device
is about to be disconnected
because the inactivity timeout period given at construction time
has elapsed.
The application is given hereby the chance to react accordingly
in the case it does not want to be disconnect: if the implementation
of this method returns true
, then the implementation
must disconnect the device on return of
this method. If the method returns false
, then the
implementation must reset the
timer to the original timeout value allowing it to re-trigger the
application at the next timeout.
When calling this method, certain platforms may define a timespan until when this method
is expected to return. If it does not return within that timeframe,
the implementation must behave as if
the method returned true
. This mechanism allows to avoid
blocking this method unnecessarily.
device
- The network device which timeout has expired.
true
indicates the
implementation to disconnect the given device.void disconnected(NetworkDevice device)
device
has been disconnected.
device
- The network device which has been disconnected.
|
Java DTV API 1.3 18-Nov-2009 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |