|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsophware.home.lang.StateObject
sophware.home.lang.BinaryObject
sophware.home.lang.HomeDevice
public class HomeDevice
HomeDevice is the base class for all addressable devices on
the home network.
| Field Summary |
|---|
| Fields inherited from class sophware.home.lang.BinaryObject |
|---|
OFF, ON |
| Constructor Summary | |
|---|---|
HomeDevice(DeviceAddress address)
Creates a HomeDevice with the given address |
|
HomeDevice(DeviceAddress address,
java.lang.String name)
Creates a HomeDevice with the given address
and name. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns string representation of this device (i.e. |
DeviceAddress |
getAddress()
Gets DeviceAddress for this
HomeDevice. |
java.lang.String |
getName()
Gets name of this device |
java.util.Properties |
getProperties()
Gets the properties for this device. |
void |
sendHail()
sends a HAIL request to this device |
void |
sendOff()
sends an OFF request to this device |
void |
sendOn()
sends an ON request to this device |
void |
sendStatusRequest()
sends an STATUS REQUEST to this device |
void |
setName(java.lang.String name)
Sets name of this device |
void |
setProperties(java.util.Properties prop)
Sets the properties for this device. |
java.lang.String |
toString()
Returns string representation of this device (i.e. |
void |
update(Home home,
HomeEvent event)
Applies a HomeEvent to this device. |
| Methods inherited from class sophware.home.lang.BinaryObject |
|---|
isOn, setOn, stateEquals |
| Methods inherited from class sophware.home.lang.StateObject |
|---|
addStateChangeListener, fireStateChange, removeStateChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HomeDevice(DeviceAddress address)
HomeDevice with the given address
address - the DeviceAddress for this device
public HomeDevice(DeviceAddress address,
java.lang.String name)
HomeDevice with the given address
and name.
address - the DeviceAddress for this devicename - of this device| Method Detail |
|---|
public DeviceAddress getAddress()
DeviceAddress for this
HomeDevice.
DeviceAddresspublic java.lang.String getName()
getName in interface Namedpublic void setName(java.lang.String name)
name - the new name of this devicepublic java.util.Properties getProperties()
public void setProperties(java.util.Properties prop)
prop - the properties
public void sendOn()
throws HomeException
HomeException
public void sendOff()
throws HomeException
HomeException
public void sendStatusRequest()
throws HomeException
HomeException
public void sendHail()
throws HomeException
HomeException
public void update(Home home,
HomeEvent event)
HomeEvent to this device. By default this
method calls the HomeEvent.update() method with itself as a
parameter.
home - the homeevent - the eventHomeEventpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||