Class RestMonitoringAdapter
- java.lang.Object
-
- org.glassfish.grizzly.http.server.HttpHandler
-
- fish.payara.appserver.monitoring.rest.service.adapter.RestMonitoringAdapter
-
-
Constructor Summary
Constructors Constructor Description RestMonitoringAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appExistsInConfig()
boolean
appExistsInConfig(String contextRoot)
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 adapterApplication
getSystemApplicationConfig()
Gets the application config for the system application with the matching name or context root (in that order).Application
getSystemApplicationConfig(String contextRoot)
Gets the application config for the system application with the matching context root.List<String>
getVirtualServers()
Returns the virtual servers supported by this adapterboolean
isAppRegistered()
boolean
isAppRegistered(String contextRoot)
Overloaded method that checks if an application with the provided context root has been registered to this instance.boolean
isRegistered()
Checks whether this adapter has been registered as a network endpoint.void
postConstruct()
void
service(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Response response)
void
setAppRegistered(boolean appRegistered)
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
-
-
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
-
appExistsInConfig
public boolean appExistsInConfig()
-
appExistsInConfig
public boolean appExistsInConfig(String contextRoot)
-
getSystemApplicationConfig
public Application getSystemApplicationConfig()
Gets the application config for the system application with the matching name or context root (in that order).- Returns:
- The application config, or null if there is no matching application
-
getSystemApplicationConfig
public Application getSystemApplicationConfig(String contextRoot)
Gets the application config for the system application with the matching context root. This method is used over the overloaded method if you want to skip trying to get the application config based on the application name, such as if you've reconfigured the application.- Parameters:
contextRoot
- The context root of the application- Returns:
- The application config, or null if there is no matching application.
-
service
public void service(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Response response) throws Exception
- Specified by:
service
in classorg.glassfish.grizzly.http.server.HttpHandler
- Throws:
Exception
-
getHttpService
public 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
.
-
getContextRoot
public String getContextRoot()
Description copied from interface:Adapter
Returns the context root for this adapter- Specified by:
getContextRoot
in interfaceAdapter
- Returns:
- context root
-
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
-
isRegistered
public boolean isRegistered()
Description copied from interface:Adapter
Checks whether this adapter has been registered as a network endpoint.- Specified by:
isRegistered
in interfaceAdapter
-
setRegistered
public void setRegistered(boolean isRegistered)
Description copied from interface:Adapter
Marks this adapter as having been registered or unregistered as a network endpoint- Specified by:
setRegistered
in interfaceAdapter
-
isAppRegistered
public boolean isAppRegistered()
-
setAppRegistered
public void setAppRegistered(boolean appRegistered)
-
isAppRegistered
public boolean isAppRegistered(String contextRoot)
Overloaded method that checks if an application with the provided context root has been registered to this instance.- Parameters:
contextRoot
- The context root to match.- Returns:
- True if an application has been registered to this instance.
-
-