public void open() throws IOException {
start();
}
public CloseFuture close(boolean immediately) {
CloseFuture future;
if (connector != null) {
future = CloseableUtils.sequential(connector, ioServiceFactory).close(immediately);
} else if (ioServiceFactory != null) {
future = ioServiceFactory.close(immediately);
} else {
future = CloseableUtils.closed();
}
future.addListener(new SshFutureListener<CloseFuture>() {
public void operationComplete(CloseFuture future) {
connector = null;
ioServiceFactory = null;
if (shutdownExecutor && executor != null) {
executor.shutdown();