mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-08 16:18:05 +03:00
Remove long deprecated code
This commit is contained in:
@@ -140,7 +140,7 @@ public class SSHClient
|
|||||||
super(DEFAULT_PORT);
|
super(DEFAULT_PORT);
|
||||||
loggerFactory = config.getLoggerFactory();
|
loggerFactory = config.getLoggerFactory();
|
||||||
log = loggerFactory.getLogger(getClass());
|
log = loggerFactory.getLogger(getClass());
|
||||||
this.trans = new TransportImpl(config, this);
|
this.trans = new TransportImpl(config);
|
||||||
this.auth = new UserAuthImpl(trans);
|
this.auth = new UserAuthImpl(trans);
|
||||||
this.conn = new ConnectionImpl(trans, config.getKeepAliveProvider());
|
this.conn = new ConnectionImpl(trans, config.getKeepAliveProvider());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,22 +85,6 @@ public interface Transport
|
|||||||
*/
|
*/
|
||||||
void setTimeoutMs(int timeout);
|
void setTimeoutMs(int timeout);
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the interval in seconds at which a heartbeat message is sent to the server
|
|
||||||
* @deprecated Moved to {@link net.schmizz.keepalive.KeepAlive#getKeepAliveInterval()}. This is accessible through the {@link net.schmizz.sshj.connection.Connection}.
|
|
||||||
* Scheduled to be removed in 0.12.0
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
int getHeartbeatInterval();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param interval the interval in seconds, {@code 0} means no heartbeat
|
|
||||||
* @deprecated Moved to {@link net.schmizz.keepalive.KeepAlive#getKeepAliveInterval()}. This is accessible through the {@link net.schmizz.sshj.connection.Connection}.
|
|
||||||
* Scheduled to be removed in 0.12.0
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
void setHeartbeatInterval(int interval);
|
|
||||||
|
|
||||||
/** @return the hostname to which this transport is connected. */
|
/** @return the hostname to which this transport is connected. */
|
||||||
String getRemoteHost();
|
String getRemoteHost();
|
||||||
|
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ public final class TransportImpl
|
|||||||
|
|
||||||
private final Reader reader;
|
private final Reader reader;
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated Moved to {@link net.schmizz.sshj.SSHClient}
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
private final SSHClient sshClient;
|
|
||||||
|
|
||||||
private final Encoder encoder;
|
private final Encoder encoder;
|
||||||
|
|
||||||
private final Decoder decoder;
|
private final Decoder decoder;
|
||||||
@@ -147,29 +141,6 @@ public final class TransportImpl
|
|||||||
this.decoder = new Decoder(this);
|
this.decoder = new Decoder(this);
|
||||||
this.kexer = new KeyExchanger(this);
|
this.kexer = new KeyExchanger(this);
|
||||||
this.clientID = String.format("SSH-2.0-%s", config.getVersion());
|
this.clientID = String.format("SSH-2.0-%s", config.getVersion());
|
||||||
this.sshClient = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Temporary constructor until we remove support for the set/get Heartbeat interval from transport.
|
|
||||||
* @deprecated To be removed in 0.12.0
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public TransportImpl(Config config, SSHClient sshClient) {
|
|
||||||
this.config = config;
|
|
||||||
this.loggerFactory = config.getLoggerFactory();
|
|
||||||
this.serviceAccept = new Event<TransportException>("service accept", TransportException.chainer, loggerFactory);
|
|
||||||
this.close = new Event<TransportException>("transport close", TransportException.chainer, loggerFactory);
|
|
||||||
this.log = loggerFactory.getLogger(getClass());
|
|
||||||
this.nullService = new NullService(this);
|
|
||||||
this.service = nullService;
|
|
||||||
this.disconnectListener = this;
|
|
||||||
this.reader = new Reader(this);
|
|
||||||
this.encoder = new Encoder(config.getRandomFactory().create(), writeLock, loggerFactory);
|
|
||||||
this.decoder = new Decoder(this);
|
|
||||||
this.kexer = new KeyExchanger(this);
|
|
||||||
this.clientID = String.format("SSH-2.0-%s", config.getVersion());
|
|
||||||
this.sshClient = sshClient;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -286,20 +257,6 @@ public final class TransportImpl
|
|||||||
this.timeoutMs = timeoutMs;
|
this.timeoutMs = timeoutMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public int getHeartbeatInterval() {
|
|
||||||
log.warn("**Deprecated**: Please use: sshClient.getConnection().getKeepAlive().getKeepAliveInterval()");
|
|
||||||
return sshClient.getConnection().getKeepAlive().getKeepAliveInterval();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public void setHeartbeatInterval(int interval) {
|
|
||||||
log.warn("**Deprecated**: Please use: sshClient.getConnection().getKeepAlive().setKeepAliveInterval()");
|
|
||||||
sshClient.getConnection().getKeepAlive().setKeepAliveInterval(interval);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRemoteHost() {
|
public String getRemoteHost() {
|
||||||
return connInfo.host;
|
return connInfo.host;
|
||||||
|
|||||||
Reference in New Issue
Block a user