Package org.apache.sshd.common.future
Class DefaultCloseFuture
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.future.AbstractSshFuture<CloseFuture>
org.apache.sshd.common.future.DefaultSshFuture<CloseFuture>
org.apache.sshd.common.future.DefaultCloseFuture
- All Implemented Interfaces:
CloseFuture
,SshFuture<CloseFuture>
,WaitableFuture
A default implementation of
CloseFuture
.-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.sshd.common.future.DefaultSshFuture
addListener, await0, createCancellation, getNumRegisteredListeners, getValue, isDone, notifyListeners, onValueSet, removeListener, setValue, toString
Methods inherited from class org.apache.sshd.common.future.AbstractSshFuture
asListener, asT, await, awaitUninterruptibly, formatExceptionMessage, getId, notifyListener, verifyResult
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.future.SshFuture
addListener, removeListener
Methods inherited from interface org.apache.sshd.common.future.WaitableFuture
await, await, await, await, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, awaitUninterruptibly, getId, isDone
-
Constructor Details
-
DefaultCloseFuture
Create a new instance- Parameters:
id
- Some identifier useful astoString()
valuelock
- A synchronization object for locking access - ifnull
then synchronization occurs onthis
instance
-
-
Method Details
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceCloseFuture
- Returns:
- true if the close request is finished and the target is closed.
-
setClosed
public void setClosed()Description copied from interface:CloseFuture
Marks this future as closed and notifies all threads waiting for this future. This method is invoked by SSHD internally. Please do not call this method directly.- Specified by:
setClosed
in interfaceCloseFuture
-