- java.lang.Object
-
- javax.ejb.AsyncResult<V>
-
- All Implemented Interfaces:
- Future<V>
public final class AsyncResult<V> extends Object implements Future<V>
Wraps the result of an asynchronous method call as aFuture
object, 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
-
-
Constructor Summary
Constructors Constructor and Description AsyncResult(V result)
Creates aAsyncResult
instance to wrap the result of an asynchronous method call
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
cancel(boolean mayInterruptIfRunning)
This method should not be called.V
get()
This method should not be called.V
get(long timeout, TimeUnit unit)
This method should not be called.boolean
isCancelled()
This method should not be called.boolean
isDone()
This method should not be called.
-
-
-
Constructor Detail
-
AsyncResult
public AsyncResult(V result)
Creates aAsyncResult
instance 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.
-
isCancelled
public boolean isCancelled()
This method should not be called. See Class-level comments.- Specified by:
isCancelled
in interfaceFuture<V>
-
isDone
public boolean isDone()
This method should not be called. See Class-level comments.
-
get
public V get() throws InterruptedException, ExecutionException
This method should not be called. See Class-level comments.- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
This method should not be called. See Class-level comments.- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/ejb/AsyncResult.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.