Class PCEPSessionImpl
- java.lang.Object
- 
- io.netty.channel.ChannelHandlerAdapter
- 
- io.netty.channel.ChannelInboundHandlerAdapter
- 
- io.netty.channel.SimpleChannelInboundHandler<Message>
- 
- org.opendaylight.protocol.pcep.impl.PCEPSessionImpl
 
 
 
 
- 
- All Implemented Interfaces:
- io.netty.channel.ChannelHandler,- io.netty.channel.ChannelInboundHandler,- AutoCloseable,- PCEPSession,- PCEPSessionState
 
 public class PCEPSessionImpl extends io.netty.channel.SimpleChannelInboundHandler<Message> implements PCEPSession Implementation of PCEPSession. (Not final for testing.)
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)protected voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, Message msg)voidclose()Closes PCEP session without sending a Close message, as the channel is no longer active.voidclose(TerminationReason reason)Closes PCEP session, cancels all timers, returns to state Idle, sends the Close Message.voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)IntegergetDeadTimerValue()IntegergetKeepAliveTimerValue()OpengetLocalOpen()The local (PCE) Open Message.LocalPrefgetLocalPref()The local (PCE) preferences.TlvsgetLocalTlvs()Returns session characteristics of the local PCEP Speaker.MessagesgetMessages()The statistics of PCEP received/sent messages from the PCE point of view.PeerPrefgetPeerPref()The remote peer (PCC) preferences.InetAddressgetRemoteAddress()Returns remote address.TlvsgetRemoteTlvs()Returns session characteristics of the remote PCEP Speaker.voidhandleMessage(Message msg)Handles incoming message.voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx)booleanisClosed()io.netty.util.concurrent.Future<Void>sendMessage(Message msg)Sends message to serialization.StringtoString()- 
Methods inherited from class io.netty.channel.SimpleChannelInboundHandleracceptInboundMessage, channelRead
 - 
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapterchannelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
 - 
Methods inherited from class io.netty.channel.ChannelHandlerAdapterensureNotSharable, handlerRemoved, isSharable
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.opendaylight.protocol.pcep.PCEPSessionlocalSessionCharacteristics
 
- 
 
- 
- 
- 
Method Detail- 
getKeepAliveTimerValuepublic final Integer getKeepAliveTimerValue() 
 - 
getDeadTimerValuepublic final Integer getDeadTimerValue() 
 - 
sendMessagepublic io.netty.util.concurrent.Future<Void> sendMessage(Message msg) Sends message to serialization.- Specified by:
- sendMessagein interface- PCEPSession
- Parameters:
- msg- to be sent
- Returns:
- Future promise which will be succeed when the message is enqueued in the socket.
 
 - 
isClosedpublic boolean isClosed() 
 - 
closepublic void close() Closes PCEP session without sending a Close message, as the channel is no longer active.- Specified by:
- closein interface- AutoCloseable
 
 - 
closepublic void close(TerminationReason reason) Closes PCEP session, cancels all timers, returns to state Idle, sends the Close Message. KeepAlive and DeadTimer are cancelled if the state of the session changes to IDLE. This method is used to close the PCEP session from inside the session or from the listener, therefore the parent of this session should be informed.- Specified by:
- closein interface- PCEPSession
 
 - 
getRemoteTlvspublic Tlvs getRemoteTlvs() Description copied from interface:PCEPSessionReturns session characteristics of the remote PCEP Speaker.- Specified by:
- getRemoteTlvsin interface- PCEPSession
- Returns:
- Open message TLVs
 
 - 
getRemoteAddresspublic InetAddress getRemoteAddress() Description copied from interface:PCEPSessionReturns remote address.- Specified by:
- getRemoteAddressin interface- PCEPSession
- Returns:
- inet address
 
 - 
handleMessagepublic void handleMessage(Message msg) Handles incoming message. If the session is up, it notifies the user. The user is notified about every message except KeepAlive.- Parameters:
- msg- incoming message
 
 - 
getMessagespublic Messages getMessages() Description copied from interface:PCEPSessionStateThe statistics of PCEP received/sent messages from the PCE point of view.- Specified by:
- getMessagesin interface- PCEPSessionState
- Returns:
- messages
 
 - 
getLocalPrefpublic LocalPref getLocalPref() Description copied from interface:PCEPSessionStateThe local (PCE) preferences.- Specified by:
- getLocalPrefin interface- PCEPSessionState
- Returns:
- local preferences
 
 - 
getPeerPrefpublic PeerPref getPeerPref() Description copied from interface:PCEPSessionStateThe remote peer (PCC) preferences.- Specified by:
- getPeerPrefin interface- PCEPSessionState
- Returns:
- peer preferences
 
 - 
getLocalOpenpublic Open getLocalOpen() Description copied from interface:PCEPSessionStateThe local (PCE) Open Message.- Specified by:
- getLocalOpenin interface- PCEPSessionState
- Returns:
- Open
 
 - 
channelInactivepublic final void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception- Specified by:
- channelInactivein interface- io.netty.channel.ChannelInboundHandler
- Overrides:
- channelInactivein class- io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
- Exception
 
 - 
channelRead0protected final void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Message msg)- Specified by:
- channelRead0in class- io.netty.channel.SimpleChannelInboundHandler<Message>
 
 - 
handlerAddedpublic final void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
- handlerAddedin interface- io.netty.channel.ChannelHandler
- Overrides:
- handlerAddedin class- io.netty.channel.ChannelHandlerAdapter
 
 - 
exceptionCaughtpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)- Specified by:
- exceptionCaughtin interface- io.netty.channel.ChannelHandler
- Specified by:
- exceptionCaughtin interface- io.netty.channel.ChannelInboundHandler
- Overrides:
- exceptionCaughtin class- io.netty.channel.ChannelInboundHandlerAdapter
 
 - 
getLocalTlvspublic Tlvs getLocalTlvs() Description copied from interface:PCEPSessionReturns session characteristics of the local PCEP Speaker.- Specified by:
- getLocalTlvsin interface- PCEPSession
- Returns:
- Open message TLVs
 
 
- 
 
-