java.lang.Object
java.util.concurrent.FutureTask<T>
com.sun.xml.ws.client.AsyncResponseImpl<T>
- All Implemented Interfaces:
ResponseContextReceiver
,jakarta.xml.ws.Response<T>
,Runnable
,Future<T>
,RunnableFuture<T>
public final class AsyncResponseImpl<T>
extends FutureTask<T>
implements jakarta.xml.ws.Response<T>, ResponseContextReceiver
Response
implementation. When Runnbale is executed, it just hands the
request to Fiber and returns. When the Fiber finishes the execution, it sets
response in the FutureTask
- Author:
- Jitendra Kotamraju
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncResponseImpl
(Runnable runnable, jakarta.xml.ws.AsyncHandler<T> handler) -
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel
(boolean mayInterruptIfRunning) void
run()
void
void
setCancelable
(Cancelable cancelable) void
Called upon the completion of the invocation to set aResponseContext
.Methods inherited from class java.util.concurrent.FutureTask
done, get, get, isCancelled, isDone, runAndReset, set, setException, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDone
-
Constructor Details
-
AsyncResponseImpl
- Parameters:
runnable
- ThisRunnable
is executed asynchronously.handler
- OptionalAsyncHandler
to invoke at the end of the processing. Can be null.
-
-
Method Details
-
run
public void run()- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<T>
- Overrides:
run
in classFutureTask<T>
-
getContext
- Specified by:
getContext
in interfacejakarta.xml.ws.Response<T>
-
setResponseContext
Description copied from interface:ResponseContextReceiver
Called upon the completion of the invocation to set aResponseContext
.This method is invoked even when the invocation fails.
- Specified by:
setResponseContext
in interfaceResponseContextReceiver
-
set
-
setCancelable
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-