FileDocCategorySizeDatePackage
WebDebugMonitor.javaAPI DocGlassfish v2 API3630Fri May 04 22:36:02 BST 2007com.sun.enterprise.web

WebDebugMonitor

public final class WebDebugMonitor extends Object
author
lwhite

Fields Summary
private static final Logger
_logger
Constructors Summary
public WebDebugMonitor()
Creates a new instance of WebDebugMonitor

    
           
      
    
Methods Summary
java.util.HashMapgetDebugMonitoringDetails()

 
        HashMap resultMap = new HashMap();
        boolean debugMonitoring = false;
        resultMap.put("debugMonitoring", Boolean.FALSE);
        long debugMonitoringPeriodMS = 30000L;
	try{
            Properties props = System.getProperties();
            String str=props.getProperty("MONITOR_WEB_CONTAINER");
            if(null!=str) {
                if( str.equalsIgnoreCase("TRUE"))
                //if( str.startsWith("TRUE") || str.startsWith("true") )
                    debugMonitoring=true;
            }
            String period=props.getProperty("MONITOR_WEB_TIME_PERIOD_SECONDS");
            if(null!=period) {
                debugMonitoringPeriodMS = (new Long (period).longValue())* 1000;
            }
            resultMap.put("debugMonitoringPeriodMS",
                          Long.valueOf(debugMonitoringPeriodMS));
            resultMap.put("debugMonitoring",
                          Boolean.valueOf(debugMonitoring));

        } catch(Exception e)
        {
            _logger.log(Level.SEVERE,"WebDebugMonitor.getDebugMonitoringDetails(), Exception when trying to get the System properties - ", e.toString());
        }
        return resultMap;