Class AbstractNetconfDispatcher<S extends org.opendaylight.netconf.api.NetconfSession,​L extends org.opendaylight.netconf.api.NetconfSessionListener<? super S>>

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    @Deprecated
    public abstract class AbstractNetconfDispatcher<S extends org.opendaylight.netconf.api.NetconfSession,​L extends org.opendaylight.netconf.api.NetconfSessionListener<? super S>>
    extends Object
    implements Closeable
    Deprecated.
    Dispatcher class for creating servers and clients. The idea is to first create servers and clients and the run the start method that will handle sockets in different thread.
    • Constructor Detail

      • AbstractNetconfDispatcher

        protected AbstractNetconfDispatcher​(io.netty.channel.EventLoopGroup bossGroup,
                                            io.netty.channel.EventLoopGroup workerGroup)
        Deprecated.
      • AbstractNetconfDispatcher

        protected AbstractNetconfDispatcher​(io.netty.util.concurrent.EventExecutor executor,
                                            io.netty.channel.EventLoopGroup bossGroup,
                                            io.netty.channel.EventLoopGroup workerGroup)
        Deprecated.
    • Method Detail

      • createServer

        protected io.netty.channel.ChannelFuture createServer​(InetSocketAddress address,
                                                              AbstractNetconfDispatcher.PipelineInitializer<S> initializer)
        Deprecated.
        Creates server. Each server needs factories to pass their instances to client sessions.
        Parameters:
        address - address to which the server should be bound
        initializer - instance of PipelineInitializer used to initialize the channel pipeline
        Returns:
        ChannelFuture representing the binding process
      • createServer

        protected <C extends io.netty.channel.Channel> io.netty.channel.ChannelFuture createServer​(SocketAddress address,
                                                                                                   Class<? extends io.netty.channel.ServerChannel> channelClass,
                                                                                                   AbstractNetconfDispatcher.ChannelPipelineInitializer<C,​S> initializer)
        Deprecated.
        Creates server. Each server needs factories to pass their instances to client sessions.
        Parameters:
        address - address to which the server should be bound
        channelClass - The Class which is used to create Channel instances from.
        initializer - instance of PipelineInitializer used to initialize the channel pipeline
        Returns:
        ChannelFuture representing the binding process
      • customizeBootstrap

        protected void customizeBootstrap​(io.netty.bootstrap.ServerBootstrap bootstrap)
        Deprecated.
        Customize a server bootstrap before the server is created. This allows subclasses to assign non-default server options before the server is created.
        Parameters:
        bootstrap - Server bootstrap
      • customizeBootstrap

        protected void customizeBootstrap​(io.netty.bootstrap.Bootstrap bootstrap)
        Deprecated.
        Customize a client bootstrap before the connection is attempted. This allows subclasses to assign non-default options before the client is created.
        Parameters:
        bootstrap - Client bootstrap
      • createClient

        protected io.netty.util.concurrent.Future<S> createClient​(InetSocketAddress address,
                                                                  ReconnectStrategy strategy,
                                                                  AbstractNetconfDispatcher.PipelineInitializer<S> initializer)
        Deprecated.
        Creates a client.
        Parameters:
        address - remote address
        strategy - Reconnection strategy to be used when initial connection fails
        Returns:
        Future representing the connection process. Its result represents the combined success of TCP connection as well as session negotiation.
      • createClient

        protected io.netty.util.concurrent.Future<S> createClient​(InetSocketAddress address,
                                                                  ReconnectStrategy strategy,
                                                                  io.netty.bootstrap.Bootstrap bootstrap,
                                                                  AbstractNetconfDispatcher.PipelineInitializer<S> initializer)
        Deprecated.
        Create a client but use a pre-configured bootstrap. This method however replaces the ChannelInitializer in the bootstrap. All other configuration is preserved.
        Parameters:
        address - remote address
      • createReconnectingClient

        protected io.netty.util.concurrent.Future<Void> createReconnectingClient​(InetSocketAddress address,
                                                                                 ReconnectStrategyFactory connectStrategyFactory,
                                                                                 AbstractNetconfDispatcher.PipelineInitializer<S> initializer)
        Deprecated.
        Creates a reconnecting client.
        Parameters:
        address - remote address
        connectStrategyFactory - Factory for creating reconnection strategy for every reconnect attempt
        Returns:
        Future representing the reconnection task. It will report completion based on reestablishStrategy, e.g. success is never reported, only failure when it runs out of reconnection attempts.