Package org.apache.cxf.endpoint
Class ClientCallback
java.lang.Object
org.apache.cxf.endpoint.ClientCallback
Asynchronous callback object for calls to 
Client.invoke(ClientCallback, String, Object...)
 and related functions.
 The default behavior of this expects the following pattern:
 - ClientCallback cb = new ClientCallback();<>
- client.invoke(cb, "someMethod", ....);
- cb.wait();
- // CXF calls notify on the callback object when the operation is complete.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleancancel(boolean mayInterruptIfRunning) Object[]get()Object[]return the map of items returned from an operation.voidhandleException(Map<String, Object> ctx, Throwable ex) If processing of the incoming message results in an exception, this method is called with the resulting exception.voidhandleResponse(Map<String, Object> ctx, Object[] res) If the processing of the incoming message proceeds normally, this method is called with the response context values and the resulting objects.booleanbooleanisDone()voidCalled when a message is first received prior to any actions being applied to the message.
- 
Field Details- 
delegate
- 
context
- 
startedprotected boolean started
 
- 
- 
Constructor Details- 
ClientCallbackpublic ClientCallback()
 
- 
- 
Method Details- 
startCalled when a message is first received prior to any actions being applied to the message. The InterceptorChain is setup so modifications to that can be done.
- 
handleResponseIf the processing of the incoming message proceeds normally, this method is called with the response context values and the resulting objects. The default behavior just stores the objects and calls notifyAll to wake up threads waiting for the response.- Parameters:
- ctx-
- res-
 
- 
handleExceptionIf processing of the incoming message results in an exception, this method is called with the resulting exception. The default behavior just stores the objects and calls notifyAll to wake up threads waiting for the response.- Parameters:
- ctx-
- ex-
 
- 
cancelpublic boolean cancel(boolean mayInterruptIfRunning) 
- 
getResponseContextreturn the map of items returned from an operation.- Returns:
- the response context
- Throws:
- InterruptedException- if the operation was cancelled.
- ExecutionException- if the operation resulted in a fault.
 
- 
get- Specified by:
- getin interface- Future<Object[]>
- Throws:
- InterruptedException
- ExecutionException
 
- 
getpublic Object[] get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
- getin interface- Future<Object[]>
- Throws:
- InterruptedException
- ExecutionException
- TimeoutException
 
- 
isCancelledpublic boolean isCancelled()- Specified by:
- isCancelledin interface- Future<Object[]>
 
- 
isDonepublic boolean isDone()
 
-