Package org.onosproject.net.flow
Class AbstractExtension
- java.lang.Object
-
- org.onosproject.net.flow.AbstractExtension
-
- All Implemented Interfaces:
Extension
- Direct Known Subclasses:
UnresolvedExtensionSelector
,UnresolvedExtensionTreatment
public abstract class AbstractExtension extends java.lang.Object implements Extension
Abstract implementation of the set/get property methods of Extension.
-
-
Constructor Summary
Constructors Constructor Description AbstractExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getProperties()
Gets a list of all properties on the extension.<T> T
getPropertyValue(java.lang.String key)
Gets a property value of an extension.<T> void
setPropertyValue(java.lang.String key, T value)
Sets a property on the extension.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.flow.Extension
deserialize, serialize
-
-
-
-
Method Detail
-
setPropertyValue
public <T> void setPropertyValue(java.lang.String key, T value) throws ExtensionPropertyException
Description copied from interface:Extension
Sets a property on the extension.- Specified by:
setPropertyValue
in interfaceExtension
- Type Parameters:
T
- class of the value- Parameters:
key
- property keyvalue
- value to set for the given key- Throws:
ExtensionPropertyException
- if the given key is not a valid property on this extension
-
getPropertyValue
public <T> T getPropertyValue(java.lang.String key) throws ExtensionPropertyException
Description copied from interface:Extension
Gets a property value of an extension.- Specified by:
getPropertyValue
in interfaceExtension
- Type Parameters:
T
- class of the value- Parameters:
key
- property key- Returns:
- value of the property
- Throws:
ExtensionPropertyException
- if the given key is not a valid property on this extension
-
getProperties
public java.util.List<java.lang.String> getProperties()
Description copied from interface:Extension
Gets a list of all properties on the extension.- Specified by:
getProperties
in interfaceExtension
- Returns:
- list of properties
-
-