org.apache.sshd.client.future
Class DefaultOpenFuture
java.lang.Object
org.apache.sshd.common.future.DefaultSshFuture<OpenFuture>
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
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 |
DefaultOpenFuture
public DefaultOpenFuture(Object lock)
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.