public class SerialDevice extends Object implements Distributable, Transportable<SerialDevice,String>, Device
NetworkElement.Type
Constructor and Description |
---|
SerialDevice(DeviceId deviceId,
Set<URI> uris,
SupplierId supplierId,
String name,
String deviceTypeName,
String deviceInfo,
String dpid) |
SerialDevice(SerialDevice device) |
Modifier and Type | Method and Description |
---|---|
static SerialDevice |
compress(Device device) |
static SerialDevice |
convert(DeviceEntity entity)
Convert from JPA compatible object
|
DeviceEntity |
createStorable()
Create JPA compatible object
|
DataPathId |
dpid()
Returns the data path id for this device or null if the device is not an
OpenFlow datapath.
|
boolean |
equals(Object obj) |
Device |
expand(DeviceDriverService driverService) |
<E extends SerialDevice> |
getId()
Gets the id of this object.
|
int |
hashCode() |
DeviceId |
id()
Returns the device ID for this device.
|
DeviceInfo |
info()
Set of information accrued about the device through the use of device
drivers.
|
boolean |
isFromDb() |
boolean |
isOnline()
Indicates whether the device is presently online.
|
Set<URI> |
managementURIs()
Set of URIs that can be used to communicate with the device via
device drivers.
|
String |
name()
Returns the friendly name of the network element.
|
Device |
realizedBy()
Optional reference to a device that is used to realize this one.
|
void |
setFromDb(boolean fromDb) |
void |
setOnline(boolean online) |
SupplierId |
supplierId()
Returns the id of the supplier that provided this model entity.
|
String |
toString() |
NetworkElement.Type |
type()
Returns the network element type, e.g.
|
public SerialDevice(DeviceId deviceId, Set<URI> uris, SupplierId supplierId, String name, String deviceTypeName, String deviceInfo, String dpid)
public SerialDevice(SerialDevice device)
public boolean isOnline()
Device
public void setOnline(boolean online)
public boolean isFromDb()
public void setFromDb(boolean fromDb)
public static SerialDevice compress(Device device)
public Device expand(DeviceDriverService driverService)
public DeviceEntity createStorable()
public static SerialDevice convert(DeviceEntity entity)
entity
- DeviceEntitypublic <E extends SerialDevice> Id<E,String> getId()
Transportable
A type for the identified must be specified to retrieve the id because
identified objects might be inheritable. For example, assume
Employee
extends from Person
and Person
implements Transportable<Person, Long>
. The following code
would be possible.
Id<Person, Long> id = employee.getId(); Id<Employee, Long> id = employee.getId();
getId
in interface Transportable<SerialDevice,String>
public DeviceId id()
Device
id
in interface Device
id
in interface NetworkElement
public DataPathId dpid()
Device
public String name()
NetworkElement
name
in interface NetworkElement
public NetworkElement.Type type()
NetworkElement
type
in interface NetworkElement
public SupplierId supplierId()
Model
supplierId
in interface Model
public DeviceInfo info()
Device
public Set<URI> managementURIs()
Device
snmp://12312313/ of://dpid/
managementURIs
in interface Device
public Device realizedBy()
Device
realizedBy
in interface Device
Copyright © 2015. All Rights Reserved.