public class PortAnnotationConfig extends BaseConfig<ConnectPoint>
Config.FieldPresence| Modifier and Type | Field and Description | 
|---|---|
static String | 
CONFIG_KEY
"annotations" : a netcfg ConfigKey for  
PortAnnotationConfig. | 
| Constructor and Description | 
|---|
PortAnnotationConfig()
Create a detached  
PortAnnotationConfig. | 
PortAnnotationConfig(ConnectPoint cp)
Create a detached  
PortAnnotationConfig for specified port. | 
| Modifier and Type | Method and Description | 
|---|---|
PortAnnotationConfig | 
annotation(String key)
Remove configuration about specified key. 
 | 
PortAnnotationConfig | 
annotation(String key,
          String value)
Add configuration to set or remove annotation entry. 
 | 
Map<String,String> | 
annotations()
Returns annotations to add to a Port. 
 | 
PortAnnotationConfig | 
annotations(Map<String,String> replace)
Sets annotations to add to a Port. 
 | 
boolean | 
isValid()
Indicates whether or not the backing JSON node contains valid data. 
 | 
codec, decode, getService, mapperapply, clear, get, get, get, get, get, get, getList, getList, hasField, hasField, hasFields, hasFields, hasOnlyFields, hasOnlyFields, init, isBoolean, isBoolean, isConnectPoint, isConnectPoint, isDecimal, isDecimal, isIntegralNumber, isIntegralNumber, isIpAddress, isIpAddress, isIpPrefix, isIpPrefix, isMacAddress, isMacAddress, isNumber, isNumber, isString, isString, isTpPort, isTpPort, isValidLength, key, node, setList, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, setOrClear, subject, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecode, encodepublic static final String CONFIG_KEY
PortAnnotationConfig.public PortAnnotationConfig()
PortAnnotationConfig.
 Note: created instance needs to be initialized by #init(..) before using.
public PortAnnotationConfig(ConnectPoint cp)
PortAnnotationConfig for specified port.
 
 Note: created instance is not bound to NetworkConfigService,
 thus cannot use Config.apply(). Must be passed to the service
 using NetworkConfigService#applyConfig
cp - ConnectPointpublic boolean isValid()
ConfigDefault implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid.
isValid in class Config<ConnectPoint>public Map<String,String> annotations()
public PortAnnotationConfig annotations(Map<String,String> replace)
replace - annotations to be added by this configuration.
                null value represent key removal requestpublic PortAnnotationConfig annotation(String key, String value)
key - annotations keyvalue - annotations value. specifying null removes the entry.public PortAnnotationConfig annotation(String key)
key - annotations key