org.apache.sshd.client.future
Class DefaultConnectFuture

java.lang.Object
  extended by org.apache.sshd.common.future.DefaultSshFuture<ConnectFuture>
      extended by 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

Constructor Summary
DefaultConnectFuture(Object lock)
           
 
Method Summary
 Throwable getException()
          Returns the cause of the connection failure.
 ClientSession getSession()
           
 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 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
 
Methods inherited from interface org.apache.sshd.client.future.ConnectFuture
cancel, isCanceled
 
Methods inherited from interface org.apache.sshd.common.future.SshFuture
addListener, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, isDone, removeListener
 

Constructor Detail

DefaultConnectFuture

public DefaultConnectFuture(Object lock)
Method Detail

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.