Package ej.ecom
Interface Device
-
- All Known Subinterfaces:
CommPort
public interface DeviceCommon superclass for a Device. When aDeviceimplementsConnectableinterface, then the argument ofConnectable.openConnection(String)correspond to theparamspart ofConnectorURL specification. A device is uniquely identified with its name and its hardware descriptor.- See Also:
Connector
-
-
Field Summary
Fields Modifier and Type Field Description static StringUNKNOWN_NAMEThis value is returned bygetName()when this device is unregistered and its name is unavailable.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Device[]getChildren()Returns the children of this device in the hardware topology.<D extends Device>
HardwareDescriptor<D>getDescriptor()Returns the device hardware descriptor.StringgetName()Returns the name of the device.DevicegetParent()Returns the parent of this device in the hardware topology.
-
-
-
Field Detail
-
UNKNOWN_NAME
static final String UNKNOWN_NAME
This value is returned bygetName()when this device is unregistered and its name is unavailable.- See Also:
- Constant Field Values
-
-
Method Detail
-
getDescriptor
<D extends Device> HardwareDescriptor<D> getDescriptor()
Returns the device hardware descriptor.- Type Parameters:
D- the type of the device- Returns:
- the device hardware descriptor
-
getName
String getName()
Returns the name of the device.- Returns:
- the device name,
UNKNOWN_NAMEif this device is not registered and its name is unavailable.
-
getParent
Device getParent()
Returns the parent of this device in the hardware topology.- Returns:
- null if it is a root device.
-
getChildren
Device[] getChildren()
Returns the children of this device in the hardware topology.- Returns:
- an empty array if it is a leaf device.
-
-