Top Description Constructors Methods
javax.xml.ws.spi

public abstract Class Invoker

extends Object
Class Inheritance
Imports
javax.xml.ws.WebServiceContext, .WebServiceFeature, java.lang.reflect.Method, .InvocationTargetException

Invoker hides the detail of calling into application endpoint implementation. Container hands over an implementation of Invoker to JAX-WS runtime, and jax-ws runtime calls invoke for a web service invocation. Finally, Invoker does the actual invocation of web service on endpoint instance. Container also injects the provided WebServiceContext and takes care of invoking javax.annotation.PostConstruct methods, if present, on the endpoint implementation.
Author
Jitendra Kotamraju
Since
1.7, JAX-WS 2.2
See Also
Provider#createEndpoint(String, Class, Invoker, WebServiceFeature...)

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract void
inject(WebServiceContext
a holder for MessageContext
webServiceContext
)

JAX-WS runtimes calls this method to ask container to inject WebServiceContext on the endpoint instance.

public abstract Object

Returns:

return value of the method
invoke
(Method
Method to be invoked on the service
m
,
Object...
Method arguments
args
)

JAX-WS runtime calls this method to do the actual web service invocation on endpoint instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Invokerback to summary
public Invoker()

Method Detail

injectback to summary
public abstract void inject(WebServiceContext webServiceContext) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException

JAX-WS runtimes calls this method to ask container to inject WebServiceContext on the endpoint instance. The WebServiceContext object uses thread-local information to return the correct information during the actual endpoint invocation regardless of how many threads are concurrently being used to serve requests.

Parameters
webServiceContext:WebServiceContext

a holder for MessageContext

Exceptions
IllegalAccessException:
if the injection done by reflection API throws this exception
IllegalArgumentException:
if the injection done by reflection API throws this exception
InvocationTargetException:
if the injection done by reflection API throws this exception
invokeback to summary
public abstract Object invoke(Method m, Object... args) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException

JAX-WS runtime calls this method to do the actual web service invocation on endpoint instance. The injected WebServiceContext.getMessageContext() gives the correct information for this invocation.

Parameters
m:Method

Method to be invoked on the service

args:Object[]

Method arguments

Returns:Object

return value of the method

Exceptions
IllegalAccessException:
if the invocation done by reflection API throws this exception
IllegalArgumentException:
if the invocation done by reflection API throws this exception
InvocationTargetException:
if the invocation done by reflection API throws this exception
See Also
Method#invoke