public class ProtectionConfig extends BaseConfig<DeviceId>
 Contains equivalent of ProtectedTransportEndpointDescription.
Config.FieldPresence| Modifier and Type | Field and Description | 
|---|---|
static String | 
CONFIG_KEY
"protection" : a netcfg ConfigKey for  
ProtectionConfig. | 
| Constructor and Description | 
|---|
ProtectionConfig()
Create a  
ProtectionConfig. | 
ProtectionConfig(DeviceId did)
Create a  
ProtectionConfig for specified Device. | 
| Modifier and Type | Method and Description | 
|---|---|
ProtectedTransportEndpointDescription | 
asDescription()
Returns equivalent of this Config as  
ProtectedTransportEndpointDescription. | 
String | 
fingerprint()
Returns fingerprint to identify this protected transport entity. 
 | 
ProtectionConfig | 
fingerprint(String fingerprint)
Sets the fingerprint to identify this protected transport entity. 
 | 
boolean | 
isValid()
Indicates whether or not the backing JSON node contains valid data. 
 | 
List<TransportEndpointDescription> | 
paths()
Returns List of underlying transport entity endpoints in priority order. 
 | 
ProtectionConfig | 
paths(List<TransportEndpointDescription> paths)
Sets the List of underlying transport entity endpoints in priority order. 
 | 
DeviceId | 
peer()
Returns DeviceId of remote peer of this endpoint. 
 | 
ProtectionConfig | 
peer(DeviceId peer)
Sets the DeviceId of remote peer of this endpoint. 
 | 
String | 
toString()  | 
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, subjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdecode, encodepublic static final String CONFIG_KEY
ProtectionConfig.public ProtectionConfig()
ProtectionConfig.
 Note: created instance needs to be initialized by #init(..) before using.
public ProtectionConfig(DeviceId did)
ProtectionConfig for specified Device.
 
 Note: created instance is not bound to NetworkConfigService,
 cannot use Config.apply(). Must be passed to the service
 using NetworkConfigService#applyConfig
did - DeviceIdpublic 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.
public List<TransportEndpointDescription> paths()
public ProtectionConfig paths(List<TransportEndpointDescription> paths)
paths - the transport entity endpoint descriptionspublic DeviceId peer()
public ProtectionConfig peer(DeviceId peer)
peer - DeviceIdpublic String fingerprint()
public ProtectionConfig fingerprint(String fingerprint)
fingerprint - the fingerprintpublic ProtectedTransportEndpointDescription asDescription()
ProtectedTransportEndpointDescription.