Package generic.concurrent
Class QResult<I,R>
- java.lang.Object
- 
- generic.concurrent.QResult<I,R>
 
- 
- Type Parameters:
- I- the type of the items in the ConcurrentQ.
- R- the type of objects returned from processing an item in a ConcurrentQ.
 
 public class QResult<I,R> extends java.lang.ObjectClass for holding the result of processing an Item in a ConcurrentQ.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ExceptiongetError()Returns any Exception that was encountered during processing of the itemIgetItem()Returns the item that was processed.RgetResult()The result from processing the item.booleanhasError()Returns true if the item encountered an error while processing the item.booleanisCancelled()Returns true if the item's processing was cancelled.
 
- 
- 
- 
Method Detail- 
getItempublic I getItem() Returns the item that was processed.- Returns:
- the item that was processed.
 
 - 
getResultpublic R getResult() throws java.lang.Exception The result from processing the item. Will be null if the item was cancelled or had an error.- Returns:
- the result from processing the item or null if it did not complete successfully.
- Throws:
- java.lang.Exception- any exception that was thrown during the processing of the input item
 
 - 
getErrorpublic java.lang.Exception getError() Returns any Exception that was encountered during processing of the item- Returns:
- any Exception that was encountered during processing of the item
 
 - 
hasErrorpublic boolean hasError() Returns true if the item encountered an error while processing the item.- Returns:
- true if the item encountered an error while processing the item.
 
 - 
isCancelledpublic boolean isCancelled() Returns true if the item's processing was cancelled.- Returns:
- true if the item's processing was cancelled.
 
 
- 
 
-