|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cxf.endpoint.ClientCallback
public class ClientCallback
Asynchronous callback object for calls to Client.invoke(ClientCallback, String, Object...)
and related functions.
The default behavior of this expects the following pattern:
Field Summary | |
---|---|
protected boolean |
cancelled
|
protected Map<String,Object> |
context
|
protected boolean |
done
|
protected Throwable |
exception
|
protected Object[] |
result
|
protected boolean |
started
|
Constructor Summary | |
---|---|
ClientCallback()
|
Method Summary | |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
Object[] |
get()
|
Object[] |
get(long timeout,
TimeUnit unit)
|
Throwable |
getException()
|
Map<String,Object> |
getResponseContext()
return the map of items returned from an operation. |
void |
handleException(Map<String,Object> ctx,
Throwable ex)
If processing of the incoming message results in an exception, this method is called with the resulting exception. |
void |
handleResponse(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. |
boolean |
isCancelled()
|
boolean |
isDone()
|
void |
start(Message msg)
Called when a message is first received prior to any actions being applied to the message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<String,Object> context
protected Object[] result
protected Throwable exception
protected volatile boolean done
protected boolean cancelled
protected boolean started
Constructor Detail |
---|
public ClientCallback()
Method Detail |
---|
public void start(Message msg)
public void handleResponse(Map<String,Object> ctx, Object[] res)
ctx
- res
- public void handleException(Map<String,Object> ctx, Throwable ex)
ctx
- ex
- public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface Future<Object[]>
public Map<String,Object> getResponseContext() throws InterruptedException, ExecutionException
InterruptedException
- if the operation was cancelled.
ExecutionException
- if the operation resulted in a fault.public Object[] get() throws InterruptedException, ExecutionException
get
in interface Future<Object[]>
InterruptedException
ExecutionException
public Object[] get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<Object[]>
InterruptedException
ExecutionException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<Object[]>
public boolean isDone()
isDone
in interface Future<Object[]>
public Throwable getException()
|
Apache CXF API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |