01: package com.jamonapi;
02:
03: import com.jamonapi.utils.BufferList;
04:
05: public class JAMonArrayBufferListener extends JAMonBufferListener {
06:
07: /**
08: * Constructor that creaates this object with its default name (the class
09: * name)
10: */
11: public JAMonArrayBufferListener() {
12: super ("JAMonArrayBufferListener");
13: }
14:
15: /** Pass in the jamonListener name */
16: public JAMonArrayBufferListener(String name) {
17: super (name);
18: }
19:
20: /** Name the listener and pass in the jamon BufferList to use */
21: public JAMonArrayBufferListener(String name, BufferList list) {
22: super (name, list);
23: }
24:
25: /**
26: * When this event is fired the monitor will be added to the rolling buffer.
27: * If it is a log4j monitor the buffer will be specific to log4j fields
28: * (i.e.LoggingEvent info such as threadname, formattedmessage, exception
29: * stack trace and a few others. If it is not then the super class's
30: * processEvent is called.
31: *
32: */
33: public void processEvent(Monitor mon) {
34: JAMonDetailValue jamDetail = mon.getJAMonDetailRow();
35: jamDetail.setKeyToString(false);
36: addRow(jamDetail);
37: }
38:
39: /** Makes a usable copy of this BufferListener */
40: public JAMonListener copy() {
41: return new JAMonArrayBufferListener(getName(), getBufferList()
42: .copy());
43: }
44:
45: }
|