|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.EventObject
org.ocap.hn.DeviceEvent
public class DeviceEvent
Represents a Device Event. There are two types of Device events: one that is generated by the NetManager when a Device is added or removed from the home network. Application may register as a listener to NetManager to receive such events. The other DeviceEvent is generated by the Device itself when its internal state changes. Application should register as a listener with a particular Device for such events. In both scenarios, the Device that was the source of the event is returned.
| Field Summary | |
|---|---|
static int |
DEVICE_ADDED
A constant indicating new device is registered to home network. |
static int |
DEVICE_REMOVED
A constant indicating a device is removed from home network. |
static int |
DEVICE_UPDATED
A constant indicating a device is updated from home network. |
static int |
STATE_CHANGE
A constant indicating a device's internal state has changed. |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
DeviceEvent(int type,
Object source)
Constructs a DeviceEvent by specifying type and source. |
|
| Method Summary | |
|---|---|
Object |
getSource()
Returns device event source, which is always a Device. |
int |
getType()
Returns device event type, as defined in DeviceEvent. |
| Methods inherited from class java.util.EventObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEVICE_ADDED
public static final int DEVICE_REMOVED
public static final int DEVICE_UPDATED
public static final int STATE_CHANGE
| Constructor Detail |
|---|
public DeviceEvent(int type,
Object source)
type - Device change type, allowed type are defined in
DeviceEventsource - Device where the change happens.| Method Detail |
|---|
public int getType()
DeviceEvent.
public Object getSource()
getSource in class EventObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||