Package jadex.commons.future
Class DuplicateResultException
- java.lang.Object
 - 
- java.lang.Throwable
 - 
- java.lang.Exception
 - 
- java.lang.RuntimeException
 - 
- jadex.commons.future.DuplicateResultException
 
 
 
 
 
- 
- All Implemented Interfaces:
 java.io.Serializable
public class DuplicateResultException extends java.lang.RuntimeExceptionException indicating that the result of a future was set twice.- See Also:
 - Serialized Form
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected java.lang.ObjectfirstThe first result.protected IFuture<?>futureThe future.protected java.lang.ObjectsecondThe second result.protected inttypeThe type.static intTYPE_EXCEPTION_EXCEPTIONTwo exceptions.static intTYPE_EXCEPTION_RESULTFirst exception then result.static intTYPE_RESULT_EXCEPTIONFirst result then exception.static intTYPE_RESULT_RESULTTwo results. 
- 
Constructor Summary
Constructors Constructor Description DuplicateResultException(int type, IFuture<?> future, java.lang.Object first, java.lang.Object second)Create a duplicate result exception. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<?>getFuture()Get the future.voidprintStackTrace()Prints also stack trace of first exception, if available.java.lang.StringtoString()Get a string representation. 
 - 
 
- 
- 
Field Detail
- 
TYPE_RESULT_RESULT
public static final int TYPE_RESULT_RESULT
Two results.- See Also:
 - Constant Field Values
 
 
- 
TYPE_RESULT_EXCEPTION
public static final int TYPE_RESULT_EXCEPTION
First result then exception.- See Also:
 - Constant Field Values
 
 
- 
TYPE_EXCEPTION_RESULT
public static final int TYPE_EXCEPTION_RESULT
First exception then result.- See Also:
 - Constant Field Values
 
 
- 
TYPE_EXCEPTION_EXCEPTION
public static final int TYPE_EXCEPTION_EXCEPTION
Two exceptions.- See Also:
 - Constant Field Values
 
 
- 
type
protected int type
The type. 
- 
future
protected IFuture<?> future
The future. 
- 
first
protected java.lang.Object first
The first result. 
- 
second
protected java.lang.Object second
The second result. 
 - 
 
- 
Constructor Detail
- 
DuplicateResultException
public DuplicateResultException(int type, IFuture<?> future, java.lang.Object first, java.lang.Object second)Create a duplicate result exception. 
 - 
 
- 
Method Detail
- 
getFuture
public IFuture<?> getFuture()
Get the future. 
- 
toString
public java.lang.String toString()
Get a string representation.- Overrides:
 toStringin classjava.lang.Throwable
 
- 
printStackTrace
public void printStackTrace()
Prints also stack trace of first exception, if available.- Overrides:
 printStackTracein classjava.lang.Throwable
 
 - 
 
 -