Package com.sun.xml.ws.client
Class AsyncResponseImpl<T>
java.lang.Object
java.util.concurrent.FutureTask<T>
com.sun.xml.ws.client.AsyncResponseImpl<T>
- All Implemented Interfaces:
ResponseContextReceiver,Response<T>,Runnable,Future<T>,RunnableFuture<T>
public final class AsyncResponseImpl<T>
extends FutureTask<T>
implements 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) voidrun()voidvoidsetCancelable(Cancelable cancelable) voidCalled 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDone
-
Constructor Details
-
AsyncResponseImpl
- Parameters:
runnable- ThisRunnableis executed asynchronously.handler- OptionalAsyncHandlerto invoke at the end of the processing. Can be null.
-
-
Method Details
-
run
public void run()- Specified by:
runin interfaceRunnable- Specified by:
runin interfaceRunnableFuture<T>- Overrides:
runin classFutureTask<T>
-
getContext
- Specified by:
getContextin interfaceResponse<T>
-
setResponseContext
Description copied from interface:ResponseContextReceiverCalled upon the completion of the invocation to set aResponseContext.This method is invoked even when the invocation fails.
- Specified by:
setResponseContextin interfaceResponseContextReceiver
-
set
-
setCancelable
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-