- public NetconfClientDispatcher(final Optional<SSLContext> maybeContext) {
- this.maybeContext = Preconditions.checkNotNull(maybeContext);
- this.negotatorFactory = new NetconfClientSessionNegotiatorFactory(new HashedWheelTimer());
+ private final NetconfClientSessionNegotiatorFactory negotiatorFactory;
+ private final HashedWheelTimer timer;
+
+ public NetconfClientDispatcher(EventLoopGroup bossGroup, EventLoopGroup workerGroup,
+ long clientConnectionTimeoutMillis) {
+ super(bossGroup, workerGroup);
+ timer = new HashedWheelTimer();
+ this.negotiatorFactory = new NetconfClientSessionNegotiatorFactory(timer,
+ Optional.<NetconfHelloMessageAdditionalHeader> absent(), clientConnectionTimeoutMillis);
+ }
+
+ public NetconfClientDispatcher(EventLoopGroup bossGroup, EventLoopGroup workerGroup,
+ NetconfHelloMessageAdditionalHeader additionalHeader, long connectionTimeoutMillis) {
+ super(bossGroup, workerGroup);
+ timer = new HashedWheelTimer();
+ this.negotiatorFactory = new NetconfClientSessionNegotiatorFactory(timer, Optional.of(additionalHeader),
+ connectionTimeoutMillis);