|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectModel
jhomenet.hw.HomenetHardware
public abstract class HomenetHardware
This is the superclass of all registered hardware as part of the jHomenet system.
It provides general functionality required for all hardware.
The class extends the JGoodies abstract Model superclass used to
minimizes the effort required to provide change support for bound and constrained
Bean properties.
ID: $Id: HomenetHardware.java,v 1.16 2005/11/07 01:17:42 dhirwinjr Exp $
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,java.lang.String> |
configuration
Configuration (to be used as needed by the hardware). |
protected HardwareDriver |
driver
Reference to the hardware driver. |
protected ErrorTracker |
errorTracker
Used to maintain a list of the hardware's errors. |
protected java.lang.String |
hardwareDescription
A description of the actual hardware itself. |
protected java.lang.String |
hardwareId
The hardware ID |
static java.lang.String |
PROPERTYNAME_CONFIGURATION
Bounded bean property name. |
static java.lang.String |
PROPERTYNAME_SETUPDESC
Bounded bean property name. |
protected java.lang.String |
setupDescription
A general description about the hardware. |
| Constructor Summary | |
|---|---|
HomenetHardware()
Constructor (required for use with Hibernate). |
|
HomenetHardware(java.lang.String hardwareID,
java.lang.String setupDescription)
Default constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Hardware hardware)
Used to check for equality. |
java.lang.String |
getConfiguration()
Get a semicolon deliminated list of the hardware's configuration. |
java.lang.String |
getConfiguration(java.lang.String keyName)
Get the hardware configuration. |
java.lang.String |
getDriverHardwareDescription()
Get the driver hardware type. |
java.lang.String |
getDriverName()
Return the hardware driver name. |
long |
getErrorCount()
Returns the number of error from the beginning of the server start. |
java.lang.String |
getHardwareClassname()
Get the jHomenetHardware type if the hardware is registered. |
java.lang.String |
getHardwareDescription()
Get the hardware description. |
java.lang.String |
getHardwareId()
Get the hardware ID. |
java.lang.String |
getSetupDescription()
Get a description of the hardware if it's registered. |
protected void |
initializeHardware()
Initialize the hardware. |
protected abstract void |
initializeHardwareDescription()
Set the hardware description. |
boolean |
isRegistered()
Whether the hardware is registered or not. |
void |
setConfiguration(java.lang.String configString)
Passes an entire configuration string. |
void |
setConfiguration(java.lang.String configKey,
java.lang.String configValue)
Set the hardware configuration if it's registered. |
protected void |
setDriver()
Set the hardware driver. |
void |
setHardwareId(java.lang.String hardwareId)
Set the hardware ID. |
void |
setSetupDescription(java.lang.String desc)
Set the hardware setup description. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String hardwareId
protected java.lang.String setupDescription
public static final java.lang.String PROPERTYNAME_SETUPDESC
protected java.lang.String hardwareDescription
protected java.util.HashMap<java.lang.String,java.lang.String> configuration
public static final java.lang.String PROPERTYNAME_CONFIGURATION
protected transient HardwareDriver driver
protected ErrorTracker errorTracker
| Constructor Detail |
|---|
public HomenetHardware(java.lang.String hardwareID,
java.lang.String setupDescription)
hardwareID - public HomenetHardware()
| Method Detail |
|---|
protected void initializeHardware()
public boolean isRegistered()
Hardware
isRegistered in interface Hardwaretrue if the hardware is registeredHardware.isRegistered()public void setHardwareId(java.lang.String hardwareId)
hardwareId - public java.lang.String getHardwareId()
getHardwareId in interface HardwareHardware.getHardwareId()protected abstract void initializeHardwareDescription()
public java.lang.String getHardwareDescription()
public void setSetupDescription(java.lang.String desc)
desc - public java.lang.String getSetupDescription()
protected void setDriver()
public java.lang.String getDriverName()
getDriverName in interface HardwareHardware.getDriverName()public java.lang.String getHardwareClassname()
getHardwareClassname in interface Hardware
public void setConfiguration(java.lang.String configKey,
java.lang.String configValue)
configKey - configValue - public void setConfiguration(java.lang.String configString)
configString - public java.lang.String getConfiguration(java.lang.String keyName)
public java.lang.String getConfiguration()
public boolean equals(Hardware hardware)
Hardware
equals in interface HardwareHardware.equals(jhomenet.hw.Hardware)public java.lang.String getDriverHardwareDescription()
getDriverHardwareDescription in interface HardwareHardware.getDriverHardwareDescription()public long getErrorCount()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||