Class ProtectionConfig

    • Constructor Detail

      • ProtectionConfig

        public ProtectionConfig()
        Create a ProtectionConfig.

        Note: created instance needs to be initialized by #init(..) before using.

      • ProtectionConfig

        public ProtectionConfig​(DeviceId did)
        Create a 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

        Parameters:
        did - DeviceId
    • Method Detail

      • isValid

        public boolean isValid()
        Description copied from class: Config
        Indicates 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.

        Overrides:
        isValid in class Config<DeviceId>
        Returns:
        true if the data is valid; false otherwise
      • paths

        public java.util.List<TransportEndpointDescription> paths()
        Returns List of underlying transport entity endpoints in priority order.
        Returns:
        the transport entity endpoint descriptions
      • paths

        public ProtectionConfig paths​(java.util.List<TransportEndpointDescription> paths)
        Sets the List of underlying transport entity endpoints in priority order.
        Parameters:
        paths - the transport entity endpoint descriptions
        Returns:
        self
      • peer

        public DeviceId peer()
        Returns DeviceId of remote peer of this endpoint.
        Returns:
        the peer
      • peer

        public ProtectionConfig peer​(DeviceId peer)
        Sets the DeviceId of remote peer of this endpoint.
        Parameters:
        peer - DeviceId
        Returns:
        self
      • fingerprint

        public java.lang.String fingerprint()
        Returns fingerprint to identify this protected transport entity.
        Returns:
        the fingerprint
      • fingerprint

        public ProtectionConfig fingerprint​(java.lang.String fingerprint)
        Sets the fingerprint to identify this protected transport entity.
        Parameters:
        fingerprint - the fingerprint
        Returns:
        self