Kieker 1.3

kieker.monitoring.probe.servlet
Class OperationExecutionRegistrationAndLoggingFilter

java.lang.Object
  extended by kieker.monitoring.probe.servlet.OperationExecutionRegistrationAndLoggingFilter
All Implemented Interfaces:
javax.servlet.Filter, IMonitoringProbe

public class OperationExecutionRegistrationAndLoggingFilter
extends Object
implements javax.servlet.Filter, IMonitoringProbe

Register session and trace id for incoming request. This probe also logs activations of this probe as execution records. It can be integrated into the web.xml as follows: sessionRegistrationFilter kieker.monitoring.probe.servlet.OperationExecutionRegistrationAndLoggingFilter sessionRegistrationFilter /*

Author:
Marco Luebcke

Constructor Summary
OperationExecutionRegistrationAndLoggingFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
           
 String getSessionId(javax.servlet.http.HttpServletRequest httpReq)
          Returns the session ID from request @r or null if no session in @r.
 void init(javax.servlet.FilterConfig config)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationExecutionRegistrationAndLoggingFilter

public OperationExecutionRegistrationAndLoggingFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

getSessionId

public final String getSessionId(javax.servlet.http.HttpServletRequest httpReq)
Returns the session ID from request @r or null if no session in @r.


doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter

Kieker 1.3

Copyright 2011 the Kieker Project, http://kieker.sourceforge.net