public abstract class BasicCollectionAsyncWorker extends AsyncWorker implements Countable
| Constructor and Description |
|---|
BasicCollectionAsyncWorker(java.util.Collection collection)
Constructs a BasicCollectionAsyncWorker which will iterate over the elements of the collection and call process for each element.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCompletedCount(AsyncContext context) |
int |
getCurrentElementIndex() |
int |
getTotalCount(AsyncContext context) |
boolean |
isInterrupted() |
void |
onInterrupt(AsyncContext context) |
protected abstract void |
process(java.lang.Object element,
AsyncContext context)
Implement this method to process each of the elements in the collection.
|
void |
run(AsyncContext context) |
void |
setInterrupted(boolean interrupted) |
updateUIpublic BasicCollectionAsyncWorker(java.util.Collection collection)
collection - Collection containing the elements to be processed.public boolean isInterrupted()
public void setInterrupted(boolean interrupted)
interrupted - The interrupted to set.public int getCurrentElementIndex()
public void run(AsyncContext context)
run in class AsyncWorkerprotected abstract void process(java.lang.Object element,
AsyncContext context)
element - Object to be processed from the collectioncontext - AsyncContext used to set status messages and errorMessages.AsyncContextpublic int getTotalCount(AsyncContext context)
getTotalCount in interface Countablepublic int getCompletedCount(AsyncContext context)
getCompletedCount in interface Countablepublic void onInterrupt(AsyncContext context)
onInterrupt in class AsyncWorker
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.