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 configurable detail events. The buffer will have the detail label, value and invocation date for the monitor that was fired.

Author:
steve souza

Nested Class Summary
static class JAMonBufferListener.HeaderInfo
           
 
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()
          Make a copy of this instance
 BufferList getBufferList()
          get the underlying bufferList which can then be used to display its contents
static JAMonBufferListener.HeaderInfo getDefaultHeaderInfo()
           
 DetailData getDetailData()
           
static JAMonBufferListener.HeaderInfo getHeaderInfo(java.lang.String[] firstPart)
           
 java.lang.String getName()
          Gets the name of this listener
 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)
          Set the name of the listener
 
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()
Description copied from interface: JAMonListener
Gets the name of this listener

Specified by:
getName in interface JAMonListener

setName

public void setName(java.lang.String name)
Description copied from interface: JAMonListener
Set the name of the listener

Specified by:
setName in interface JAMonListener

copy

public JAMonListener copy()
Make a copy of this instance

Specified by:
copy in interface CopyJAMonListener

getDetailData

public DetailData getDetailData()

getRowCount

public int getRowCount()

hasData

public boolean hasData()

isEmpty

public boolean isEmpty()

getDefaultHeaderInfo

public static JAMonBufferListener.HeaderInfo getDefaultHeaderInfo()

getHeaderInfo

public static JAMonBufferListener.HeaderInfo getHeaderInfo(java.lang.String[] firstPart)