Class 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)

    Author:
    Jitendra Kotamraju
    • 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
      • getContainer

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