public class AdaptedMonitoringFilter extends Object implements javax.servlet.Filter
| Constructor and Description |
|---|
AdaptedMonitoringFilter()
Constructeur.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.servlet.http.HttpServletRequest |
createRequestWrapper(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected net.bull.javamelody.internal.web.CounterServletResponseWrapper |
createResponseWrapper(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse) |
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
String |
getApplicationType() |
protected String |
getMonitoringUrl(javax.servlet.http.HttpServletRequest httpRequest) |
protected String |
getRequestName(javax.servlet.http.HttpServletRequest request) |
void |
init(javax.servlet.FilterConfig config) |
protected boolean |
isAllowed(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse) |
protected boolean |
isRumMonitoring(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse) |
protected void |
log(javax.servlet.http.HttpServletRequest httpRequest,
String requestName,
long duration,
boolean systemError,
int responseStatus,
long responseSize) |
static void |
registerApplicationNodeInCollectServer(String applicationName,
URL collectServerUrl,
URL applicationNodeUrl)
Asynchronously calls the optional collect server to register this application's node to be monitored.
|
void |
setApplicationType(String applicationType) |
static void |
unregisterApplicationNodeInCollectServer()
Call the optional collect server to unregister this application's node.
|
public String getApplicationType()
public void setApplicationType(String applicationType)
applicationType - Type of applicationpublic void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filterpublic void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOExceptionjavax.servlet.ServletExceptionprotected net.bull.javamelody.internal.web.CounterServletResponseWrapper createResponseWrapper(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
protected javax.servlet.http.HttpServletRequest createRequestWrapper(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
IOExceptionprotected String getRequestName(javax.servlet.http.HttpServletRequest request)
protected String getMonitoringUrl(javax.servlet.http.HttpServletRequest httpRequest)
protected final boolean isRumMonitoring(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws IOException
IOExceptionprotected boolean isAllowed(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
throws IOException
IOExceptionprotected void log(javax.servlet.http.HttpServletRequest httpRequest,
String requestName,
long duration,
boolean systemError,
int responseStatus,
long responseSize)
public static void registerApplicationNodeInCollectServer(String applicationName, URL collectServerUrl, URL applicationNodeUrl)
applicationName - Name of the application in the collect server:
if it already exists the node will be added with the other nodes, if null name will be "contextPath_hostname".collectServerUrl - Url of the collect server,
for example http://11.22.33.44:8080applicationNodeUrl - Url of this application node to be called by the collect server,
for example http://55.66.77.88:8080/mywebapppublic static void unregisterApplicationNodeInCollectServer()
throws IOException
IOException - eCopyright © 2020. All rights reserved.