org.apache.sshd.client.future
Class DefaultConnectFuture
java.lang.Object
org.apache.sshd.common.future.DefaultSshFuture<ConnectFuture>
org.apache.sshd.client.future.DefaultConnectFuture
- All Implemented Interfaces:
- ConnectFuture, SshFuture<ConnectFuture>
public class DefaultConnectFuture
- extends DefaultSshFuture<ConnectFuture>
- implements ConnectFuture
A default implementation of ConnectFuture.
- Author:
- Apache MINA SSHD Project
|
Method Summary |
java.lang.Throwable |
getException()
Returns the cause of the connection failure. |
ClientSession |
getSession()
|
boolean |
isConnected()
Returns true if the connect operation is finished successfully. |
void |
setException(java.lang.Throwable exception)
Sets the exception caught due to connection failure and notifies all
threads waiting for this future. |
void |
setSession(ClientSession session)
Sets the newly connected session and notifies all threads waiting for
this future. |
| Methods inherited from class org.apache.sshd.common.future.DefaultSshFuture |
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, cancel, getValue, isCanceled, isDone, removeListener, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultConnectFuture
public DefaultConnectFuture(java.lang.Object lock)
getSession
public ClientSession getSession()
- Specified by:
getSession in interface ConnectFuture
getException
public java.lang.Throwable getException()
- Description copied from interface:
ConnectFuture
- Returns the cause of the connection failure.
- Specified by:
getException in interface ConnectFuture
- Returns:
- null if the connect operation is not finished yet,
or if the connection attempt is successful.
isConnected
public boolean isConnected()
- Description copied from interface:
ConnectFuture
- Returns true if the connect operation is finished successfully.
- Specified by:
isConnected in interface ConnectFuture
setSession
public void setSession(ClientSession session)
- Description copied from interface:
ConnectFuture
- Sets the newly connected session and notifies all threads waiting for
this future. This method is invoked by SSHD internally. Please do not
call this method directly.
- Specified by:
setSession in interface ConnectFuture
setException
public void setException(java.lang.Throwable exception)
- Description copied from interface:
ConnectFuture
- Sets the exception caught due to connection failure and notifies all
threads waiting for this future. This method is invoked by SSHD
internally. Please do not call this method directly.
- Specified by:
setException in interface ConnectFuture
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.