public class DeviceDriverServiceAdapter extends Object implements DeviceDriverService
DeviceDriverService
.Constructor and Description |
---|
DeviceDriverServiceAdapter() |
Modifier and Type | Method and Description |
---|---|
DeviceHandler |
create(DeviceInfo info,
IpAddress ip)
Creates an instance of DeviceHandler, bound to the specified device target, and associated with
the specified instance of DeviceInfo.
|
DeviceLoader |
create(DeviceInfo info,
String uid)
Creates an instance of DeviceLoader, bound to the specified device UID, and associated with
the specified instance of DeviceInfo.
|
DeviceInfo |
create(String typeName)
Creates an instance of DeviceInfo backed by the specified device type and void of any specific device
information.
|
DeviceHandler |
create(String typeName,
IpAddress ip)
Creates an instance of DeviceHandler, bound to the specified device target, and associated with
a new instance of DeviceInfo backed by the specified device type and void of any specific device information.
|
DeviceLoader |
create(String typeName,
String uid)
Creates an instance of DeviceLoader, bound to the specified device UID, and associated with
a new instance of DeviceInfo backed by the specified device type.
|
String |
defaultOpenflowSwitch()
Device Type Name for the default openflow switch, used when specific
match not found in OF discovery.
|
String |
defaultSwitch()
Device Type Name for the default switch, used when specific match not
found.
|
String |
findTypeName(String mfg,
String hw,
String fw)
Find the best match Device Type Name for the given device strings.
|
Set<String> |
getDeviceTypeNames()
Returns a set of device type names for which this provider can create instances of
DeviceInfo , DeviceHandler and DeviceLoader . |
void |
switchType(MutableDeviceInfo mutableDeviceInfo,
String newTypeName)
Given a device info instance and a type name, replace the backing device type in that instance,
with the named device type.
|
public Set<String> getDeviceTypeNames()
DeviceDriverProvider
DeviceInfo
, DeviceHandler
and DeviceLoader
.getDeviceTypeNames
in interface DeviceDriverProvider
public DeviceInfo create(String typeName)
DeviceDriverProvider
create
in interface DeviceDriverProvider
typeName
- the name of the required device typepublic DeviceHandler create(String typeName, IpAddress ip)
DeviceDriverProvider
create
in interface DeviceDriverProvider
typeName
- the name of the required device typeip
- the device IP addresspublic DeviceHandler create(DeviceInfo info, IpAddress ip)
DeviceDriverProvider
create
in interface DeviceDriverProvider
info
- the device info instanceip
- the device IP addresspublic DeviceLoader create(String typeName, String uid)
DeviceDriverProvider
create
in interface DeviceDriverProvider
typeName
- the name of the required device typeuid
- the key by which the set of information describing the device can be looked up
in the persistence storepublic DeviceLoader create(DeviceInfo info, String uid)
DeviceDriverProvider
create
in interface DeviceDriverProvider
info
- the device info instanceuid
- the key by which the set of information describing the device can be looked up
in the persistence storepublic void switchType(MutableDeviceInfo mutableDeviceInfo, String newTypeName)
DeviceDriverProvider
switchType
in interface DeviceDriverProvider
mutableDeviceInfo
- the device info to be adjustednewTypeName
- the name of the replacement device typepublic String findTypeName(String mfg, String hw, String fw)
DeviceDriverService
findTypeName
in interface DeviceDriverService
mfg
- Manufacturerhw
- Hardware Modelfw
- Firmware revisionpublic String defaultSwitch()
DeviceDriverService
defaultSwitch
in interface DeviceDriverService
public String defaultOpenflowSwitch()
DeviceDriverService
defaultOpenflowSwitch
in interface DeviceDriverService
Copyright © 2015. All Rights Reserved.