public class BGPSessionImpl extends io.netty.channel.SimpleChannelInboundHandler<org.opendaylight.yangtools.yang.binding.Notification> implements BGPSession, BGPSessionStateProvider, AutoCloseable
Constructor and Description |
---|
BGPSessionImpl(BGPSessionListener listener,
io.netty.channel.Channel channel,
Open remoteOpen,
BGPSessionPreferences localPreferences,
BGPPeerRegistry peerRegistry) |
BGPSessionImpl(BGPSessionListener listener,
io.netty.channel.Channel channel,
Open remoteOpen,
int localHoldTimer,
BGPPeerRegistry peerRegistry) |
Modifier and Type | Method and Description |
---|---|
<T extends PeerConstraint> |
addDecoderConstraint(Class<T> constraintClass,
T constraint)
Add peer constraint to session pipeline decoder.
|
protected com.google.common.base.MoreObjects.ToStringHelper |
addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
channelRead0(io.netty.channel.ChannelHandlerContext ctx,
org.opendaylight.yangtools.yang.binding.Notification msg) |
void |
close() |
void |
closeWithoutMessage()
Close peer session without sending Notification message.
|
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
List<AddressFamilies> |
getAdvertisedAddPathTableTypes()
Return a list with Add Path tables supported advertised and corresponding SendReceive mode.
|
GracefulRestartCapability |
getAdvertisedGracefulRestartCapability()
Return advertised graceful capability containing the list of tables which the peer has advertised to support,
restart time and restarting flags.
|
LlGracefulRestartCapability |
getAdvertisedLlGracefulRestartCapability()
Return advertised long-lived graceful capability containing the list of tables with stale time which
the peer has advertised to support.
|
Set<BgpTableType> |
getAdvertisedTableTypes()
Return the list of tables which the peer has advertised to support.
|
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber |
getAsNumber()
Return the AS number which the peer advertises.
|
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address |
getBgpId()
Return the BGP router ID advertised by the peer.
|
BGPSessionState |
getBGPSessionState()
BGP Operational Session State.
|
BGPTimersState |
getBGPTimersState()
BGP Operational Timers State.
|
BGPTransportState |
getBGPTransportState()
BGP Operational Transport State.
|
ChannelOutputLimiter |
getLimiter() |
State |
getState() |
void |
handlerAdded(io.netty.channel.ChannelHandlerContext ctx) |
void |
registerMessagesCounter(BGPMessagesListener bgpMessagesListener)
Register BGP Operational Messages State Listener.
|
io.netty.util.concurrent.ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit)
Schedule a task to be executed in the context of the session handling thread.
|
void |
setChannelExtMsgCoder(Open remoteOpen)
Set the extend message coder for current channel.
|
String |
toString() |
acceptInboundMessage, channelRead
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
ensureNotSharable, handlerRemoved, isSharable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public BGPSessionImpl(BGPSessionListener listener, io.netty.channel.Channel channel, Open remoteOpen, BGPSessionPreferences localPreferences, BGPPeerRegistry peerRegistry)
public BGPSessionImpl(BGPSessionListener listener, io.netty.channel.Channel channel, Open remoteOpen, int localHoldTimer, BGPPeerRegistry peerRegistry)
public void setChannelExtMsgCoder(Open remoteOpen)
public void close()
close
in interface AutoCloseable
public void closeWithoutMessage()
BGPSession
closeWithoutMessage
in interface BGPSession
protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper toStringHelper)
public Set<BgpTableType> getAdvertisedTableTypes()
BGPSession
getAdvertisedTableTypes
in interface BGPSession
public List<AddressFamilies> getAdvertisedAddPathTableTypes()
BGPSession
getAdvertisedAddPathTableTypes
in interface BGPSession
public GracefulRestartCapability getAdvertisedGracefulRestartCapability()
BGPSession
getAdvertisedGracefulRestartCapability
in interface BGPSession
public LlGracefulRestartCapability getAdvertisedLlGracefulRestartCapability()
BGPSession
getAdvertisedLlGracefulRestartCapability
in interface BGPSession
public State getState()
public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address getBgpId()
BGPSession
getBgpId
in interface BGPSession
public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getAsNumber()
BGPSession
getAsNumber
in interface BGPSession
public ChannelOutputLimiter getLimiter()
public final void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
protected final void channelRead0(io.netty.channel.ChannelHandlerContext ctx, org.opendaylight.yangtools.yang.binding.Notification msg)
channelRead0
in class io.netty.channel.SimpleChannelInboundHandler<org.opendaylight.yangtools.yang.binding.Notification>
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 BGPSessionState getBGPSessionState()
BGPSessionStateProvider
getBGPSessionState
in interface BGPSessionStateProvider
public BGPTimersState getBGPTimersState()
BGPSessionStateProvider
getBGPTimersState
in interface BGPSessionStateProvider
public BGPTransportState getBGPTransportState()
BGPSessionStateProvider
getBGPTransportState
in interface BGPSessionStateProvider
public void registerMessagesCounter(BGPMessagesListener bgpMessagesListener)
BGPSessionStateProvider
registerMessagesCounter
in interface BGPSessionStateProvider
bgpMessagesListener
- BGPMessagesListenerpublic <T extends PeerConstraint> void addDecoderConstraint(Class<T> constraintClass, T constraint)
BGPSession
addDecoderConstraint
in interface BGPSession
public io.netty.util.concurrent.ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
BGPSession
schedule
in interface BGPSession
command
- the task to executedelay
- the time from now to delay executionunit
- the time unit of the delay parameterCopyright © 2020 OpenDaylight. All rights reserved.