- java.lang.Object
-
- javax.xml.ws.spi.Invoker
-
public abstract class Invoker extends Object
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 callsinvoke(java.lang.reflect.Method, java.lang.Object...)
for a web service invocation. Finally, Invoker does the actual invocation of web service on endpoint instance. Container also injects the providedWebServiceContext
and takes care of invokingjavax.annotation.PostConstruct
methods, if present, on the endpoint implementation.- Since:
- JAX-WS 2.2
- See Also:
Provider.createEndpoint(String, Class, Invoker, WebServiceFeature...)
-
-
Constructor Summary
Constructors Constructor and Description Invoker()
-
Method Summary
Methods Modifier and Type Method and Description abstract void
inject(WebServiceContext webServiceContext)
JAX-WS runtimes calls this method to ask container to inject WebServiceContext on the endpoint instance.abstract Object
invoke(Method m, Object... args)
JAX-WS runtime calls this method to do the actual web service invocation on endpoint instance.
-
-
-
Method Detail
-
inject
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. TheWebServiceContext
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
- a holder for MessageContext- Throws:
IllegalAccessException
- if the injection done by reflection API throws this exceptionIllegalArgumentException
- if the injection done by reflection API throws this exceptionInvocationTargetException
- if the injection done by reflection API throws this exception
-
invoke
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 injectedWebServiceContext.getMessageContext()
gives the correct information for this invocation.- Parameters:
m
- Method to be invoked on the serviceargs
- Method arguments- Returns:
- return value of the method
- Throws:
IllegalAccessException
- if the invocation done by reflection API throws this exceptionIllegalArgumentException
- if the invocation done by reflection API throws this exceptionInvocationTargetException
- if the invocation done by reflection API throws this exception- See Also:
Method.invoke(java.lang.Object, java.lang.Object...)
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-javax/xml/ws/spi/Invoker.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.