01: package com.jamonapi.proxy;
02:
03: /** Various parameters that are needed by all proxy jamon monitors. They
04: * are passed around via this object and so shared by all.
05: */
06: import java.util.List;
07:
08: import com.jamonapi.utils.BufferList;
09:
10: class Params {
11: // if the following are set to true/false it affects all proxy monitors.
12: boolean isEnabled = true;
13: boolean isInterfaceEnabled = true;
14: boolean isExceptionSummaryEnabled = true;
15: boolean isExceptionDetailEnabled = true;
16: boolean isSQLSummaryEnabled = true;
17: boolean isSQLDetailEnabled = true;
18: boolean isResultSetEnabled = false;
19: // ongoing counters that let you know the id of the exception thrown or sql statement executed since the server has been up
20: long exceptionID = 0;// note access to incrementing id's was not made thread safe at this time. If this is used for display only this is acceptable
21: long sqlID = 0;
22: // variables that store and display any exceptions the proxy throws
23: String[] exceptionHeader = { "ID", "StartTime",
24: "ExceptionStackTrace", "MethodName", };
25: BufferList exceptionBuffer = new BufferList(exceptionHeader);
26:
27: // variables that store and display any sql executed.
28: String[] sqlHeader = { "ID", "StartTime", "Executiontime",
29: "StatementReuse", "SQL", "ExceptionStackTrace",
30: "MethodName", };
31: BufferList sqlBuffer = new BufferList(sqlHeader, 100);
32: // any String entries put in this data structure will have a record that shows up in jamon if a query has the string. A good use for this
33: // is table names.
34: List matchStrings;
35:
36: public String toString() {
37:
38: return "isEnabled=" + isEnabled + ", isInterfaceEnabled="
39: + isInterfaceEnabled + ", isExceptionSummaryEnabled="
40: + isExceptionSummaryEnabled
41: + ", isExceptionDetailEnabled="
42: + isExceptionDetailEnabled + ", isSQLSummaryEnabled="
43: + isSQLSummaryEnabled + ", isSQLDetailEnabled="
44: + isSQLDetailEnabled + ", isResultSetEnabled="
45: + isResultSetEnabled;
46: }
47: }
|