Class AdminConsoleAdapter

  • All Implemented Interfaces:
    Adapter, EventListener, org.glassfish.hk2.api.PostConstruct

    @Service
    public final class AdminConsoleAdapter
    extends org.glassfish.grizzly.http.server.HttpHandler
    implements Adapter, org.glassfish.hk2.api.PostConstruct, EventListener
    An HK-2 Service that provides the functionality so that admin console access is handled properly. The general contract of this adapter is as follows:
    1. This adapter is *always* installed as a Grizzly adapter for a particular URL designated as admin URL in domain.xml. This translates to context-root of admin console application.
    2. When the control comes to the adapter for the first time, user is asked to confirm if downloading the application is OK. In that case, the admin console application is downloaded and expanded. While the download and installation is happening, all the clients or browser refreshes get a status message. No push from the server side is attempted (yet). After the application is "installed", ApplicationLoaderService is contacted, so that the application is loaded by the containers. This application is available as a system-application and is persisted as such in the domain.xml.
    3. Even after this application is available, we don't load it on server startup by default. It is always loaded on demand . Hence, this adapter will always be available to find out if application is loaded and load it in the container(s) if it is not. If the application is already loaded, it simply exits.
    Since:
    GlassFish V3 (March 2008)
    Author:
    केदार ([email protected]), Ken Paulsen ([email protected]), Siraj Ghaffar ([email protected])
    • Constructor Detail

    • Method Detail

      • getContextRoot

        public String getContextRoot()
        Description copied from interface: Adapter
        Returns the context root for this adapter
        Specified by:
        getContextRoot in interface Adapter
        Returns:
        context root
      • getHttpService

        public final org.glassfish.grizzly.http.server.HttpHandler getHttpService()
        Description copied from interface: Adapter
        Get the underlying Grizzly HttpHandler.
        Specified by:
        getHttpService in interface Adapter
        Returns:
        the underlying Grizzly HttpHandler.
      • service

        public void service​(org.glassfish.grizzly.http.server.Request req,
                            org.glassfish.grizzly.http.server.Response res)
        Specified by:
        service in class org.glassfish.grizzly.http.server.HttpHandler
      • isRegistered

        public boolean isRegistered()
        Checks whether this adapter has been registered as a network endpoint.
        Specified by:
        isRegistered in interface Adapter
      • setRegistered

        public void setRegistered​(boolean isRegistered)
        Marks this adapter as having been registered or unregistered as a network endpoint
        Specified by:
        setRegistered in interface Adapter
      • postConstruct

        public void postConstruct()
        Specified by:
        postConstruct in interface org.glassfish.hk2.api.PostConstruct
      • getListenPort

        public int getListenPort()
        Description copied from interface: Adapter
        Returns the listener port for this adapter
        Specified by:
        getListenPort in interface Adapter
        Returns:
        listener port
      • getVirtualServers

        public List<String> getVirtualServers()
        Description copied from interface: Adapter
        Returns the virtual servers supported by this adapter
        Specified by:
        getVirtualServers in interface Adapter
        Returns:
        List<String> the virtual server list supported by the adapter