DEFAULT_CLIENT = c;
}
+ private final AtomicBoolean isDisconnected = new AtomicBoolean();
private final AuthenticationHandler authenticationHandler;
private final SshClient sshClient;
- private final AtomicBoolean isDisconnected = new AtomicBoolean();
- private Future<?> negotiationFuture;
+ private final Future<?> negotiationFuture;
private AsyncSshHandlerReader sshReadAsyncListener;
private AsyncSshHandlerWriter sshWriteAsyncHandler;
public AsyncSshHandler(final AuthenticationHandler authenticationHandler, final SshClient sshClient,
final Future<?> negotiationFuture) {
- this(authenticationHandler, sshClient);
+ this.authenticationHandler = requireNonNull(authenticationHandler);
+ this.sshClient = requireNonNull(sshClient);
this.negotiationFuture = negotiationFuture;
}
* @param authenticationHandler authentication handler
* @param sshClient started SshClient
*/
- public AsyncSshHandler(final AuthenticationHandler authenticationHandler,
- final SshClient sshClient) {
- this.authenticationHandler = requireNonNull(authenticationHandler);
- this.sshClient = requireNonNull(sshClient);
+ public AsyncSshHandler(final AuthenticationHandler authenticationHandler, final SshClient sshClient) {
+ this(authenticationHandler, sshClient, null);
}
public static AsyncSshHandler createForNetconfSubsystem(final AuthenticationHandler authenticationHandler) {