|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cindy.session.DefaultFuture
public class DefaultFuture
Default future implementation.
Constructor Summary | |
---|---|
DefaultFuture(Session session)
|
|
DefaultFuture(Session session,
boolean succeeded)
|
Method Summary | |
---|---|
void |
addListener(FutureListener listener)
Add future listener. |
protected void |
caughtException(java.lang.Throwable throwable)
|
boolean |
complete()
Waits if necessary for the task to complete. |
boolean |
complete(int timeout)
Waits if necessary for the task to complete or the timeout period has expired. |
Session |
getSession()
Get session associated with the future. |
boolean |
isCompleted()
Return true if the task completed. |
boolean |
isSucceeded()
Return true if the task completed successful. |
void |
removeListener(FutureListener listener)
Remove future listener. |
void |
setSucceeded(boolean succeeded)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFuture(Session session)
public DefaultFuture(Session session, boolean succeeded)
Method Detail |
---|
public Session getSession()
Future
getSession
in interface Future
protected void caughtException(java.lang.Throwable throwable)
public void addListener(FutureListener listener)
Future
addListener
in interface Future
listener
- future listenerpublic void removeListener(FutureListener listener)
Future
removeListener
in interface Future
listener
- future listenerpublic boolean complete()
Future
complete
in interface Future
public boolean complete(int timeout)
Future
complete
in interface Future
timeout
- timeout
public boolean isCompleted()
Future
isCompleted
in interface Future
public boolean isSucceeded()
Future
isSucceeded
in interface Future
public void setSucceeded(boolean succeeded)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |