|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.businessobjects.sdk.biar.AsyncImport
public class AsyncImport
A class for running an import asynchronously, in another thread. The single-argument constructor takes an
IImport instance as its parameter, and this import is run in another
thread. The progress of the import can then be monitored and managed through the methods of this class.
An AsyncImport must be always disposed by calling AsyncImport.dispose() when it will no longer
be used, in order to release any resources it holds.
A note on terminology: the import is said to be terminated when it is no longer running, no matter the manner in which it terminated; the import is said to be completed only when it has terminated as a result of successfully completing the import.
| Constructor Summary | |
|---|---|
AsyncImport(IImport theImport)
Constructs an AsyncImport object which runs the supplied import. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels the import. |
void |
dispose()
Disposes of the import and release any resources it holds. |
java.util.concurrent.Future |
getResult()
Gets a java.lang.concurrent.Future representing the calculated result of the import. |
boolean |
isCompleted()
Checks if the import is completed. |
boolean |
isTerminated()
Checks if the import has terminated. |
void |
waitToTermination()
Waits until the import has terminated. |
void |
waitToTermination(long time)
Waits until the import has terminated, or until the given time-out has expired, whichever comes first. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncImport(IImport theImport)
throws BIARException
AsyncImport object which runs the supplied import.
theImport - the import to run asynchronously.
BIARException - if the operation is unsuccessful.| Method Detail |
|---|
public boolean isCompleted()
public boolean isTerminated()
public void waitToTermination(long time)
throws java.lang.InterruptedException
time - the time-out.
java.lang.InterruptedException - if the wait is interrupted.
public void waitToTermination()
throws java.lang.InterruptedException
java.lang.InterruptedException - if the wait is interrupted.public java.util.concurrent.Future getResult()
java.lang.concurrent.Future representing the calculated result of the import. The result
value is an IObjectManager containing the imported objects.
public void cancel()
cancel in interface ICancelable
public void dispose()
throws BIARException
BIARException - if this operation is unsuccessful.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||