Class DefaultPCEPSessionNegotiator
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.opendaylight.protocol.pcep.impl.AbstractSessionNegotiator
org.opendaylight.protocol.pcep.impl.AbstractPCEPSessionNegotiator
org.opendaylight.protocol.pcep.impl.DefaultPCEPSessionNegotiator
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,SessionNegotiator
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opendaylight.protocol.pcep.impl.AbstractPCEPSessionNegotiator
AbstractPCEPSessionNegotiator.StateNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields inherited from class org.opendaylight.protocol.pcep.impl.AbstractPCEPSessionNegotiator
FAIL_TIMER_VALUEFields inherited from class org.opendaylight.protocol.pcep.impl.AbstractSessionNegotiator
channel, promise -
Constructor Summary
ConstructorsConstructorDescriptionDefaultPCEPSessionNegotiator(io.netty.util.concurrent.Promise<PCEPSession> promise, io.netty.channel.Channel channel, PCEPSessionListener listener, org.opendaylight.yangtools.yang.common.Uint8 sessionId, Open localPrefs, org.opendaylight.yangtools.yang.common.Uint16 maxUnknownMessages) DefaultPCEPSessionNegotiator(io.netty.util.concurrent.Promise<PCEPSession> promise, io.netty.channel.Channel channel, PCEPSessionListener listener, org.opendaylight.yangtools.yang.common.Uint8 sessionId, Open localPrefs, org.opendaylight.yangtools.yang.common.Uint16 maxUnknownMessages, PcepSessionTls tlsConfiguration) -
Method Summary
Modifier and TypeMethodDescriptioncreateSession(io.netty.channel.Channel channel, Open localPrefs, Open remotePrefs) Create the protocol session.protected OpengetCounterProposal(Open open) Given a peer-provided session parameters proposal which we found unacceptable, provide a counter-proposal.protected OpenGet the initial session parameters proposal.protected OpengetRevisedProposal(Open suggestion) Get the revised session parameters proposal based on the feedback the peer has provided to us.protected booleanisProposalAcceptable(Open open) Check whether a peer-provided session parameters proposal is acceptable.Methods inherited from class org.opendaylight.protocol.pcep.impl.AbstractPCEPSessionNegotiator
handleMessage, negotiationFailed, startNegotiationMethods inherited from class org.opendaylight.protocol.pcep.impl.AbstractSessionNegotiator
channelActive, channelRead, exceptionCaught, negotiationSuccessful, sendMessageMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemovedMethods inherited from interface io.netty.channel.ChannelInboundHandler
channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Constructor Details
-
DefaultPCEPSessionNegotiator
public DefaultPCEPSessionNegotiator(io.netty.util.concurrent.Promise<PCEPSession> promise, io.netty.channel.Channel channel, PCEPSessionListener listener, org.opendaylight.yangtools.yang.common.Uint8 sessionId, Open localPrefs, org.opendaylight.yangtools.yang.common.Uint16 maxUnknownMessages, PcepSessionTls tlsConfiguration) -
DefaultPCEPSessionNegotiator
public DefaultPCEPSessionNegotiator(io.netty.util.concurrent.Promise<PCEPSession> promise, io.netty.channel.Channel channel, PCEPSessionListener listener, org.opendaylight.yangtools.yang.common.Uint8 sessionId, Open localPrefs, org.opendaylight.yangtools.yang.common.Uint16 maxUnknownMessages)
-
-
Method Details
-
getInitialProposal
Description copied from class:AbstractPCEPSessionNegotiatorGet the initial session parameters proposal.- Specified by:
getInitialProposalin classAbstractPCEPSessionNegotiator- Returns:
- Session parameters proposal.
-
createSession
public PCEPSessionImpl createSession(io.netty.channel.Channel channel, Open localPrefs, Open remotePrefs) Description copied from class:AbstractPCEPSessionNegotiatorCreate the protocol session.- Specified by:
createSessionin classAbstractPCEPSessionNegotiator- 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
Description copied from class:AbstractPCEPSessionNegotiatorCheck whether a peer-provided session parameters proposal is acceptable.- Specified by:
isProposalAcceptablein classAbstractPCEPSessionNegotiator- Parameters:
open- peer-proposed session parameters- Returns:
- true if the proposal is acceptable, false otherwise
-
getCounterProposal
Description copied from class:AbstractPCEPSessionNegotiatorGiven 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:
getCounterProposalin classAbstractPCEPSessionNegotiator- Parameters:
open- unacceptable peer proposal- Returns:
- our counter-proposal, or null if there is no way to negotiate an acceptable proposal
-
getRevisedProposal
Description copied from class:AbstractPCEPSessionNegotiatorGet the revised session parameters proposal based on the feedback the peer has provided to us.- Specified by:
getRevisedProposalin classAbstractPCEPSessionNegotiator- Parameters:
suggestion- Peer-provided suggested session parameters- Returns:
- Session parameters proposal, or null if peers session parameters preclude us from suggesting anything
-