FileDocCategorySizeDatePackage
InstanceResolverImpl.javaAPI DocGlassfish v2 API4731Fri Jun 29 10:20:38 BST 2007com.sun.enterprise.webservice

InstanceResolverImpl

public final class InstanceResolverImpl extends com.sun.xml.ws.api.server.InstanceResolver

Fields Summary
private final com.sun.xml.ws.api.server.InstanceResolver
resolver
private final T
instance
Constructors Summary
public InstanceResolverImpl(Class clasz)

    
        instance = InstanceResolver.createNewInstance(clasz);
        resolver = InstanceResolver.createSingleton(instance);
    
Methods Summary
public com.sun.xml.ws.api.server.InvokercreateInvoker()
Wraps this {@link InstanceResolver} into an {@link Invoker}.

        return new Invoker() {
            @Override
            public void start(@NotNull WSWebServiceContext wsc, @NotNull WSEndpoint endpoint) {
                InstanceResolverImpl.this.start(wsc,endpoint);
            }

            @Override
            public void dispose() {
                InstanceResolverImpl.this.dispose();
            }

            @Override
            public Object invoke(Packet p, Method m, Object... args) throws InvocationTargetException, IllegalAccessException {
                return m.invoke( resolve(p), args );
            }

            @Override
            public <T> T invokeProvider(@NotNull Packet p, T arg) {
                return ((Provider<T>)resolve(p)).invoke(arg);
            }

            public String toString() {
                return "Default Invoker over "+InstanceResolverImpl.this.toString();
            }
        };
    
public voiddispose()

        resolver.dispose();
    
private com.sun.xml.ws.api.server.ResourceInjectorgetResourceInjector(com.sun.xml.ws.api.server.WSEndpoint endpoint)

        ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class);
        if(ri==null)
            ri = ResourceInjector.STANDALONE;
        return ri;
    
public Tresolve(com.sun.xml.ws.api.message.Packet request)

        return resolver.resolve(request);
    
public voidstart(com.sun.xml.ws.api.server.WSWebServiceContext wsc, com.sun.xml.ws.api.server.WSEndpoint endpoint)

       
        getResourceInjector(endpoint).inject(wsc, instance);