public class Connection<T extends SshContext> extends java.lang.Object implements EventTrigger, SshConnection
| Constructor and Description |
|---|
Connection(T context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(EventListener listener) |
void |
addTask(ConnectionAwareTask r) |
void |
addTask(java.lang.Integer queue,
ConnectionAwareTask r) |
void |
addTask(java.lang.Runnable r) |
void |
close() |
boolean |
containsProperty(java.lang.String name) |
void |
disconnect() |
void |
disconnect(int reason,
java.lang.String message) |
void |
disconnect(java.lang.String reason) |
<R> java.util.concurrent.Future<R> |
executeTask(java.util.concurrent.Callable<R> task) |
void |
executeTask(java.lang.Runnable r) |
void |
fireEvent(Event evt) |
AuthenticatedFuture |
getAuthenticatedFuture() |
java.lang.String |
getCipherInUseCS() |
java.lang.String |
getCipherInUseSC() |
java.lang.String |
getCompressionInUseCS() |
java.lang.String |
getCompressionInUseSC() |
SshConnectionManager |
getConnectionManager() |
ConnectionProtocol<T> |
getConnectionProtocol() |
T |
getContext() |
AbstractRequestFuture |
getDisconnectFuture() |
SshPublicKey |
getHostKey() |
java.lang.String |
getHostKeyAlgorithm() |
java.lang.String |
getHostKeyInUse() |
java.lang.String |
getKeyExchangeInUse() |
java.net.InetAddress |
getLocalAddress() |
java.util.Locale |
getLocale() |
java.lang.String |
getLocalIdentification() |
int |
getLocalPort() |
java.net.SocketAddress |
getLocalSocketAddress() |
java.lang.String |
getMacInUseCS() |
java.lang.String |
getMacInUseSC() |
java.lang.Object |
getProperty(java.lang.String name) |
java.util.Set<java.lang.String> |
getPropertyNames() |
java.net.InetAddress |
getRemoteAddress() |
java.lang.String[] |
getRemoteCiphersCS() |
java.lang.String[] |
getRemoteCiphersSC() |
java.lang.String[] |
getRemoteCompressionsCS() |
java.lang.String[] |
getRemoteCompressionsSC() |
java.lang.String |
getRemoteIdentification() |
java.lang.String[] |
getRemoteKeyExchanges() |
java.lang.String[] |
getRemoteMacsCS() |
java.lang.String[] |
getRemoteMacsSC() |
int |
getRemotePort() |
java.lang.String[] |
getRemotePublicKeys() |
java.net.SocketAddress |
getRemoteSocketAddress() |
java.lang.String |
getServerVersion() |
java.lang.String |
getSessionId() |
java.util.Date |
getStartTime() |
long |
getTotalBytesIn() |
long |
getTotalBytesOut() |
java.lang.String |
getUsername() |
java.lang.String |
getUUID() |
boolean |
isAuthenticated() |
boolean |
isConnected() |
boolean |
isDisconnected() |
void |
openChannel(Channel channel) |
void |
removeEventListener(EventListener listener) |
void |
removeProperty(java.lang.String name) |
void |
sendGlobalRequest(GlobalRequest request,
boolean wantReply) |
void |
setProperty(java.lang.String name,
java.lang.Object val) |
void |
setUsername(java.lang.String username) |
void |
startLogging() |
void |
startLogging(com.sshtools.common.logger.Log.Level level) |
public Connection(T context)
public void addEventListener(EventListener listener)
addEventListener in interface SshConnectionpublic void removeEventListener(EventListener listener)
removeEventListener in interface SshConnectionpublic void fireEvent(Event evt)
fireEvent in interface EventTriggerpublic AuthenticatedFuture getAuthenticatedFuture()
getAuthenticatedFuture in interface SshConnectionpublic java.lang.String getSessionId()
getSessionId in interface SshConnectionpublic java.lang.String getRemoteIdentification()
getRemoteIdentification in interface SshConnectionpublic void addTask(ConnectionAwareTask r)
addTask in interface SshConnectionpublic void addTask(java.lang.Runnable r)
public <R> java.util.concurrent.Future<R> executeTask(java.util.concurrent.Callable<R> task)
public void executeTask(java.lang.Runnable r)
executeTask in interface SshConnectionpublic java.lang.String getUUID()
getUUID in interface SshConnectionpublic java.lang.String getUsername()
getUsername in interface SshConnectionpublic java.util.Date getStartTime()
public long getTotalBytesIn()
public long getTotalBytesOut()
public java.net.InetAddress getRemoteAddress()
getRemoteAddress in interface SshConnectionpublic int getRemotePort()
getRemotePort in interface SshConnectionpublic java.net.SocketAddress getRemoteSocketAddress()
public java.net.SocketAddress getLocalSocketAddress()
public java.net.InetAddress getLocalAddress()
getLocalAddress in interface SshConnectionpublic int getLocalPort()
getLocalPort in interface SshConnectionpublic boolean isDisconnected()
public void disconnect()
disconnect in interface SshConnectionpublic void disconnect(java.lang.String reason)
disconnect in interface SshConnectionpublic java.lang.Object getProperty(java.lang.String name)
getProperty in interface SshConnectionpublic void setProperty(java.lang.String name,
java.lang.Object val)
setProperty in interface SshConnectionpublic java.util.Set<java.lang.String> getPropertyNames()
public boolean isAuthenticated()
isAuthenticated in interface SshConnectionpublic T getContext()
getContext in interface SshConnectionpublic boolean containsProperty(java.lang.String name)
containsProperty in interface SshConnectionpublic void setUsername(java.lang.String username)
setUsername in interface SshConnectionpublic ConnectionProtocol<T> getConnectionProtocol()
public void removeProperty(java.lang.String name)
removeProperty in interface SshConnectionpublic java.lang.String getHostKeyAlgorithm()
public java.lang.String getCipherInUseCS()
getCipherInUseCS in interface SshConnectionpublic java.lang.String getCipherInUseSC()
getCipherInUseSC in interface SshConnectionpublic java.lang.String getMacInUseCS()
getMacInUseCS in interface SshConnectionpublic java.lang.String getMacInUseSC()
getMacInUseSC in interface SshConnectionpublic java.lang.String getCompressionInUseCS()
getCompressionInUseCS in interface SshConnectionpublic java.lang.String getCompressionInUseSC()
getCompressionInUseSC in interface SshConnectionpublic void close()
public java.util.Locale getLocale()
getLocale in interface SshConnectionpublic SshConnectionManager getConnectionManager()
getConnectionManager in interface SshConnectionpublic boolean isConnected()
isConnected in interface SshConnectionpublic void addTask(java.lang.Integer queue,
ConnectionAwareTask r)
addTask in interface SshConnectionpublic void disconnect(int reason,
java.lang.String message)
disconnect in interface SshConnectionpublic java.lang.String getServerVersion()
getServerVersion in interface SshConnectionpublic void openChannel(Channel channel)
openChannel in interface SshConnectionpublic void startLogging(com.sshtools.common.logger.Log.Level level)
throws java.io.IOException
startLogging in interface SshConnectionjava.io.IOExceptionpublic void startLogging()
throws java.io.IOException
startLogging in interface SshConnectionjava.io.IOExceptionpublic AbstractRequestFuture getDisconnectFuture()
public SshPublicKey getHostKey()
getHostKey in interface SshConnectionpublic java.lang.String[] getRemotePublicKeys()
getRemotePublicKeys in interface SshConnectionpublic java.lang.String[] getRemoteKeyExchanges()
getRemoteKeyExchanges in interface SshConnectionpublic java.lang.String[] getRemoteCompressionsCS()
getRemoteCompressionsCS in interface SshConnectionpublic java.lang.String[] getRemoteCompressionsSC()
getRemoteCompressionsSC in interface SshConnectionpublic java.lang.String[] getRemoteCiphersCS()
getRemoteCiphersCS in interface SshConnectionpublic java.lang.String[] getRemoteCiphersSC()
getRemoteCiphersSC in interface SshConnectionpublic java.lang.String[] getRemoteMacsCS()
getRemoteMacsCS in interface SshConnectionpublic java.lang.String[] getRemoteMacsSC()
getRemoteMacsSC in interface SshConnectionpublic java.lang.String getKeyExchangeInUse()
getKeyExchangeInUse in interface SshConnectionpublic java.lang.String getHostKeyInUse()
getHostKeyInUse in interface SshConnectionpublic java.lang.String getLocalIdentification()
public void sendGlobalRequest(GlobalRequest request, boolean wantReply)
sendGlobalRequest in interface SshConnectionCopyright © 2021. All rights reserved.