Class ProtectionConfig
- java.lang.Object
- 
- org.onosproject.net.config.Config<S>
- 
- org.onosproject.net.config.BaseConfig<DeviceId>
- 
- org.onosproject.net.behaviour.protection.ProtectionConfig
 
 
 
- 
- All Implemented Interfaces:
- CodecContext
 
 public class ProtectionConfig extends BaseConfig<DeviceId> Config object for protection end-point.Contains equivalent of ProtectedTransportEndpointDescription.
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.onosproject.net.config.ConfigConfig.FieldPresence
 
- 
 - 
Constructor SummaryConstructors Constructor Description ProtectionConfig()Create aProtectionConfig.ProtectionConfig(DeviceId did)Create aProtectionConfigfor specified Device.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ProtectedTransportEndpointDescriptionasDescription()Returns equivalent of this Config asProtectedTransportEndpointDescription.Stringfingerprint()Returns fingerprint to identify this protected transport entity.ProtectionConfigfingerprint(String fingerprint)Sets the fingerprint to identify this protected transport entity.booleanisValid()Indicates whether or not the backing JSON node contains valid data.List<TransportEndpointDescription>paths()Returns List of underlying transport entity endpoints in priority order.ProtectionConfigpaths(List<TransportEndpointDescription> paths)Sets the List of underlying transport entity endpoints in priority order.DeviceIdpeer()Returns DeviceId of remote peer of this endpoint.ProtectionConfigpeer(DeviceId peer)Sets the DeviceId of remote peer of this endpoint.StringtoString()- 
Methods inherited from class org.onosproject.net.config.BaseConfigcodec, decode, getService, mapper
 - 
Methods inherited from class org.onosproject.net.config.Configapply, 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
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.onosproject.codec.CodecContextdecode, encode
 
- 
 
- 
- 
- 
Field Detail- 
CONFIG_KEYpublic static final String CONFIG_KEY "protection" : a netcfg ConfigKey forProtectionConfig.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ProtectionConfigpublic ProtectionConfig() Create aProtectionConfig.Note: created instance needs to be initialized by #init(..) before using. 
 - 
ProtectionConfigpublic ProtectionConfig(DeviceId did) Create aProtectionConfigfor specified Device.Note: created instance is not bound to NetworkConfigService, cannot use Config.apply(). Must be passed to the service using NetworkConfigService#applyConfig- Parameters:
- did- DeviceId
 
 
- 
 - 
Method Detail- 
isValidpublic boolean isValid() Description copied from class:ConfigIndicates whether or not the backing JSON node contains valid data.Default implementation returns true. Subclasses are expected to override this with their own validation. Implementations are free to throw a RuntimeException if data is invalid. 
 - 
pathspublic List<TransportEndpointDescription> paths() Returns List of underlying transport entity endpoints in priority order.- Returns:
- the transport entity endpoint descriptions
 
 - 
pathspublic ProtectionConfig paths(List<TransportEndpointDescription> paths) Sets the List of underlying transport entity endpoints in priority order.- Parameters:
- paths- the transport entity endpoint descriptions
- Returns:
- self
 
 - 
peerpublic DeviceId peer() Returns DeviceId of remote peer of this endpoint.- Returns:
- the peer
 
 - 
peerpublic ProtectionConfig peer(DeviceId peer) Sets the DeviceId of remote peer of this endpoint.- Parameters:
- peer- DeviceId
- Returns:
- self
 
 - 
fingerprintpublic String fingerprint() Returns fingerprint to identify this protected transport entity.- Returns:
- the fingerprint
 
 - 
fingerprintpublic ProtectionConfig fingerprint(String fingerprint) Sets the fingerprint to identify this protected transport entity.- Parameters:
- fingerprint- the fingerprint
- Returns:
- self
 
 - 
asDescriptionpublic ProtectedTransportEndpointDescription asDescription() Returns equivalent of this Config asProtectedTransportEndpointDescription.
 
- 
 
-