sophware.home.lang
Class ReadOnlyDevice

java.lang.Object
  extended by sophware.home.lang.StateObject
      extended by sophware.home.lang.BinaryObject
          extended by sophware.home.lang.HomeDevice
              extended by sophware.home.lang.ReadOnlyDevice
All Implemented Interfaces:
java.io.Serializable, Named

public class ReadOnlyDevice
extends HomeDevice
implements java.io.Serializable

ReadOnlyDevice represents devices that cannot have their state modified by commands.

For example, many X10 motion detectors only report status and cannot be be altered by powerline commands.

Version:
1.0, 03/19/07
Author:
Russell Soph
See Also:
Serialized Form

Field Summary
 
Fields inherited from class sophware.home.lang.BinaryObject
OFF, ON
 
Constructor Summary
ReadOnlyDevice(DeviceAddress address)
          Creates a ReadOnlyDevice with the given DeviceAddress
ReadOnlyDevice(DeviceAddress address, java.lang.String name)
          Creates a ReadOnlyDevice with the given DeviceAddress and name
 
Method Summary
 void sendOff()
          Always throws HomeException
 void sendOn()
          Always throws HomeException
 
Methods inherited from class sophware.home.lang.HomeDevice
equals, getAddress, getName, getProperties, sendHail, sendStatusRequest, setName, setProperties, toString, update
 
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

ReadOnlyDevice

public ReadOnlyDevice(DeviceAddress address)
Creates a ReadOnlyDevice with the given DeviceAddress

Parameters:
address - the DeviceAddress

ReadOnlyDevice

public ReadOnlyDevice(DeviceAddress address,
                      java.lang.String name)
Creates a ReadOnlyDevice with the given DeviceAddress and name

Parameters:
address - the DeviceAddress
name - of this device
Method Detail

sendOn

public void sendOn()
            throws HomeException
Always throws HomeException

Overrides:
sendOn in class HomeDevice
Throws:
HomeException

sendOff

public void sendOff()
             throws HomeException
Always throws HomeException

Overrides:
sendOff in class HomeDevice
Throws:
HomeException