mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
minor
This commit is contained in:
@@ -48,10 +48,6 @@ public abstract class AbstractService
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getTimeout() {
|
||||
return this.timeout;
|
||||
}
|
||||
|
||||
public void handle(Message msg, SSHPacket buf)
|
||||
throws SSHException {
|
||||
trans.sendUnimplemented();
|
||||
@@ -66,6 +62,11 @@ public abstract class AbstractService
|
||||
throw new SSHException(DisconnectReason.PROTOCOL_ERROR, "Unexpected: SSH_MSG_UNIMPLEMENTED");
|
||||
}
|
||||
|
||||
public void notifyDisconnect()
|
||||
throws SSHException {
|
||||
log.debug("Was notified of disconnect");
|
||||
}
|
||||
|
||||
public void request()
|
||||
throws TransportException {
|
||||
final Service active = trans.getService();
|
||||
@@ -76,13 +77,12 @@ public abstract class AbstractService
|
||||
trans.reqService(this);
|
||||
}
|
||||
|
||||
public int getTimeout() {
|
||||
return this.timeout;
|
||||
}
|
||||
|
||||
public void setTimeout(int timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public void notifyDisconnect()
|
||||
throws SSHException {
|
||||
log.debug("Was notified of disconnect");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -142,4 +142,5 @@ public interface Config {
|
||||
* @param version software version info
|
||||
*/
|
||||
void setVersion(String version);
|
||||
|
||||
}
|
||||
|
||||
@@ -63,19 +63,19 @@ public enum Message {
|
||||
|
||||
private final byte b;
|
||||
|
||||
private static final Message[] commands = new Message[256];
|
||||
private static final Message[] cache = new Message[256];
|
||||
|
||||
static {
|
||||
for (Message c : Message.values())
|
||||
if (commands[c.toByte()] == null)
|
||||
commands[c.toByte()] = c;
|
||||
if (cache[c.toByte()] == null)
|
||||
cache[c.toByte()] = c;
|
||||
}
|
||||
|
||||
public static Message fromByte(byte b) {
|
||||
return commands[b];
|
||||
return cache[b];
|
||||
}
|
||||
|
||||
Message(int b) {
|
||||
private Message(int b) {
|
||||
this.b = (byte) b;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,13 +119,19 @@ public interface Connection {
|
||||
/**
|
||||
* Set the maximum packet size for the local window this connection recommends to any {@link Channel}'s that ask for
|
||||
* it.
|
||||
*
|
||||
* @param maxPacketSize maximum packet size in bytes
|
||||
*/
|
||||
void setMaxPacketSize(int maxPacketSize);
|
||||
|
||||
/** Get the size for the local window this connection recommends to any {@link Channel}'s that ask for it. */
|
||||
/** @return the size for the local window this connection recommends to any {@link Channel}'s that ask for it. */
|
||||
int getWindowSize();
|
||||
|
||||
/** Set the size for the local window this connection recommends to any {@link Channel}'s that ask for it. */
|
||||
/**
|
||||
* Set the size for the local window this connection recommends to any {@link Channel}'s that ask for it.
|
||||
*
|
||||
* @param windowSize window size in bytes
|
||||
*/
|
||||
void setWindowSize(int windowSize);
|
||||
|
||||
/** @return the associated {@link Transport}. */
|
||||
|
||||
@@ -134,7 +134,6 @@ class Proposal {
|
||||
|
||||
public SSHPacket getPacket() {
|
||||
return new SSHPacket(packet);
|
||||
|
||||
}
|
||||
|
||||
public NegotiatedAlgorithms negotiate(Proposal other)
|
||||
|
||||
Reference in New Issue
Block a user