Class AbstractNetconfSession<S extends NetconfSession,L extends NetconfSessionListener<S>>

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Object>
org.opendaylight.netconf.nettyutil.AbstractNetconfSession<S,L>
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, Closeable, AutoCloseable, NetconfSession
Direct Known Subclasses:
AbstractNetconfExiSession

public abstract class AbstractNetconfSession<S extends NetconfSession,L extends NetconfSessionListener<S>> extends io.netty.channel.SimpleChannelInboundHandler<Object> implements NetconfSession
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final @NonNull io.netty.channel.Channel
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractNetconfSession(L sessionListener, io.netty.channel.Channel channel, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.SessionIdType sessionId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.google.common.base.MoreObjects.ToStringHelper
    addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper helper)
     
    final void
    channelInactive(io.netty.channel.ChannelHandlerContext ctx)
     
    protected final void
    channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    void
     
    protected void
     
    protected void
     
    protected void
    handleMessage(NetconfMessage netconfMessage)
     
    final void
    handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
     
    final boolean
     
    protected final @NonNull MessageEncoder
     
    protected final <T extends io.netty.channel.ChannelHandler>
    void
    replaceChannelHandler(Class<T> type, String name, T handler)
     
    io.netty.channel.ChannelFuture
    sendMessage(NetconfMessage netconfMessage)
     
    final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.SessionIdType
     
    protected void
     
    protected abstract S
     
    final String
     

    Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

    acceptInboundMessage, channelRead

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerRemoved
  • Field Details

    • channel

      protected final @NonNull io.netty.channel.Channel channel
  • Constructor Details

    • AbstractNetconfSession

      protected AbstractNetconfSession(L sessionListener, io.netty.channel.Channel channel, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.SessionIdType sessionId)
  • Method Details

    • sessionId

      public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.base._1._0.rev110601.SessionIdType sessionId()
      Specified by:
      sessionId in interface NetconfSession
    • thisInstance

      protected abstract S thisInstance()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface NetconfSession
    • handleMessage

      protected void handleMessage(NetconfMessage netconfMessage)
    • handleError

      protected void handleError(Exception failure)
    • sendMessage

      public io.netty.channel.ChannelFuture sendMessage(NetconfMessage netconfMessage)
      Specified by:
      sendMessage in interface NetconfSession
    • endOfInput

      protected void endOfInput()
    • sessionUp

      protected void sessionUp()
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • addToStringAttributes

      protected com.google.common.base.MoreObjects.ToStringHelper addToStringAttributes(com.google.common.base.MoreObjects.ToStringHelper helper)
    • replaceChannelHandler

      protected final <T extends io.netty.channel.ChannelHandler> void replaceChannelHandler(Class<T> type, String name, T handler)
    • messageEncoder

      protected final @NonNull MessageEncoder messageEncoder()
    • isUp

      public final boolean isUp()
    • channelInactive

      public final void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
    • channelRead0

      protected final void channelRead0(io.netty.channel.ChannelHandlerContext ctx, Object msg)
      Specified by:
      channelRead0 in class io.netty.channel.SimpleChannelInboundHandler<Object>
    • handlerAdded

      public final void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      handlerAdded in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerAdded in class io.netty.channel.ChannelHandlerAdapter