JTR 5.0 API Documentation

jtr.ws
Interface IWsHelper

All Known Implementing Classes:
JaxWsHelper

public interface IWsHelper

This interface defines the methods every webservice helper class should expose in the JTR framework.
A webservice helper class is meant for shielding the AbstractWsRunner and its subclasses from the API actually used to access and invoke webservices.
Thus a webservice-enabled runner should not contain code related to a particular webservice invocation API, but should only (as far as possible at least!) rely on the configured IWsHelper concrete implementation.
Note: this interface is not meant for direct use by user-defined runners. These AbstractWsRunner subclasses can leverage on their super-class' methods to perform web-services invocation.

Since:
3.0
Version:
5.0
Author:
Francesco Russo (frusso@dev.java.net)
See Also:
AbstractWsRunner, IWsHelperFactory, RegisteredFactories

Method Summary
 java.lang.Object invoke(IRunnerWs runner, Binding binding, java.lang.Object input)
          This method performs a request/response synchronous webservice invocation.
 IWsResponse invokeAsync(IRunnerWs runner, Binding binding, java.lang.Object input)
          This method performs an asynchronous invocation of the webservice described by the binding parameter.
 java.util.concurrent.Future<?> invokeAsync(IRunnerWs runner, Binding binding, java.lang.Object input, IWsResponseListener rl)
          This method performs an asynchronous invocation of the webservice described by the binding parameter.
 void invokeOneWay(IRunnerWs runner, Binding binding, java.lang.Object input)
          This method performs a request only webservice invocation.
 

Method Detail

invoke

java.lang.Object invoke(IRunnerWs runner,
                        Binding binding,
                        java.lang.Object input)
                        throws WsProviderException
This method performs a request/response synchronous webservice invocation. The input parameter is the invocation argument, while the returned Object instance is the result of the invocation.

Parameters:
runner - The runner on whose behalf the service is invoked
binding - The JTR description of the webservice that must be invoked
input - The input message
Returns:
The output of the invoked webservice
Throws:
WsProviderException

invokeOneWay

void invokeOneWay(IRunnerWs runner,
                  Binding binding,
                  java.lang.Object input)
                  throws WsProviderException
This method performs a request only webservice invocation. The input parameter is the invocation argument.

Parameters:
runner - The runner on whose behalf the service is invoked
binding - The JTR description of the webservice that must be invoked
input - The input message
Throws:
WsProviderException

invokeAsync

java.util.concurrent.Future<?> invokeAsync(IRunnerWs runner,
                                           Binding binding,
                                           java.lang.Object input,
                                           IWsResponseListener rl)
                                           throws WsProviderException
This method performs an asynchronous invocation of the webservice described by the binding parameter. The returned Future instance can be used to check whether the response message has been received or not. Once the response message has been received the provided IWsResponseListener will be notified and will be able to inspect the response.

Parameters:
runner - The runner on whose behalf the service is invoked
binding - The JTR description of the webservice that must be invoked
input - The input message
rl - The listener to be notified upon response reception
Returns:
The Future required to check for response availability
Throws:
WsProviderException

invokeAsync

IWsResponse invokeAsync(IRunnerWs runner,
                        Binding binding,
                        java.lang.Object input)
                        throws WsProviderException
This method performs an asynchronous invocation of the webservice described by the binding parameter. The returned IWsResponse instance is required to check for response mesage availability and to inspect the response itself.

Parameters:
runner - The runner on whose behalf the service is invoked
binding - The JTR description of the webservice that must be invoked
input - The input message
Returns:
The IWsResponse instance required to check for response mesage availability and to inspect the response itself
Throws:
WsProviderException

The JTR Project is licensed under GPL version 2