KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > cjdbc > controller > monitoring > Monitoring


1 /*
2  * Created on Dec 18, 2003
3  *
4  * To change the template for this generated file go to
5  * Window - Preferences - Java - Code Generation - Code and Comments
6  */

7 package org.objectweb.cjdbc.controller.monitoring;
8
9 import org.objectweb.cjdbc.common.xml.DatabasesXmlTags;
10 import org.objectweb.cjdbc.common.xml.XmlComponent;
11
12 /**
13  * @author niko
14  *
15  * To change the template for this generated type comment go to
16  * Window - Preferences - Java - Code Generation - Code and Comments
17  */

18 public abstract class Monitoring implements XmlComponent
19 {
20   boolean active;
21   
22   /**
23    * Return all stats information in the form of a String
24    *
25    * @return stats information
26    */

27   public abstract String JavaDoc[][] getAllStatsInformation();
28   /**
29    * Dump all stats using the current logger (INFO level).
30    */

31   public abstract void dumpAllStatsInformation();
32   
33   /**
34    * Clean the content of statistics, to avoid memory problems.
35    */

36   public abstract void cleanStats();
37
38   /**
39    * @see org.objectweb.cjdbc.common.xml.XmlComponent#getXml()
40    */

41   public String JavaDoc getXml()
42   {
43     StringBuffer JavaDoc info = new StringBuffer JavaDoc();
44     info.append("<"+DatabasesXmlTags.ELT_Monitoring+">");
45     info.append(getXmlImpl());
46     info.append("</"+DatabasesXmlTags.ELT_Monitoring+">");
47     return info.toString();
48   }
49   
50   /** Get implementation information */
51   protected abstract String JavaDoc getXmlImpl();
52   
53   /**
54    * Returns the active value.
55    *
56    * @return Returns the active.
57    */

58   public boolean isActive()
59   {
60     return active;
61   }
62   /**
63    * Sets the active value.
64    *
65    * @param active The active to set.
66    */

67   public void setActive(boolean active)
68   {
69     this.active = active;
70   }
71 }
Popular Tags