org.apache.sshd.client.future
Interface ConnectFuture

All Superinterfaces:
SshFuture<ConnectFuture>
All Known Implementing Classes:
DefaultConnectFuture

public interface ConnectFuture
extends SshFuture<ConnectFuture>

An SshFuture for asynchronous connections requests.

Author:
Apache MINA SSHD Project

Method Summary
 void cancel()
          Cancels the connection attempt and notifies all threads waiting for this future.
 Throwable getException()
          Returns the cause of the connection failure.
 ClientSession getSession()
           
 boolean isCanceled()
          Returns true if the connect operation has been canceled by cancel() method.
 boolean isConnected()
          Returns true if the connect operation is finished successfully.
 void setException(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 interface org.apache.sshd.common.future.SshFuture
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone, removeListener
 

Method Detail

getSession

ClientSession getSession()

getException

Throwable getException()
Returns the cause of the connection failure.

Returns:
null if the connect operation is not finished yet, or if the connection attempt is successful.

isConnected

boolean isConnected()
Returns true if the connect operation is finished successfully.


isCanceled

boolean isCanceled()
Returns true if the connect operation has been canceled by cancel() method.


setSession

void setSession(ClientSession session)
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.


setException

void setException(Throwable exception)
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.


cancel

void cancel()
Cancels the connection attempt and notifies all threads waiting for this future.



Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.