public class StatViewServlet extends ResourceServlet
| 限定符和类型 | 字段和说明 |
|---|---|
private MBeanServerConnection |
conn |
private String |
jmxPassword
web.xml中配置的jmx的密码
|
private String |
jmxUrl
web.xml中配置的jmx的连接地址
|
private String |
jmxUsername
web.xml中配置的jmx的用户名
|
private static Log |
LOG |
static String |
PARAM_NAME_JMX_PASSWORD |
static String |
PARAM_NAME_JMX_URL |
static String |
PARAM_NAME_JMX_USERNAME |
static String |
PARAM_NAME_RESET_ENABLE |
private static long |
serialVersionUID |
private DruidStatService |
statService |
allowList, denyList, PARAM_NAME_ALLOW, PARAM_NAME_DENY, PARAM_NAME_PASSWORD, PARAM_NAME_USERNAME, PARAM_REMOTE_ADDR, password, remoteAddressHeader, resourcePath, SESSION_USER_KEY, username| 构造器和说明 |
|---|
StatViewServlet() |
| 限定符和类型 | 方法和说明 |
|---|---|
private String |
getJmxResult(MBeanServerConnection connetion,
String url)
根据指定的url来获取jmx服务返回的内容.
|
void |
init() |
private void |
initJmxConn()
初始化jmx连接
|
protected String |
process(String url)
程序首先判断是否存在jmx连接地址,如果不存在,则直接调用本地的duird服务; 如果存在,则调用远程jmx服务。
|
private String |
readInitParam(String key)
读取servlet中的配置参数.
|
checkLoginParam, ContainsUser, getFilePath, getRemoteAddress, isPermittedRequest, isPermittedRequest, isRequireAuth, returnResourceFile, servicedoDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, serviceprivate static final Log LOG
private static final long serialVersionUID
private DruidStatService statService
private String jmxUrl
private String jmxUsername
private String jmxPassword
private MBeanServerConnection conn
public void init()
throws javax.servlet.ServletException
init 在类中 ResourceServletjavax.servlet.ServletExceptionprivate String readInitParam(String key)
key - 配置参数名private void initJmxConn()
throws IOException
IOExceptionprivate String getJmxResult(MBeanServerConnection connetion, String url) throws Exception
connetion - jmx连接url - url内容Exception - the exceptionprotected String process(String url)
process 在类中 ResourceServleturl - 要连接的服务地址Copyright © 2013–2019 Alibaba Group. All rights reserved.