Class AdminConsoleAdapter
- java.lang.Object
-
- org.glassfish.grizzly.http.server.HttpHandler
-
- com.sun.enterprise.v3.admin.adapter.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:- 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.
- 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. - 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])
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.api.event.EventListener
EventListener.Event<T>
-
-
Constructor Summary
Constructors Constructor Description AdminConsoleAdapter()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
event(EventListener.Event event)
Process a Glassfish/Payara eventAdminService
getAdminService()
String
getContextRoot()
Returns the context root for this adapterorg.glassfish.grizzly.http.server.HttpHandler
getHttpService()
Get the underlying GrizzlyHttpHandler
.InetAddress
getListenAddress()
int
getListenPort()
Returns the listener port for this adapterList<String>
getVirtualServers()
Returns the virtual servers supported by this adapterboolean
isRegistered()
Checks whether this adapter has been registered as a network endpoint.void
postConstruct()
void
service(org.glassfish.grizzly.http.server.Request req, org.glassfish.grizzly.http.server.Response res)
void
setRegistered(boolean isRegistered)
Marks this adapter as having been registered or unregistered as a network endpoint-
Methods inherited from class org.glassfish.grizzly.http.server.HttpHandler
destroy, getErrorPageGenerator, getName, getRequestExecutorProvider, getRequestURIEncoding, getSessionCookieName, getSessionManager, isAllowCustomStatusMessage, isAllowEncodedSlash, sendAcknowledgment, setAllowCustomStatusMessage, setAllowEncodedSlash, setDecodeUrl, setDispatcherHelper, setRequestURIEncoding, setRequestURIEncoding, start, updatePaths
-
-
-
-
Constructor Detail
-
AdminConsoleAdapter
public AdminConsoleAdapter() throws IOException
Constructor.- Throws:
IOException
-
-
Method Detail
-
getContextRoot
public String getContextRoot()
Description copied from interface:Adapter
Returns the context root for this adapter- Specified by:
getContextRoot
in interfaceAdapter
- Returns:
- context root
-
getHttpService
public final org.glassfish.grizzly.http.server.HttpHandler getHttpService()
Description copied from interface:Adapter
Get the underlying GrizzlyHttpHandler
.- Specified by:
getHttpService
in interfaceAdapter
- 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 classorg.glassfish.grizzly.http.server.HttpHandler
-
isRegistered
public boolean isRegistered()
Checks whether this adapter has been registered as a network endpoint.- Specified by:
isRegistered
in interfaceAdapter
-
setRegistered
public void setRegistered(boolean isRegistered)
Marks this adapter as having been registered or unregistered as a network endpoint- Specified by:
setRegistered
in interfaceAdapter
-
postConstruct
public void postConstruct()
- Specified by:
postConstruct
in interfaceorg.glassfish.hk2.api.PostConstruct
-
event
public void event(EventListener.Event event)
Description copied from interface:EventListener
Process a Glassfish/Payara event- Specified by:
event
in interfaceEventListener
-
getAdminService
public AdminService getAdminService()
-
getListenPort
public int getListenPort()
Description copied from interface:Adapter
Returns the listener port for this adapter- Specified by:
getListenPort
in interfaceAdapter
- Returns:
- listener port
-
getListenAddress
public InetAddress getListenAddress()
- Specified by:
getListenAddress
in interfaceAdapter
- Returns:
- the
InetAddress
on which this adapter is listening
-
getVirtualServers
public List<String> getVirtualServers()
Description copied from interface:Adapter
Returns the virtual servers supported by this adapter- Specified by:
getVirtualServers
in interfaceAdapter
- Returns:
- List<String> the virtual server list supported by the adapter
-
-