public class MonitoringFilter extends Object implements Filter
| Constructor and Description |
|---|
MonitoringFilter()
Constructeur.
|
| Modifier and Type | Method and Description |
|---|---|
protected HttpServletRequest |
createRequestWrapper(HttpServletRequest request,
HttpServletResponse response) |
protected CounterServletResponseWrapper |
createResponseWrapper(HttpServletRequest httpRequest,
HttpServletResponse httpResponse) |
void |
destroy() |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain) |
String |
getApplicationType() |
protected String |
getMonitoringUrl(HttpServletRequest httpRequest) |
protected String |
getRequestName(HttpServletRequest request) |
void |
init(FilterConfig config) |
protected boolean |
isAllowed(HttpServletRequest httpRequest,
HttpServletResponse httpResponse) |
protected boolean |
isRumMonitoring(HttpServletRequest httpRequest,
HttpServletResponse httpResponse) |
protected void |
log(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(FilterConfig config) throws ServletException
init in interface FilterServletExceptionpublic void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
doFilter in interface FilterIOExceptionServletExceptionprotected CounterServletResponseWrapper createResponseWrapper(HttpServletRequest httpRequest, HttpServletResponse httpResponse)
protected HttpServletRequest createRequestWrapper(HttpServletRequest request, HttpServletResponse response) throws IOException
IOExceptionprotected String getRequestName(HttpServletRequest request)
protected String getMonitoringUrl(HttpServletRequest httpRequest)
protected final boolean isRumMonitoring(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException
IOExceptionprotected boolean isAllowed(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException
IOExceptionprotected void log(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: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 © 2008–2024 Emeric Vernat. All rights reserved.