1 28 29 30 package com.caucho.management.j2ee; 31 32 import javax.management.j2ee.statistics.ServletStats ; 33 import javax.management.j2ee.statistics.TimeStatistic ; 34 import javax.servlet.ServletConfig ; 35 36 public class Servlet 37 extends J2EEManagedObject 38 implements StatisticsProvider<ServletStats > 39 { 40 private final ServletConfig _servletConfig; 41 42 public Servlet(ServletConfig servletConfig) 43 { 44 _servletConfig = servletConfig; 45 } 46 47 protected String getName() 48 { 49 return _servletConfig.getServletName(); 50 } 51 52 public ServletStats getStats() 53 { 54 return new ServletStatsImpl(this); 55 } 56 57 59 class ServletStatsImpl 60 extends StatsSupport 61 implements ServletStats 62 { 63 public ServletStatsImpl(J2EEManagedObject j2eeManagedObject) 64 { 65 super(j2eeManagedObject); 66 } 67 68 public TimeStatistic getServiceTime() 69 { 70 return new UnimplementedTimeStatistic("ServiceTime"); 71 } 72 } 73 } 74 | Popular Tags |