com.alibaba.druid.support.http
Class StatViewServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.alibaba.druid.support.http.StatViewServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class StatViewServlet
extends javax.servlet.http.HttpServlet

注意:避免直接调用Druid相关对象例如DruidDataSource等,相关调用要到DruidStatManagerFacade里用反射实现

Author:
sandzhang
See Also:
Serialized Form

Field Summary
static String PARAM_NAME_ALLOW
           
static String PARAM_NAME_DENY
           
static String PARAM_NAME_PASSWORD
           
static String PARAM_NAME_RESET_ENABLE
           
static String PARAM_NAME_USERNAME
           
static String SESSION_USER_KEY
           
 String templatePage
           
 
Constructor Summary
StatViewServlet()
           
 
Method Summary
 void init()
           
 boolean isPermittedRequest(javax.servlet.http.HttpServletRequest request)
           
 boolean isPermittedRequest(String remoteAddress)
           
 boolean isRequireAuth()
           
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_NAME_RESET_ENABLE

public static final String PARAM_NAME_RESET_ENABLE
See Also:
Constant Field Values

PARAM_NAME_ALLOW

public static final String PARAM_NAME_ALLOW
See Also:
Constant Field Values

PARAM_NAME_DENY

public static final String PARAM_NAME_DENY
See Also:
Constant Field Values

PARAM_NAME_USERNAME

public static final String PARAM_NAME_USERNAME
See Also:
Constant Field Values

PARAM_NAME_PASSWORD

public static final String PARAM_NAME_PASSWORD
See Also:
Constant Field Values

SESSION_USER_KEY

public static final String SESSION_USER_KEY
See Also:
Constant Field Values

templatePage

public String templatePage
Constructor Detail

StatViewServlet

public StatViewServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

isRequireAuth

public boolean isRequireAuth()

isPermittedRequest

public boolean isPermittedRequest(javax.servlet.http.HttpServletRequest request)

isPermittedRequest

public boolean isPermittedRequest(String remoteAddress)

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws javax.servlet.ServletException,
                    IOException
Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException


Copyright © 2012 Alibaba Group. All Rights Reserved.