com.jamonapi
Class JAMonBufferListener

java.lang.Object
  extended by com.jamonapi.JAMonBufferListener
All Implemented Interfaces:
CopyJAMonListener, JAMonListener, java.util.EventListener
Direct Known Subclasses:
JAMonArrayBufferListener, Log4jBufferListener, SharedJAMonBufferListener

public class JAMonBufferListener
extends java.lang.Object
implements JAMonListener, CopyJAMonListener

JAMonListener that puts jamon data into a buffer that allows you to display the last N configurble detail events. The buffer will have the detail label, value and invocation date for the monitor that was fired.

Author:
steve souza

Constructor Summary
JAMonBufferListener()
           
JAMonBufferListener(java.lang.String name)
          Pass in the jamonListener name
JAMonBufferListener(java.lang.String name, BufferList list)
          Name the listener and pass in the jamon BufferList to use
 
Method Summary
 void addRow(java.lang.Object[] row)
          Add a row to the buffer
 void addRow(ToArray row)
          Add a row to the buffer
 JAMonListener copy()
           
 BufferList getBufferList()
          get the underlying bufferList which can then be used to display its contents
 DetailData getDetailData()
           
 java.lang.String getName()
           
 int getRowCount()
           
 boolean hasData()
           
 boolean isEmpty()
           
 void processEvent(Monitor mon)
          When this event is fired the monitor will be added to the rolling buffer
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAMonBufferListener

public JAMonBufferListener()

JAMonBufferListener

public JAMonBufferListener(java.lang.String name)
Pass in the jamonListener name


JAMonBufferListener

public JAMonBufferListener(java.lang.String name,
                           BufferList list)
Name the listener and pass in the jamon BufferList to use

Method Detail

processEvent

public void processEvent(Monitor mon)
When this event is fired the monitor will be added to the rolling buffer

Specified by:
processEvent in interface JAMonListener

addRow

public void addRow(ToArray row)
Add a row to the buffer


addRow

public void addRow(java.lang.Object[] row)
Add a row to the buffer


getBufferList

public BufferList getBufferList()
get the underlying bufferList which can then be used to display its contents


getName

public java.lang.String getName()
Specified by:
getName in interface JAMonListener

setName

public void setName(java.lang.String name)
Specified by:
setName in interface JAMonListener

copy

public JAMonListener copy()
Specified by:
copy in interface CopyJAMonListener

getDetailData

public DetailData getDetailData()

getRowCount

public int getRowCount()

hasData

public boolean hasData()

isEmpty

public boolean isEmpty()