Class AbstractPCEPSessionNegotiator

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, org.opendaylight.protocol.pcep.SessionNegotiator
    Direct Known Subclasses:
    DefaultPCEPSessionNegotiator

    public abstract class AbstractPCEPSessionNegotiator
    extends AbstractSessionNegotiator
    Abstract PCEP session negotiator. Takes care of basic handshake without implementing a specific policy. Policies need to be provided by a specific subclass.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  AbstractPCEPSessionNegotiator.State
      PCEP session negotiation state transitions are described in RFC5440.
      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract PCEPSessionImpl createSession​(io.netty.channel.Channel channel, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open localPrefs, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open remotePrefs)
      Create the protocol session.
      protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open getCounterProposal​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open proposal)
      Given a peer-provided session parameters proposal which we found unacceptable, provide a counter-proposal.
      protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open getInitialProposal()
      Get the initial session parameters proposal.
      protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open getRevisedProposal​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open suggestion)
      Get the revised session parameters proposal based on the feedback the peer has provided to us.
      protected void handleMessage​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Message msg)  
      protected abstract boolean isProposalAcceptable​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open proposal)
      Check whether a peer-provided session parameters proposal is acceptable.
      protected void negotiationFailed​(Throwable cause)  
      void setTlsConfiguration​(Tls tlsConfiguration)  
      protected void startNegotiation()  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
      • Methods inherited from interface io.netty.channel.ChannelInboundHandler

        channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
    • Field Detail

      • FAIL_TIMER_VALUE

        public static final int FAIL_TIMER_VALUE
        Unified KeepWait and OpenWait timer expiration, in seconds.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractPCEPSessionNegotiator

        protected AbstractPCEPSessionNegotiator​(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise,
                                                io.netty.channel.Channel channel)
    • Method Detail

      • getInitialProposal

        protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open getInitialProposal()
        Get the initial session parameters proposal.
        Returns:
        Session parameters proposal.
      • getRevisedProposal

        protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open getRevisedProposal​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open suggestion)
        Get the revised session parameters proposal based on the feedback the peer has provided to us.
        Parameters:
        suggestion - Peer-provided suggested session parameters
        Returns:
        Session parameters proposal, or null if peers session parameters preclude us from suggesting anything
      • isProposalAcceptable

        protected abstract boolean isProposalAcceptable​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open proposal)
        Check whether a peer-provided session parameters proposal is acceptable.
        Parameters:
        proposal - peer-proposed session parameters
        Returns:
        true if the proposal is acceptable, false otherwise
      • getCounterProposal

        protected abstract org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open getCounterProposal​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open proposal)
        Given a peer-provided session parameters proposal which we found unacceptable, provide a counter-proposal. The requirement is that the isProposalAcceptable() method has to return true when presented with this proposal.
        Parameters:
        proposal - unacceptable peer proposal
        Returns:
        our counter-proposal, or null if there is no way to negotiate an acceptable proposal
      • createSession

        protected abstract PCEPSessionImpl createSession​(io.netty.channel.Channel channel,
                                                         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open localPrefs,
                                                         org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open remotePrefs)
        Create the protocol session.
        Parameters:
        channel - Underlying channel.
        localPrefs - Session preferences proposed by us and accepted by the peer.
        remotePrefs - Session preferences proposed by the peer and accepted by us.
        Returns:
        New protocol session.
      • handleMessage

        protected final void handleMessage​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.Message msg)
        Specified by:
        handleMessage in class AbstractSessionNegotiator
      • setTlsConfiguration

        public void setTlsConfiguration​(Tls tlsConfiguration)