|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.util.MultipleRequestConfirmation
public class MultipleRequestConfirmation
This class is used to return to a client the results of a complex management request. The meaning of "result object" and "failured objects" is dependent upon the context of the method from which this instance is returned.
This class uses a Map to hold those objects that were not successfully operated upon and a corresponding exception; therefore, only objects which have a unique hash code for different (but unequivalent) instances should be inserted as failed objects.
| Constructor Summary | |
|---|---|
MultipleRequestConfirmation()
Construct an empty confirmation instance. |
|
| Method Summary | |
|---|---|
void |
addFailure(java.lang.Object obj,
java.lang.Throwable e)
Add the object that was not successfully operated upon. |
java.util.Map |
getFailures()
Get the object that were not successfully operated upon, and an exception for each that may describe why the operation failed. |
int |
getFailuresCount()
Get the number of objects that were not successfully operated upon. |
java.lang.Object |
getResult()
Get the result of the operation. |
boolean |
hasFailures()
Determine whether there are any objects that were not successfully operated upon. |
boolean |
hasResult()
|
void |
setResult(java.lang.Object result)
Set the result of the method request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultipleRequestConfirmation()
| Method Detail |
|---|
public void setResult(java.lang.Object result)
obj - the result objectpublic java.lang.Object getResult()
public void addFailure(java.lang.Object obj,
java.lang.Throwable e)
obj - the object with which the operation failed.e - an exception that describes the failure of this object; may be nullpublic java.util.Map getFailures()
public int getFailuresCount()
public boolean hasResult()
public boolean hasFailures()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||