- java.lang.Object
-
- jakarta.ejb.AsyncResult<V>
-
- Type Parameters:
V- The result type returned by this Future'sgetmethod
- All Implemented Interfaces:
java.util.concurrent.Future<V>
public final class AsyncResult<V> extends java.lang.Object implements java.util.concurrent.Future<V>Wraps the result of an asynchronous method call as aFutureobject, preserving compatability with the business interface signature.The value specified in the constructor will be retrieved by the container and made available to the client.
Note that this object is not passed to the client. It is merely a convenience for providing the result value to the container. Therefore, none of its instance methods should be called by the application.
- Since:
- EJB 3.1
-
-
Field Summary
Fields Modifier and Type Field Description private VresultValue
-
Constructor Summary
Constructors Constructor Description AsyncResult(V result)Creates aAsyncResultinstance to wrap the result of an asynchronous method call
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)This method should not be called.Vget()This method should not be called.Vget(long timeout, java.util.concurrent.TimeUnit unit)This method should not be called.booleanisCancelled()This method should not be called.booleanisDone()This method should not be called.
-
-
-
Field Detail
-
resultValue
private final V resultValue
-
-
Constructor Detail
-
AsyncResult
public AsyncResult(V result)
Creates aAsyncResultinstance to wrap the result of an asynchronous method call- Parameters:
result- the result of an asynchronous method call to be made available to the client
-
-
Method Detail
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
This method should not be called. See Class-level comments.- Specified by:
cancelin interfacejava.util.concurrent.Future<V>
-
isCancelled
public boolean isCancelled()
This method should not be called. See Class-level comments.- Specified by:
isCancelledin interfacejava.util.concurrent.Future<V>
-
isDone
public boolean isDone()
This method should not be called. See Class-level comments.- Specified by:
isDonein interfacejava.util.concurrent.Future<V>
-
get
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
This method should not be called. See Class-level comments.- Specified by:
getin interfacejava.util.concurrent.Future<V>- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
get
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
This method should not be called. See Class-level comments.- Specified by:
getin interfacejava.util.concurrent.Future<V>- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutException
-
-