org.apache.sshd.client.future
Class DefaultOpenFuture

java.lang.Object
  extended by org.apache.sshd.common.future.DefaultSshFuture<OpenFuture>
      extended by org.apache.sshd.client.future.DefaultOpenFuture
All Implemented Interfaces:
OpenFuture, SshFuture<OpenFuture>

public class DefaultOpenFuture
extends DefaultSshFuture<OpenFuture>
implements OpenFuture

A default implementation of OpenFuture.

Author:
Apache MINA SSHD Project

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

Constructor Detail

DefaultOpenFuture

public DefaultOpenFuture(Object lock)
Method Detail

getException

public Throwable getException()
Description copied from interface: OpenFuture
Returns the cause of the connection failure.

Specified by:
getException in interface OpenFuture
Returns:
null if the connect operation is not finished yet, or if the connection attempt is successful.

isOpened

public boolean isOpened()
Description copied from interface: OpenFuture
Returns true if the connect operation is finished successfully.

Specified by:
isOpened in interface OpenFuture

setOpened

public void setOpened()
Description copied from interface: OpenFuture
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:
setOpened in interface OpenFuture

setException

public void setException(Throwable exception)
Description copied from interface: OpenFuture
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 OpenFuture


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