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.RuntimeException
Exception 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.Object
first
The first result.protected IFuture<?>
future
The future.protected java.lang.Object
second
The second result.protected int
type
The type.static int
TYPE_EXCEPTION_EXCEPTION
Two exceptions.static int
TYPE_EXCEPTION_RESULT
First exception then result.static int
TYPE_RESULT_EXCEPTION
First result then exception.static int
TYPE_RESULT_RESULT
Two 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.void
printStackTrace()
Prints also stack trace of first exception, if available.java.lang.String
toString()
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:
toString
in classjava.lang.Throwable
-
printStackTrace
public void printStackTrace()
Prints also stack trace of first exception, if available.- Overrides:
printStackTrace
in classjava.lang.Throwable
-
-