Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cxf.endpoint
Class ClientCallback

    java.lang.Object
      org.apache.cxf.endpoint.ClientCallback

All Implemented Interfaces:
  Future<Object[]>

    public class ClientCallback

extends Object
implements Future<Object[]>

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)`
`Map<String,Object>` | `getResponseContext()`
`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

### context

    protected Map<String,Object> context

### result

    protected Object[] result

### exception

    protected Throwable exception

### done

    protected volatile boolean done

### cancelled

    protected boolean cancelled

### started

    protected boolean started

Constructor Detail

### ClientCallback

    public ClientCallback()

Method Detail

### start

    public void start(Message msg)

  Called 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.

### handleResponse

    public 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. The default behavior just stores the objects and calls notifyAll to wake up threads waiting for the response.

  Parameters:
    `ctx` -
    `res` -

### handleException

    public 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. The default behavior just stores the objects and calls notifyAll to wake up threads waiting for the response.

  Parameters:
    `ctx` -
    `ex` -

### cancel

    public boolean cancel(boolean mayInterruptIfRunning)

  Specified by:
    `cancel` in interface `Future<Object[]>`

### getResponseContext

    public Map<String,Object> getResponseContext()
                                          throws InterruptedException,
                                                 ExecutionException

  Throws:
    `InterruptedException`
    `ExecutionException`

### get

    public Object[] get()
                 throws InterruptedException,
                        ExecutionException

  Specified by:
    `get` in interface `Future<Object[]>`
  Throws:
    `InterruptedException`
    `ExecutionException`

### get

    public Object[] get(long timeout,
                        TimeUnit unit)
                 throws InterruptedException,
                        ExecutionException,
                        TimeoutException

  Specified by:
    `get` in interface `Future<Object[]>`
  Throws:
    `InterruptedException`
    `ExecutionException`
    `TimeoutException`

### isCancelled

    public boolean isCancelled()

  Specified by:
    `isCancelled` in interface `Future<Object[]>`

### isDone

    public boolean isDone()

  Specified by:
    `isDone` in interface `Future<Object[]>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Apache CXF API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Apache CXF