public class DefaultRestSBDevice extends Object implements RestSBDevice
| Constructor and Description |
|---|
DefaultRestSBDevice(org.onlab.packet.IpAddress ip,
int port,
String name,
String password,
String protocol,
String url,
boolean isActive) |
| Modifier and Type | Method and Description |
|---|---|
org.onosproject.net.DeviceId |
deviceId()
Returns the ONOS deviceID for this device.
|
boolean |
equals(Object obj) |
int |
hashCode() |
org.onlab.packet.IpAddress |
ip()
Returns the ip of this device.
|
boolean |
isActive()
Returns the state of this device.
|
String |
password()
Returns the password of this device.
|
int |
port()
Returns the password of this device.
|
String |
protocol()
Returns the protocol for the REST request, usually HTTP o HTTPS.
|
void |
setActive(boolean active)
Sets or unsets the state of the device.
|
String |
toString() |
String |
url()
Returns the url for the REST requests, to be used instead of IP and PORT.
|
String |
username()
Returns the username of this device.
|
public org.onlab.packet.IpAddress ip()
RestSBDeviceip in interface RestSBDevicepublic int port()
RestSBDeviceport in interface RestSBDevicepublic String username()
RestSBDeviceusername in interface RestSBDevicepublic String password()
RestSBDevicepassword in interface RestSBDevicepublic org.onosproject.net.DeviceId deviceId()
RestSBDevicedeviceId in interface RestSBDevicepublic void setActive(boolean active)
RestSBDevicesetActive in interface RestSBDeviceactive - booleanpublic boolean isActive()
RestSBDeviceisActive in interface RestSBDevicepublic String protocol()
RestSBDeviceprotocol in interface RestSBDevicepublic String url()
RestSBDeviceurl in interface RestSBDevice