Class DefaultPCEPSessionNegotiator

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

    public final class DefaultPCEPSessionNegotiator
    extends AbstractPCEPSessionNegotiator
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultPCEPSessionNegotiator​(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise, io.netty.channel.Channel channel, org.opendaylight.protocol.pcep.PCEPSessionListener listener, short sessionId, int maxUnknownMessages, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open localPrefs)  
      DefaultPCEPSessionNegotiator​(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise, io.netty.channel.Channel channel, org.opendaylight.protocol.pcep.PCEPSessionListener listener, short sessionId, int maxUnknownMessages, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open localPrefs, Tls tlsConfiguration)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 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 open)
      Given a peer-provided session parameters proposal which we found unacceptable, provide a counter-proposal.
      protected 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 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 boolean isProposalAcceptable​(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open open)
      Check whether a peer-provided session parameters proposal is acceptable.
      • 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
    • Constructor Detail

      • DefaultPCEPSessionNegotiator

        public DefaultPCEPSessionNegotiator​(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise,
                                            io.netty.channel.Channel channel,
                                            org.opendaylight.protocol.pcep.PCEPSessionListener listener,
                                            short sessionId,
                                            int maxUnknownMessages,
                                            org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open localPrefs,
                                            Tls tlsConfiguration)
      • DefaultPCEPSessionNegotiator

        public DefaultPCEPSessionNegotiator​(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise,
                                            io.netty.channel.Channel channel,
                                            org.opendaylight.protocol.pcep.PCEPSessionListener listener,
                                            short sessionId,
                                            int maxUnknownMessages,
                                            org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open localPrefs)
    • Method Detail

      • createSession

        public 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)
        Description copied from class: AbstractPCEPSessionNegotiator
        Create the protocol session.
        Specified by:
        createSession in class AbstractPCEPSessionNegotiator
        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.
      • isProposalAcceptable

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

        protected 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 open)
        Description copied from class: AbstractPCEPSessionNegotiator
        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.
        Specified by:
        getCounterProposal in class AbstractPCEPSessionNegotiator
        Parameters:
        open - unacceptable peer proposal
        Returns:
        our counter-proposal, or null if there is no way to negotiate an acceptable proposal
      • getRevisedProposal

        protected 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)
        Description copied from class: AbstractPCEPSessionNegotiator
        Get the revised session parameters proposal based on the feedback the peer has provided to us.
        Specified by:
        getRevisedProposal in class AbstractPCEPSessionNegotiator
        Parameters:
        suggestion - Peer-provided suggested session parameters
        Returns:
        Session parameters proposal, or null if peers session parameters preclude us from suggesting anything