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
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(Object lock)
getSession
public ClientSession getSession()
- Specified by:
getSession
in interface ConnectFuture
getException
public 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(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-2012 Apache Software Foundation. All Rights Reserved.