![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
/**//*
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* This software is released under a licence similar to the Apache Software Licence.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* See org.logicalcobwebs.proxool.package.html for details.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* The latest version is available at http://proxool.sourceforge.net
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
package org.logicalcobwebs.proxool.admin.servlet;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import org.apache.commons.logging.Log;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import org.apache.commons.logging.LogFactory;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import org.logicalcobwebs.proxool.*;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import org.logicalcobwebs.proxool.admin.SnapshotIF;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import org.logicalcobwebs.proxool.admin.StatisticsIF;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import javax.servlet.ServletConfig;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import javax.servlet.ServletException;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import javax.servlet.http.HttpServlet;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import javax.servlet.http.HttpServletRequest;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import javax.servlet.http.HttpServletResponse;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.io.IOException;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.io.PrintWriter;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.text.DateFormat;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.text.DecimalFormat;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.text.SimpleDateFormat;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.util.Calendar;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.util.Date;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.util.Iterator;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
import java.util.Properties;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Use this to admin each pool within Proxool. It acts like a normal
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* servlet., so just configure it within your web app as you see fit.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* For example, within web.xml:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <pre>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <servlet>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <servlet-name>Admin</servlet-name>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <servlet-class>org.logicalcobwebs.proxool.admin.servlet.AdminServlet</servlet-class>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <init-param>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <param-name>output</param-name>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <param-value>full|simple</param-value>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </init-param>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <init-param>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <param-name>cssFile</param-name>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <param-value>/my_path/my.css</param-value>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </init-param>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </servlet>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <servlet-mapping>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <servlet-name>Admin</servlet-name>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <url-pattern>/proxool</url-pattern>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </servlet-mapping>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </pre>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
*
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Options:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <ul>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>output: full|simple. "full" means with HTML header and body tags "simple" means
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* just the HTML. Choose "simple" if you are including this servlet within your own
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* web page. Note that if you choose simple output then you're probably going to want
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* to consider supplying some CSS to make it look nice.</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>cssFile: If you choose full output (see above) then some CSS is included, inline,
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* in the HTML header. If you specify a URL here then that file is also linked to. It is
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* linked after the inline CSS so you only have to override thos styles you want to be
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* different.</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </ul>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
*
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @author bill
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @author $Author: billhorsman $ (current maintainer)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @version $Revision: 1.14 $, $Date: 2006/06/09 17:32:54 $
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @since Proxool 0.7
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @modified by goodhumor $Date: 2008/02/29 00:28:42$
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
public class AdminServlet extends HttpServlet ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final Log LOG = LogFactory.getLog(ProxoolAdminServlet.class);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* The CSS class for a connection in different states:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <ul>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>null</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>available</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>active</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>offline</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </ul>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private static final String[] STATUS_CLASSES = ...{"null", "available", "active", "offline"};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* OUtput full HTML including <HTML>, <HEAD> and <BODY> tags.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #output
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see ProxoolAdminServlet configuration
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public static final String OUTPUT_FULL = "full";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* OUtput simple HTML <em>excluding</em> <HTML>, <HEAD> and <BODY> tags.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #output
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see ProxoolAdminServlet configuration
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
public static final String OUTPUT_SIMPLE = "simple";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Either {@link #OUTPUT_FULL} (default) or {@link #OUTPUT_SIMPLE}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see ProxoolAdminServlet configuration
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private String output;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* A valid URLL that can be linked to to override default, inline CSS.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see ProxoolAdminServlet configuration
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private String cssFile;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Used as part of the CSS class
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String STATISTIC = "statistic";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Used as part of the CSS class
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String CORE_PROPERTY = "core-property";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Used as part of the CSS class
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String STANDARD_PROPERTY = "standard-property";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Used as part of the CSS class
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String DELEGATED_PROPERTY = "delegated-property";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Used as part of the CSS class
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String SNAPSHOT = "snapshot";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
public void init(ServletConfig servletConfig) throws ServletException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
super.init(servletConfig);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Get output parameter. Default to OUTPUT_FULL.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
output = servletConfig.getInitParameter("output");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (output != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (output.equalsIgnoreCase(OUTPUT_FULL)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
output = OUTPUT_FULL;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (output.equalsIgnoreCase(OUTPUT_SIMPLE)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
output = OUTPUT_SIMPLE;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
LOG.warn("Unrecognised output parameter for " + this.getClass().getName() + ". Expected: " + OUTPUT_FULL + " or " + OUTPUT_SIMPLE);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
output = null;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (output == null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
output = OUTPUT_FULL;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
cssFile = servletConfig.getInitParameter("cssFile");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* HH:mm:ss
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #formatMilliseconds
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final DateFormat TIME_FORMAT = new SimpleDateFormat("HH:mm:ss");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* dd-MMM-yyyy HH:mm:ss
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final DateFormat DATE_FORMAT = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("0.00");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String DETAIL = "detail";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String DETAIL_MORE = "more";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String DETAIL_LESS = "less";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* The request parameter name that defines:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <ol>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>{@link #TAB_DEFINITION} (default)</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>{@link #TAB_SNAPSHOT}</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* <li>{@link #TAB_STATISTICS}</li>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* </ol>
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String TAB = "tab";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #TAB
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String TAB_DEFINITION = "definition";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #TAB
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String TAB_SNAPSHOT = "snapshot";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #TAB
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String TAB_STATISTICS = "statistics";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* The request parameter name that defines the pool
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String ALIAS = "alias";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* If we are drilling down into a connection (on the {@link #TAB_SNAPSHOT snapshot} tab then
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* this points to the {@link org.logicalcobwebs.proxool.ProxyConnection#getId() ID} we are
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* getting detailed information for.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
private static final String CONNECTION_ID = "id";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Delegate to {@link #doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doGet(request, response);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Show the details for a pool.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
response.setHeader("Pragma", "no-cache");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
response.setCharacterEncoding("UTF-8");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String link = request.getRequestURI();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Check the alias and if not defined and there is only one
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// then use that.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String alias = request.getParameter(ALIAS);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Check we can find the pool.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
ConnectionPoolDefinitionIF def = null;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (alias != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
try ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
def = ProxoolFacade.getConnectionPoolDefinition(alias);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} catch (ProxoolException e) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
alias = null;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String[] aliases = ProxoolFacade.getAliases();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (alias == null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (aliases.length > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
alias = aliases[0];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (def == null && alias != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
try ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
def = ProxoolFacade.getConnectionPoolDefinition(alias);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} catch (ProxoolException e) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
throw new ServletException("Couldn't find pool with alias " + alias);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String tab = request.getParameter(TAB);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (tab == null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
tab = TAB_DEFINITION;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// If we are showing the snapshot, are we showing it in detail or not?
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String snapshotDetail = request.getParameter(DETAIL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// If we are showing the snapshot, are we drilling down into a connection?
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String snapshotConnectionId = request.getParameter(CONNECTION_ID);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
try ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (output.equals(OUTPUT_FULL)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
response.setContentType("text/html");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
openHtml(response.getWriter());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
response.getWriter().println("<div class="version">Proxool " + Version.getVersion() + "</div>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doList(response.getWriter(), alias, tab, link);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Skip everything if there aren't any pools
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (aliases != null && aliases.length > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
StatisticsIF[] statisticsArray = ProxoolFacade.getStatistics(alias);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
final boolean statisticsAvailable = (statisticsArray != null && statisticsArray.length > 0);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
final boolean statisticsComingSoon = def.getStatistics() != null;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// We can't be on the statistics tab if there are no statistics
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (!statisticsComingSoon && tab.equals(TAB_STATISTICS)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
tab = TAB_DEFINITION;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doTabs(response.getWriter(), alias, link, tab, statisticsAvailable, statisticsComingSoon);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (tab.equals(TAB_DEFINITION)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doDefinition(response.getWriter(), def);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (tab.equals(TAB_SNAPSHOT)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doSnapshot(response.getWriter(), def, link, snapshotDetail, snapshotConnectionId);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (tab.equals(TAB_STATISTICS)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doStatistics(response.getWriter(), statisticsArray, def);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
throw new ServletException("Unrecognised tab '" + tab + "'");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} catch (ProxoolException e) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
throw new ServletException("Problem serving Proxool Admin", e);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (output.equals(OUTPUT_FULL)) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
closeHtml(response.getWriter());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Output the tabs that we are showing at the top of the page
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write the HTNL to
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param alias the current pool
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param link the URL to get back to this servlet
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param tab the active tab
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param statisticsAvailable whether statistics are available (true if configured and ready)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param statisticsComingSoon whether statistics will be available (true if configured but not ready yet)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doTabs(PrintWriter out, String alias, String link, String tab, boolean statisticsAvailable, boolean statisticsComingSoon) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<ul>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<li class="" + (tab.equals(TAB_DEFINITION) ? "active" : "inactive") + ""><a class="quiet" href="" + link + "?alias=" + alias + "&tab=" + TAB_DEFINITION + "">Definition</a></li>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<li class="" + (tab.equals(TAB_SNAPSHOT) ? "active" : "inactive") + ""><a class="quiet" href="" + link + "?alias=" + alias + "&tab=" + TAB_SNAPSHOT + "">Snapshot</a></li>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (statisticsAvailable) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<li class="" + (tab.equals(TAB_STATISTICS) ? "active" : "inactive") + ""><a class="quiet" href="" + link + "?alias=" + alias + "&tab=" + TAB_STATISTICS + "">Statistics</a></li>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (statisticsComingSoon) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<li class="disabled">Statistics</li>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</ul>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Output the statistics. If there are more than one set of statistics then show them all.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write HTML to
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param statisticsArray the statistics we have ready to see
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param cpd defines the connection
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doStatistics(PrintWriter out, StatisticsIF[] statisticsArray, ConnectionPoolDefinitionIF cpd) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
for (int i = 0; i < statisticsArray.length; i++) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
StatisticsIF statistics = statisticsArray[i];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
openDataTable(out);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.ALIAS, cpd.getAlias(), CORE_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Period
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Period", TIME_FORMAT.format(statistics.getStartDate()) + " to " + TIME_FORMAT.format(statistics.getStopDate()), STATISTIC);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Served
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Served", statistics.getServedCount() + " (" + DECIMAL_FORMAT.format(statistics.getServedPerSecond()) + "/s)", STATISTIC);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Refused
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Refused", statistics.getRefusedCount() + " (" + DECIMAL_FORMAT.format(statistics.getRefusedPerSecond()) + "/s)", STATISTIC);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// averageActiveTime
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Average active time", DECIMAL_FORMAT.format(statistics.getAverageActiveTime() / 1000) + "s", STATISTIC);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// activityLevel
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
StringBuffer activityLevelBuffer = new StringBuffer();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
int activityLevel = (int) (100 * statistics.getAverageActiveCount() / cpd.getMaximumConnectionCount());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
activityLevelBuffer.append(activityLevel);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
activityLevelBuffer.append("%<br/>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
String[] colours = ...{"0000ff", "eeeeee"};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
int[] lengths = ...{activityLevel, 100 - activityLevel};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
drawBarChart(activityLevelBuffer, colours, lengths);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Activity level", activityLevelBuffer.toString(), STATISTIC);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
closeTable(out);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* We can draw a bar chart simply enough. The two arrays passed as parameters must be of equal length
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write the HTML
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param colours the colur (CSS valid string) for each segment
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param lengths the length of each segment. Can be any size since the chart just takes up as much room
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* as possible as uses the relative length of each segment.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void drawBarChart(StringBuffer out, String[] colours, int[] lengths) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append("<table style="margin: 8px; font-size: 50%;" width="100%" border="0" cellspacing="0" cellpadding="0"><tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Calculate total length
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
int totalLength = 0;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
for (int i = 0; i < colours.length; i++) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
totalLength += lengths[i];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Draw segments
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
for (int j = 0; j < colours.length; j++) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String colour = colours[j];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
int length = lengths[j];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (length > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append("<td style="background-color: #");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append(colour);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append("" width="");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append(100 * length / totalLength);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append("%"> </td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.append("</tr></table>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Output the {@link ConnectionPoolDefinitionIF definition}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write the HTML
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param cpd the definition
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doDefinition(PrintWriter out, ConnectionPoolDefinitionIF cpd) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
openDataTable(out);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/**//*
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
TODO: it would be nice to have meta-data in the definition so that this is much easier.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.ALIAS, cpd.getAlias(), CORE_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.DRIVER_URL, cpd.getUrl(), CORE_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.DRIVER_CLASS, cpd.getDriver(), CORE_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.MINIMUM_CONNECTION_COUNT, String.valueOf(cpd.getMinimumConnectionCount()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.MAXIMUM_CONNECTION_COUNT, String.valueOf(cpd.getMaximumConnectionCount()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.PROTOTYPE_COUNT, cpd.getPrototypeCount() > 0 ? String.valueOf(cpd.getPrototypeCount()) : null, STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.SIMULTANEOUS_BUILD_THROTTLE, String.valueOf(cpd.getSimultaneousBuildThrottle()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME, formatMilliseconds(cpd.getMaximumConnectionLifetime()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.MAXIMUM_ACTIVE_TIME, formatMilliseconds(cpd.getMaximumActiveTime()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME, (cpd.getHouseKeepingSleepTime() / 1000) + "s", STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.HOUSE_KEEPING_TEST_SQL, cpd.getHouseKeepingTestSql(), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.TEST_BEFORE_USE, String.valueOf(cpd.isTestBeforeUse()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.TEST_AFTER_USE, String.valueOf(cpd.isTestAfterUse()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.RECENTLY_STARTED_THRESHOLD, formatMilliseconds(cpd.getRecentlyStartedThreshold()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME, formatMilliseconds(cpd.getOverloadWithoutRefusalLifetime()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.INJECTABLE_CONNECTION_INTERFACE_NAME, String.valueOf(cpd.getInjectableConnectionInterface()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.INJECTABLE_STATEMENT_INTERFACE_NAME, String.valueOf(cpd.getInjectableStatementInterface()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.INJECTABLE_CALLABLE_STATEMENT_INTERFACE_NAME, String.valueOf(cpd.getInjectableCallableStatementInterface()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.INJECTABLE_PREPARED_STATEMENT_INTERFACE_NAME, String.valueOf(cpd.getInjectablePreparedStatementInterface()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// fatalSqlExceptions
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String fatalSqlExceptions = null;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (cpd.getFatalSqlExceptions() != null && cpd.getFatalSqlExceptions().size() > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
StringBuffer fatalSqlExceptionsBuffer = new StringBuffer();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Iterator i = cpd.getFatalSqlExceptions().iterator();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
while (i.hasNext()) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String s = (String) i.next();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fatalSqlExceptionsBuffer.append(s);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fatalSqlExceptionsBuffer.append(i.hasNext() ? ", " : "");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fatalSqlExceptions = fatalSqlExceptionsBuffer.toString();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.FATAL_SQL_EXCEPTION, fatalSqlExceptions, STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.FATAL_SQL_EXCEPTION_WRAPPER_CLASS, cpd.getFatalSqlExceptionWrapper(), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.STATISTICS, cpd.getStatistics(), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.STATISTICS_LOG_LEVEL, cpd.getStatisticsLogLevel(), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.VERBOSE, String.valueOf(cpd.isVerbose()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.TRACE, String.valueOf(cpd.isTrace()), STANDARD_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Now all the properties that are forwarded to the delegate driver.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Properties p = cpd.getDelegateProperties();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Iterator i = p.keySet().iterator();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
while (i.hasNext()) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String name = (String) i.next();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String value = p.getProperty(name);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Better hide the password!
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (name.toLowerCase().indexOf("password") > -1 || name.toLowerCase().indexOf("passwd") > -1) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
value = "******";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, name + " (delegated)", value, DELEGATED_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
closeTable(out);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Output a {@link SnapshotIF snapshot} of the pool.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write the HTML
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param cpd defines the pool
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param link the URL back to this servlet
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param level either {@link #DETAIL_LESS} or {@link #DETAIL_MORE}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param connectionId the connection we want to drill into (optional)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doSnapshot(PrintWriter out, ConnectionPoolDefinitionIF cpd, String link, String level, String connectionId) throws IOException, ProxoolException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
boolean detail = (level != null && level.equals(DETAIL_MORE));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
SnapshotIF snapshot = ProxoolFacade.getSnapshot(cpd.getAlias(), detail);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (snapshot != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
openDataTable(out);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, ProxoolConstants.ALIAS, cpd.getAlias(), CORE_PROPERTY);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// dateStarted
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Start date", DATE_FORMAT.format(snapshot.getDateStarted()), SNAPSHOT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// snapshot date
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Snapshot", TIME_FORMAT.format(snapshot.getSnapshotDate()), SNAPSHOT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// connections
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
StringBuffer connectionsBuffer = new StringBuffer();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(snapshot.getActiveConnectionCount());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(" (active), ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(snapshot.getAvailableConnectionCount());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(" (available), ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (snapshot.getOfflineConnectionCount() > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(snapshot.getOfflineConnectionCount());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(" (offline), ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(snapshot.getMaximumConnectionCount());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
connectionsBuffer.append(" (max)<br/>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
String[] colours = ...{"ff9999", "66cc66", "cccccc"};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
int[] lengths = ...{snapshot.getActiveConnectionCount(), snapshot.getAvailableConnectionCount(),
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
snapshot.getMaximumConnectionCount() - snapshot.getActiveConnectionCount() - snapshot.getAvailableConnectionCount()};
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
drawBarChart(connectionsBuffer, colours, lengths);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Connections", connectionsBuffer.toString(), SNAPSHOT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// servedCount
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Served", String.valueOf(snapshot.getServedCount()), SNAPSHOT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// refusedCount
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
printDefinitionEntry(out, "Refused", String.valueOf(snapshot.getRefusedCount()), SNAPSHOT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (!detail) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <td colspan="2" align="right"><form action="" + link + "" method="GET">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="hidden" name="" + ALIAS + "" value="" + cpd.getAlias() + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="hidden" name="" + TAB + "" value="" + TAB_SNAPSHOT + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="hidden" name="" + DETAIL + "" value="" + DETAIL_MORE + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="submit" value="More information>">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</form></td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <th width="200" valign="top">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("Details:<br>(click ID to drill down)");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</th>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doSnapshotDetails(out, cpd, snapshot, link, connectionId);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
long drillDownConnectionId;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (connectionId != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
drillDownConnectionId = Long.valueOf(connectionId).longValue();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
ConnectionInfoIF drillDownConnection = snapshot.getConnectionInfo(drillDownConnectionId);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (drillDownConnection != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <th valign="top">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("Connection #" + connectionId);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doDrillDownConnection(out, drillDownConnection);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <td colspan="2" align="right"><form action="" + link + "" method="GET">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="hidden" name="" + ALIAS + "" value="" + cpd.getAlias() + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="hidden" name="" + TAB + "" value="" + TAB_SNAPSHOT + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="hidden" name="" + DETAIL + "" value="" + DETAIL_LESS + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<input type="submit" value="< Less information">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</form></td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
closeTable(out);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* If we want a {@link #DETAIL_MORE more} detailed {@link SnapshotIF snapshot} then {@link #doSnapshot(javax.servlet.PrintWriter, org.logicalcobwebs.proxool.ConnectionPoolDefinitionIF, String, String, String)}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* calls this too
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write the HTML
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param cpd defines the pool
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param snapshot snapshot
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param link the URL back to this servlet
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param connectionId the connection we want to drill into (optional)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param connectionId
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @throws IOException
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doSnapshotDetails(PrintWriter out, ConnectionPoolDefinitionIF cpd, SnapshotIF snapshot, String link, String connectionId) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
long drillDownConnectionId = 0;
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (connectionId != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
drillDownConnectionId = Long.valueOf(connectionId).longValue();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (snapshot.getConnectionInfos() != null && snapshot.getConnectionInfos().length > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<table cellpadding="2" cellspacing="0" border="0">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tbody>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td>#</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td align="center">born</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td align="center">last<br>start</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td align="center">lap<br>(ms)</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td> thread</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
ConnectionInfoIF[] connectionInfos = snapshot.getConnectionInfos();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
for (int i = 0; i < connectionInfos.length; i++) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
ConnectionInfoIF connectionInfo = connectionInfos[i];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (connectionInfo.getStatus() != ConnectionInfoIF.STATUS_NULL) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// drillDownConnectionId
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td style="background-color: #");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (connectionInfo.getStatus() == ConnectionInfoIF.STATUS_ACTIVE) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("ffcccc");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (connectionInfo.getStatus() == ConnectionInfoIF.STATUS_AVAILABLE) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("ccffcc");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (connectionInfo.getStatus() == ConnectionInfoIF.STATUS_OFFLINE) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("ccccff");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("" style="");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (drillDownConnectionId == connectionInfo.getId()) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("border: 1px solid black;");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(connectionInfo.getId());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("border: 1px solid transparent;");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(""><a href="");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(link);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("?");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(ALIAS);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("=");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(cpd.getAlias());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("&");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(TAB);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("=");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(TAB_SNAPSHOT);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("&");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(DETAIL);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("=");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(DETAIL_MORE);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("&");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(CONNECTION_ID);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("=");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(connectionInfo.getId());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(connectionInfo.getId());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</a>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// birth
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td> ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(TIME_FORMAT.format(connectionInfo.getBirthDate()));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// started
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td> ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(connectionInfo.getTimeLastStartActive() > 0 ? TIME_FORMAT.format(new Date(connectionInfo.getTimeLastStartActive())) : "-");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// active
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td align="right" class="");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(getStatusClass(connectionInfo));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String active = " ";
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (connectionInfo.getTimeLastStopActive() > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
active = String.valueOf((int) (connectionInfo.getTimeLastStopActive() - connectionInfo.getTimeLastStartActive()));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (connectionInfo.getTimeLastStartActive() > 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
active = String.valueOf((int) (snapshot.getSnapshotDate().getTime() - connectionInfo.getTimeLastStartActive()));
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(active);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" </td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// requester
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<td> ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(connectionInfo.getRequester() != null ? connectionInfo.getRequester() : "-");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tbody>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</table>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("No connections yet");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* What CSS class to use for a particular connection.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param info so we know the {@link org.logicalcobwebs.proxool.ConnectionInfoIF#getStatus()} status
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @return the CSS class
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #STATUS_CLASSES
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private static String getStatusClass(ConnectionInfoIF info) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
try ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return STATUS_CLASSES[info.getStatus()];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} catch (ArrayIndexOutOfBoundsException e) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
LOG.warn("Unknown status: " + info.getStatus());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return "unknown-" + info.getStatus();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doDrillDownConnection(PrintWriter out, ConnectionInfoIF drillDownConnection) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// sql calls
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String[] sqlCalls = drillDownConnection.getSqlCalls();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
for (int i = 0; sqlCalls != null && i < sqlCalls.length; i++) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String sqlCall = sqlCalls[i];
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<div class="drill-down">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("sql = ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(sqlCall);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</div>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// proxy
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<div class="drill-down">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("proxy = ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(drillDownConnection.getProxyHashcode());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</div>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// delegate
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<div class="drill-down">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("delegate = ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(drillDownConnection.getDelegateHashcode());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</div>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// url
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String url= drillDownConnection.getDelegateUrl();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String[] urls=url.split("/?"); //Hide the user & password of url
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("<div class="drill-down">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("url = ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(urls[0]);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</div>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void openHtml(PrintWriter out) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<html><header><title>Proxool Admin</title>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<style media="screen">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("body {background-color: #93bde6;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"div.version {font-weight: bold; font-size: 100%; margin-bottom: 8px;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"h1 {font-weight: bold; font-size: 100%} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"option {padding: 2px 24px 2px 4px;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"input {margin: 0px 0px 4px 12px;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"table.data {font-size: 90%; border-collapse: collapse; border: 1px solid black;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"table.data th {background: #bddeff; width: 25em; text-align: left; padding-right: 8px; font-weight: normal; border: 1px solid black;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"table.data td {background: #ffffff; vertical-align: top; padding: 0px 2px 0px 2px; border: 1px solid black;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"td.null {background: yellow;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"td.available {color: black;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"td.active {color: red;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"td.offline {color: blue;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"div.drill-down {} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"ul {list-style: none; padding: 0px; margin: 0px; position: relative; font-size: 90%;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"li {padding: 0px; margin: 0px 4px 0px 0px; display: inline; border: 1px solid black; border-width: 1px 1px 0px 1px;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"li.active {background: #bddeff;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"li.inactive {background: #eeeeee;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"li.disabled {background: #dddddd; color: #999999; padding: 0px 4px 0px 4px;} " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"a.quiet {color: black; text-decoration: none; padding: 0px 4px 0px 4px; } " +
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
"a.quiet:hover {background: white;} ");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</style>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// If we have configured a cssFile then that will override what we have above
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (cssFile != null) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<link rel="stylesheet" media="screen" type="text/css" href="" + cssFile + ""></script>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</header><body>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void closeHtml(PrintWriter out) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</body></html>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void openDataTable(PrintWriter out) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<table cellpadding="2" cellspacing="0" border="1" class="data">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tbody>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void closeTable(PrintWriter out) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tbody>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</table>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<br/>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void printDefinitionEntry(PrintWriter out, String name, String value, String type) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" <tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <th valign="top">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(name);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(":</th>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <td class="" + type + ""nowrap>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (value != null && !value.equals("null")) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(value);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("-");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print("</td>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println(" </tr>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Output the list of available connection pools. If there are none then display a message saying that.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* If there is only one then just display nothing (and the pool will displayed by default)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param out where to write the HTML
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param alias identifies the current pool
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param tab identifies the tab we are on so that changing pools doesn't change the tab
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param link the URL back to this servlet
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private void doList(PrintWriter out, String alias, String tab, String link) throws IOException ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
String[] aliases = ProxoolFacade.getAliases();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
if (aliases.length == 0) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<p>No pools have been registered.</p>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else if (aliases.length == 1) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
// Don't bother listing. Just show it.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
} else ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<form action="" + link + "" method="GET" name="alias">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<select name="alias" size="" + Math.min(aliases.length, 5) + "">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
for (int i = 0; i < aliases.length; i++) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(" <option value="");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(aliases[i]);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(""");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(aliases[i].equals(alias) ? " selected" : "");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.print(aliases[i]);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</option>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</select>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<input name="" + TAB + "" value="" + tab + "" type="hidden">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("<input value="Show" type="submit">");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
out.println("</form>");
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
/** *//**
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* Express time in an easy to read HH:mm:ss format
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
*
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @param time in milliseconds
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @return time (e.g. 180000 = 00:30:00)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
* @see #TIME_FORMAT
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
*/
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedSubBlock.gif)
private String formatMilliseconds(int time) ...{
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Calendar c = Calendar.getInstance();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
c.clear();
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
c.add(Calendar.MILLISECOND, time);
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
return TIME_FORMAT.format(c.getTime());
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedSubBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
}
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gif)
/**//*
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision history:
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
$Log: ProxoolAdminServlet.java,v $
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.14 2006/06/09 17:32:54 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Fix closing tag for select. Credit to Paolo Di Tommaso.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.13 2006/01/18 14:39:56 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Unbundled Jakarta's Commons Logging.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.12 2005/10/07 08:23:10 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Doc
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.11 2005/10/02 09:45:49 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Layout
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.10 2005/09/26 21:47:46 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
no message
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.9 2005/09/26 13:31:14 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Smartened up ProxoolAdminServlet
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.8 2003/09/29 17:49:19 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Includes new fatal-sql-exception-wrapper-class in display
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.7 2003/08/06 20:08:58 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fix timezone display of time (for millisecond based properties)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.6 2003/03/10 23:43:14 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
reapplied checkstyle that i'd inadvertently let
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
IntelliJ change...
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.5 2003/03/10 15:26:51 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
refactoringn of concurrency stuff (and some import
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
optimisation)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.4 2003/03/03 11:12:00 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fixed licence
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.3 2003/02/26 16:59:18 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fixed spelling error in method name
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.2 2003/02/26 16:51:12 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fixed units for average active time. now displays
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
properly in seconds
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.1 2003/02/24 10:19:44 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
moved ProxoolAdminServlet into servlet package
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.1 2003/02/19 23:36:51 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
renamed monitor package to admin
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.10 2003/02/12 12:28:27 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
added url, proxyHashcode and delegateHashcode to
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
ConnectionInfoIF
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.9 2003/02/11 00:30:28 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
add version
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.8 2003/02/06 17:41:05 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
now uses imported logging
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.7 2003/02/06 15:42:21 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
display changes
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.6 2003/02/05 17:04:02 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
fixed date format
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.5 2003/02/05 15:06:16 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
removed dependency on JDK1.4 imaging.
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.4 2003/01/31 16:53:21 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
checkstyle
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.3 2003/01/31 16:38:52 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
doc (and removing public modifier for classes where possible)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.2 2003/01/31 11:35:57 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
improvements to servlet (including connection details)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
Revision 1.1 2003/01/31 00:38:22 billhorsman
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif)
*** empty log message ***
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif)
*/