|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.enterprisedt.net.ftp.async.AsyncResult
public abstract class AsyncResult
Base class for all result classes.
| Constructor Summary | |
|---|---|
AsyncResult()
|
|
| Method Summary | |
|---|---|
boolean |
cancelTask()
Cancel the asynchronous task that this result is for. |
boolean |
endAsyncCalled()
Has endAsync() been called? |
protected void |
endAsyncInternal()
Internal method that returns when the async method is completed. |
AsyncFileTransferClient |
getClient()
Get a reference to the asynchronous client |
com.enterprisedt.net.ftp.async.internal.SecureConnectionContext |
getLocalContext()
Get a reference to the local connection context. |
java.lang.Object |
getTag()
Get the tag object that has been saved in the result |
com.enterprisedt.net.ftp.async.internal.Task |
getTask()
|
java.lang.String |
getTaskDescription()
Get a description of the task this result is for |
int |
getTaskId()
Get the task id |
java.lang.Throwable |
getThrowable()
If endAsync() is not called, the thrown exception (if indeed an exception has been thrown) can be accessed via this method. |
boolean |
isCompleted()
Has the asynchronous operation completed? This can be used to poll for completion. |
boolean |
isSuccessful()
Was the operation successful, i.e. |
void |
notifyComplete()
Notifies waiting threads that the operation is complete |
void |
setAsIfCompleted()
Calls everything needed to pretend this is the result of a task that has completed |
void |
setClient(AsyncFileTransferClient asyncClient)
Set the async client |
protected void |
setEndAsyncCalled()
Set the flag indicating if endAsync() has been called to true. |
void |
setLocalContext(com.enterprisedt.net.ftp.async.internal.SecureConnectionContext localContext)
Set the local context |
void |
setSuccessful(boolean success)
Set the flag for success (or failure). |
void |
setTag(java.lang.Object tag)
Set the tag object |
void |
setTask(com.enterprisedt.net.ftp.async.internal.Task task)
Set the task associated with this result |
void |
setThrowable(java.lang.Throwable throwable)
|
protected void |
waitTillComplete()
Waits until the async operation is completed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncResult()
| Method Detail |
|---|
public com.enterprisedt.net.ftp.async.internal.SecureConnectionContext getLocalContext()
public void setLocalContext(com.enterprisedt.net.ftp.async.internal.SecureConnectionContext localContext)
localContext - local contextpublic AsyncFileTransferClient getClient()
public void setClient(AsyncFileTransferClient asyncClient)
asyncClient - reference to the clientpublic void setTag(java.lang.Object tag)
tag - tag to save in resultpublic java.lang.Object getTag()
public java.lang.String getTaskDescription()
public boolean isSuccessful()
public void setSuccessful(boolean success)
success - true if operation succeeded, false otherwisepublic void setTask(com.enterprisedt.net.ftp.async.internal.Task task)
task - associated taskpublic com.enterprisedt.net.ftp.async.internal.Task getTask()
public boolean cancelTask()
throws FTPException
FTPExceptionpublic int getTaskId()
public java.lang.Throwable getThrowable()
public boolean endAsyncCalled()
protected void setEndAsyncCalled()
public boolean isCompleted()
public void setThrowable(java.lang.Throwable throwable)
public void setAsIfCompleted()
protected void waitTillComplete()
protected void endAsyncInternal()
throws FTPException,
java.io.IOException
FTPException
java.io.IOExceptionpublic void notifyComplete()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||