public class PCEPSessionImpl extends io.netty.channel.SimpleChannelInboundHandler<Message> implements PCEPSession
Modifier and Type | Field and Description |
---|---|
protected long |
lastMessageSentAt
System.nanoTime value about when was sent the last message Protected to be updated also in tests.
|
QNAME
Modifier and Type | Method and Description |
---|---|
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
Message msg) |
void |
close()
Closes PCEP session without sending a Close message, as the channel is no longer active.
|
void |
close(TerminationReason reason)
Closes PCEP session, cancels all timers, returns to state Idle, sends the Close Message.
|
void |
endOfInput() |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
Integer |
getDeadTimerValue() |
Class<? extends org.opendaylight.yangtools.yang.binding.DataContainer> |
getImplementedInterface() |
Integer |
getKeepAliveTimerValue() |
LocalPref |
getLocalPref()
The local (PCE) preferences.
|
Messages |
getMessages()
The statistics of PCEP received/sent messages from the PCE point of view.
|
PeerPref |
getPeerPref()
The remote peer (PCC) preferences.
|
InetAddress |
getRemoteAddress() |
Tlvs |
getRemoteTlvs() |
void |
handleMalformedMessage(PCEPErrors error)
The fact, that a message is malformed, comes from parser.
|
void |
handleMessage(Message msg)
Handles incoming message.
|
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
boolean |
isClosed() |
Tlvs |
localSessionCharacteristics()
Returns session characteristics of the local PCEP Speaker
|
void |
resetStats() |
io.netty.util.concurrent.Future<Void> |
sendMessage(Message msg)
Sends message to serialization.
|
String |
toString() |
acceptInboundMessage, channelRead
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
protected volatile long lastMessageSentAt
public final Integer getKeepAliveTimerValue()
public final Integer getDeadTimerValue()
public io.netty.util.concurrent.Future<Void> sendMessage(Message msg)
sendMessage
in interface PCEPSession
msg
- to be sentpublic boolean isClosed()
public void close()
close
in interface AutoCloseable
public void close(TerminationReason reason)
close
in interface PCEPSession
public Tlvs getRemoteTlvs()
getRemoteTlvs
in interface PCEPSession
public InetAddress getRemoteAddress()
getRemoteAddress
in interface PCEPSession
public void endOfInput()
public void handleMalformedMessage(PCEPErrors error)
error
- documented error in RFC5440 or draftpublic void handleMessage(Message msg)
msg
- incoming messagepublic Messages getMessages()
PcepSessionState
getMessages
in interface PcepSessionState
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.stats.rev141006.pcep.session.state.Messages
messages
, or null
if not presentpublic LocalPref getLocalPref()
PcepSessionState
getLocalPref
in interface PcepSessionState
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.stats.rev141006.pcep.session.state.LocalPref
localPref
, or null
if not presentpublic PeerPref getPeerPref()
PcepSessionState
getPeerPref
in interface PcepSessionState
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.stats.rev141006.pcep.session.state.PeerPref
peerPref
, or null
if not presentpublic Class<? extends org.opendaylight.yangtools.yang.binding.DataContainer> getImplementedInterface()
getImplementedInterface
in interface org.opendaylight.yangtools.yang.binding.DataContainer
public void resetStats()
resetStats
in interface PCEPSession
public final void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
protected final void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Message msg)
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler<Message>
public final void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
handlerAdded
in interface io.netty.channel.ChannelHandler
handlerAdded
in class io.netty.channel.ChannelHandlerAdapter
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
public Tlvs localSessionCharacteristics()
PCEPSession
localSessionCharacteristics
in interface PCEPSession
Copyright © 2018 OpenDaylight. All rights reserved.