Invoker (Java Platform SE 8 ) (original) (raw)
- 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 calls invoke(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 provided WebServiceContext
and takes care of invoking javax.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 Description Invoker() Method Summary
All Methods Instance Methods Abstract Methods
Modifier and Type Method 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. * ### Methods inherited from class java.lang.[Object](../../../../java/lang/Object.html "class in java.lang") `[clone](../../../../java/lang/Object.html#clone--), [equals](../../../../java/lang/Object.html#equals-java.lang.Object-), [finalize](../../../../java/lang/Object.html#finalize--), [getClass](../../../../java/lang/Object.html#getClass--), [hashCode](../../../../java/lang/Object.html#hashCode--), [notify](../../../../java/lang/Object.html#notify--), [notifyAll](../../../../java/lang/Object.html#notifyAll--), [toString](../../../../java/lang/Object.html#toString--), [wait](../../../../java/lang/Object.html#wait--), [wait](../../../../java/lang/Object.html#wait-long-), [wait](../../../../java/lang/Object.html#wait-long-int-)`
Constructor Detail
* #### Invoker public Invoker()
Method Detail
* #### inject public abstract void inject([WebServiceContext](../../../../javax/xml/ws/WebServiceContext.html "interface in javax.xml.ws") webServiceContext) throws [IllegalAccessException](../../../../java/lang/IllegalAccessException.html "class in java.lang"), [IllegalArgumentException](../../../../java/lang/IllegalArgumentException.html "class in java.lang"), [InvocationTargetException](../../../../java/lang/reflect/InvocationTargetException.html "class in java.lang.reflect") 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` \- a holder for MessageContext Throws: `[IllegalAccessException](../../../../java/lang/IllegalAccessException.html "class in java.lang")` \- if the injection done by reflection API throws this exception `[IllegalArgumentException](../../../../java/lang/IllegalArgumentException.html "class in java.lang")` \- if the injection done by reflection API throws this exception `[InvocationTargetException](../../../../java/lang/reflect/InvocationTargetException.html "class in java.lang.reflect")` \- if the injection done by reflection API throws this exception * #### invoke public abstract [Object](../../../../java/lang/Object.html "class in java.lang") invoke([Method](../../../../java/lang/reflect/Method.html "class in java.lang.reflect") m, [Object](../../../../java/lang/Object.html "class in java.lang")... args) throws [IllegalAccessException](../../../../java/lang/IllegalAccessException.html "class in java.lang"), [IllegalArgumentException](../../../../java/lang/IllegalArgumentException.html "class in java.lang"), [InvocationTargetException](../../../../java/lang/reflect/InvocationTargetException.html "class in java.lang.reflect") 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 to be invoked on the service `args` \- Method arguments Returns: return value of the method Throws: `[IllegalAccessException](../../../../java/lang/IllegalAccessException.html "class in java.lang")` \- if the invocation done by reflection API throws this exception `[IllegalArgumentException](../../../../java/lang/IllegalArgumentException.html "class in java.lang")` \- if the invocation done by reflection API throws this exception `[InvocationTargetException](../../../../java/lang/reflect/InvocationTargetException.html "class in java.lang.reflect")` \- if the invocation done by reflection API throws this exception See Also: [Method.invoke(java.lang.Object, java.lang.Object...)](../../../../java/lang/reflect/Method.html#invoke-java.lang.Object-java.lang.Object...-)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2025, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.