org.apache.axis2.jaxws.core.controller
Interface InvocationController

All Known Implementing Classes:
AxisInvocationController, InvocationControllerImpl

public interface InvocationController

The InvocationController is an interface modeling the invocation of a target web service. All of the information that the InvocationController needs should exist within the InvocatonContext that is passed in to the various invoke methods.

The request information is passed in within the InvocationContext. The InvocationController assumes that there is a MessageContext within that InvocationContext that is populated with all of the information that it needs to invoke. If not, an error will be returned. Once the response comes back, the information for that response will be held inside of the MessageContext representing the response, that exists in the InvocationContext.

The InvocationController supports four different invocation patterns:

1) synchronous - This is represented by the invoke(InvocationContext) method. This is a blocking, request/response call to the web service.

2) one-way - This is represented by the invokeOneWay(InvocationContext) method. This is a one-way invocation that only returns errors related to sending the message. If an error occurs while processing, the client will not be notified.

3) asynchronous (callback) - invokeAsync(InvocationContext, AsyncHandler)

4) asynchronous (polling) - invokeAsync(InvocationContext)


Method Summary
 InvocationContext invoke(InvocationContext ic)
          Performs a synchronous (blocking) invocation of a target service.
 Response invokeAsync(InvocationContext ic)
          Performs an asynchronous (non-blocking) invocation of the client based on a callback model.
 java.util.concurrent.Future<?> invokeAsync(InvocationContext ic, AsyncHandler asyncHandler)
          Performs an asynchronous (non-blocking) invocation of the client based on a polling model.
 void invokeOneWay(InvocationContext ic)
          Performs a one-way invocation of the client.
 

Method Detail

invoke

InvocationContext invoke(InvocationContext ic)
Performs a synchronous (blocking) invocation of a target service. The InvocationContext passed in should contain a valid MessageContext containing the properties and message to be sent for the request. The response contents will be processed and placed in the InvocationContext as well.

Parameters:
ic -
Returns:

invokeOneWay

void invokeOneWay(InvocationContext ic)
                  throws java.lang.Exception
Performs a one-way invocation of the client. This is SHOULD NOT be a robust invocation, so any fault that occurs during the processing of the request will not be returned to the client. Errors returned to the client are problems that occurred during the sending of the message to the server.

Parameters:
ic -
Throws:
java.lang.Exception

invokeAsync

Response invokeAsync(InvocationContext ic)
Performs an asynchronous (non-blocking) invocation of the client based on a callback model. The AsyncHandler that is passed in is the callback that the client programmer supplied when they invoked their JAX-WS Dispatch or their SEI-based dynamic proxy.

Parameters:
ic -
callback -
Returns:

invokeAsync

java.util.concurrent.Future<?> invokeAsync(InvocationContext ic,
                                           AsyncHandler asyncHandler)
Performs an asynchronous (non-blocking) invocation of the client based on a polling model. The Response object that is returned allows the client programmer to poll against it to see if a response has been sent back by the server.

Parameters:
ic -
Returns:


Copyright © 2007 Apache Web Services Project. All Rights Reserved.