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 booleanappExistsInConfig()booleanappExistsInConfig(String contextRoot)StringgetContextRoot()Returns the context root for this adapterorg.glassfish.grizzly.http.server.HttpHandlergetHttpService()Get the underlying GrizzlyHttpHandler.InetAddressgetListenAddress()intgetListenPort()Returns the listener port for this adapterApplicationgetSystemApplicationConfig()Gets the application config for the system application with the matching name or context root (in that order).ApplicationgetSystemApplicationConfig(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 adapterbooleanisAppRegistered()booleanisAppRegistered(String contextRoot)Overloaded method that checks if an application with the provided context root has been registered to this instance.booleanisRegistered()Checks whether this adapter has been registered as a network endpoint.voidpostConstruct()voidservice(org.glassfish.grizzly.http.server.Request request, org.glassfish.grizzly.http.server.Response response)voidsetAppRegistered(boolean appRegistered)voidsetRegistered(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:
servicein classorg.glassfish.grizzly.http.server.HttpHandler- Throws:
Exception
-
getHttpService
public org.glassfish.grizzly.http.server.HttpHandler getHttpService()
Description copied from interface:AdapterGet the underlying GrizzlyHttpHandler.- Specified by:
getHttpServicein interfaceAdapter- Returns:
- the underlying Grizzly
HttpHandler.
-
getContextRoot
public String getContextRoot()
Description copied from interface:AdapterReturns the context root for this adapter- Specified by:
getContextRootin interfaceAdapter- Returns:
- context root
-
getListenPort
public int getListenPort()
Description copied from interface:AdapterReturns the listener port for this adapter- Specified by:
getListenPortin interfaceAdapter- Returns:
- listener port
-
getListenAddress
public InetAddress getListenAddress()
- Specified by:
getListenAddressin interfaceAdapter- Returns:
- the
InetAddresson which this adapter is listening
-
getVirtualServers
public List<String> getVirtualServers()
Description copied from interface:AdapterReturns the virtual servers supported by this adapter- Specified by:
getVirtualServersin interfaceAdapter- Returns:
- List<String> the virtual server list supported by the adapter
-
isRegistered
public boolean isRegistered()
Description copied from interface:AdapterChecks whether this adapter has been registered as a network endpoint.- Specified by:
isRegisteredin interfaceAdapter
-
setRegistered
public void setRegistered(boolean isRegistered)
Description copied from interface:AdapterMarks this adapter as having been registered or unregistered as a network endpoint- Specified by:
setRegisteredin 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.
-
-