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

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

public abstract class ContainerResolver
extends Object

This class determines an instance of Container for the runtime. It applies for both server and client runtimes(for e.g in Servlet could be accessing a Web Service). A client that is invoking a web service may be running in a container(for e.g servlet). T

ContainerResolver uses a static field to keep the instance of the resolver object. Typically appserver may set its custom container resolver using the static method setInstance(ContainerResolver)


Constructor Summary
ContainerResolver()
           
 
Method Summary
abstract  Container getContainer()
          Returns the Container context in which client is running.
static ThreadLocalContainerResolver getDefault()
          Returns the default container resolver which can be used to get Container.
static ContainerResolver getInstance()
          Returns the container resolver which can be used to get client's Container.
static void setInstance(ContainerResolver resolver)
          Sets the custom container resolver which can be used to get client's Container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerResolver

public ContainerResolver()
Method Detail

setInstance

public static void setInstance(ContainerResolver resolver)
Sets the custom container resolver which can be used to get client's Container.

Parameters:
resolver - container resolver

getInstance

@NotNull
public static ContainerResolver getInstance()
Returns the container resolver which can be used to get client's Container.

Returns:
container resolver instance

getDefault

public static ThreadLocalContainerResolver getDefault()
Returns the default container resolver which can be used to get Container.

Returns:
default container resolver

getContainer

@NotNull
public abstract Container getContainer()
Returns the Container context in which client is running.

Returns:
container instance for the client


Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.