public interface HostConnector
Modifier and Type | Method and Description |
---|---|
default void |
connect()
建立连接
|
default void |
connect(int timeout)
建立连接
使用此方法可能会导致连接不上 但是还不会抛出异常!
|
default void |
disconnect()
关闭 channel 和 session
|
default void |
disconnectChannel()
关闭 channel
|
default void |
disconnectSession()
关闭 session
|
com.jcraft.jsch.Channel |
getChannel()
获取 channel
|
default com.jcraft.jsch.Session |
getSession()
获取 session
|
default boolean |
isClosed()
检查 channel 是否已关闭
|
default boolean |
isConnected()
检查 channel 是否已连接
|
default boolean |
isEof()
检查 channel 是否已结束
|
default void connect()
default void connect(int timeout)
Channel.sendChannelOpen()
的 retry 设置为 1timeout
- 超时时间 msdefault void disconnectChannel()
default void disconnectSession()
default void disconnect()
default boolean isConnected()
default boolean isClosed()
default boolean isEof()
default com.jcraft.jsch.Session getSession()
com.jcraft.jsch.Channel getChannel()
Copyright © 2024. All rights reserved.