com.sun.xml.ws.api.server
Class ResourceInjector

java.lang.Object
  extended by com.sun.xml.ws.api.server.ResourceInjector
Direct Known Subclasses:
DefaultResourceInjector

public abstract class ResourceInjector
extends Object

Represents a functionality of the container to inject resources to application service endpoint object (usually but not necessarily as per JavaEE spec.)

If Container.getSPI(Class) returns a valid instance of ResourceInjector, The JAX-WS RI will call the inject(com.sun.xml.ws.api.server.WSWebServiceContext, java.lang.Object) method for each service endpoint instance that it manages.

The JAX-WS RI will be responsible for calling PostConstruct callback, so implementations of this class need not do so.

See Also:
Container

Field Summary
static ResourceInjector STANDALONE
          Fallback ResourceInjector implementation used when the Container doesn't provide one.
 
Constructor Summary
ResourceInjector()
           
 
Method Summary
abstract  void inject(WSWebServiceContext context, Object instance)
          Performs resource injection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDALONE

public static final ResourceInjector STANDALONE
Fallback ResourceInjector implementation used when the Container doesn't provide one.

Just inject WSWebServiceContext and done.

Constructor Detail

ResourceInjector

public ResourceInjector()
Method Detail

inject

public abstract void inject(@NotNull
                            WSWebServiceContext context,
                            @NotNull
                            Object instance)
Performs resource injection.

Parameters:
context - WebServiceContext implementation to be injected into the instance.
instance - Instance of the service endpoint class to which resources will be injected.
Throws:
javax.xml.ws.WebServiceException - If the resource injection fails.