1 23 24 package com.sun.enterprise.connectors.inflow.monitor; 25 26 import com.sun.enterprise.admin.monitor.stats.ConnectorEndPointFactoryStats; 27 import com.sun.enterprise.admin.monitor.stats.CountStatisticImpl; 28 import com.sun.enterprise.admin.monitor.stats.GenericStatsImpl; 29 import com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl; 30 import com.sun.enterprise.resource.monitor.AbstractStatsImpl; 31 32 import com.sun.logging.LogDomains; 33 34 import java.util.logging.Level ; 35 import java.util.logging.Logger ; 36 37 import javax.management.j2ee.statistics.CountStatistic ; 38 39 46 public class ConnectorEndPointFactoryStatsImpl extends AbstractStatsImpl 47 implements ConnectorEndPointFactoryStats { 48 49 private static Logger _logger = 50 LogDomains.getLogger( LogDomains.RSR_LOGGER ); 51 private GenericStatsImpl gsImpl; 52 53 private CountStatistic endPointsCreatedCount; 54 private CountStatistic messagesDeliveredCount; 55 private CountStatistic runTimeExceptionsCount; 56 57 public ConnectorEndPointFactoryStatsImpl() { 59 initializeStatistics(); 60 try { 61 gsImpl = new GenericStatsImpl( 62 this.getClass().getInterfaces()[0].getName(), this ); 63 } catch( ClassNotFoundException cnfe ) { 64 _logger.log( Level.INFO, "endpointfacmon.cnfe", "GenericStatsImpl" ); 66 } 67 } 68 69 70 private void initializeStatistics() { 71 long time = System.currentTimeMillis(); 72 CountStatistic cs = null; 73 74 cs = new CountStatisticImpl(0, 75 "endPointsCreated", "", 76 "The number of endpoints created using this endpoint factory" 77 ,time, time); 78 endPointsCreatedCount = new MutableCountStatisticImpl( cs ); 79 80 cs = new CountStatisticImpl(0, "messagesDelivered", "", 81 "The number of messages delivered to endpoints created using this " + 82 "endpoint factory",time, time); 83 messagesDeliveredCount = new MutableCountStatisticImpl( cs ); 84 85 cs = new CountStatisticImpl(0, "runtimeExceptionCount", "", 86 "The number of runtime exceptions thown by endpoints created" + 87 "by this end point factory",time, time); 88 runTimeExceptionsCount = new MutableCountStatisticImpl( cs ); 89 } 90 91 92 95 public CountStatistic getMessagesCreatedCount() { 96 return null; 98 } 99 100 101 104 public CountStatistic getDeliveredMessageCount() { 105 return null; 107 } 108 109 110 113 public CountStatistic getRuntimeExceptionsCount() { 114 return null; 116 } 117 } 118 | Popular Tags |