Class AbstractSessionNegotiator
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.opendaylight.protocol.pcep.impl.AbstractSessionNegotiator
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,SessionNegotiator
- Direct Known Subclasses:
AbstractPCEPSessionNegotiator,PCEPSessionNegotiator
public abstract class AbstractSessionNegotiator extends io.netty.channel.ChannelInboundHandlerAdapter implements SessionNegotiator
-
-
Field Summary
Fields Modifier and Type Field Description protected io.netty.channel.Channelchannelprotected io.netty.util.concurrent.Promise<PCEPSessionImpl>promise
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSessionNegotiator(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise, io.netty.channel.Channel channel)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidchannelActive(io.netty.channel.ChannelHandlerContext ctx)voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)protected abstract voidhandleMessage(Message msg)protected voidnegotiationFailed(Throwable cause)protected voidnegotiationSuccessful(PCEPSessionImpl session)protected voidsendMessage(Message msg)protected abstract voidstartNegotiation()-
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
-
-
-
-
Field Detail
-
channel
protected final io.netty.channel.Channel channel
-
promise
protected final io.netty.util.concurrent.Promise<PCEPSessionImpl> promise
-
-
Constructor Detail
-
AbstractSessionNegotiator
protected AbstractSessionNegotiator(io.netty.util.concurrent.Promise<PCEPSessionImpl> promise, io.netty.channel.Channel channel)
-
-
Method Detail
-
negotiationSuccessful
protected final void negotiationSuccessful(PCEPSessionImpl session)
-
negotiationFailed
protected void negotiationFailed(Throwable cause)
-
sendMessage
protected final void sendMessage(Message msg)
-
channelActive
public final void channelActive(io.netty.channel.ChannelHandlerContext ctx)
- Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead
public final void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
startNegotiation
protected abstract void startNegotiation() throws ExecutionException- Throws:
ExecutionException
-
handleMessage
protected abstract void handleMessage(Message msg)
-
-