com.jamonapi.proxy
Class MonProxyLabeler

java.lang.Object
  extended by com.jamonapi.proxy.MonProxyLabeler
All Implemented Interfaces:
MonProxyLabelerInt, java.lang.Cloneable

public class MonProxyLabeler
extends java.lang.Object
implements MonProxyLabelerInt

Standard implementation of creating the jamon label for the MonProxy class. Something like this for method calls. MonProxy-Interface (class=org.hsqldb.jdbcPreparedStatement): public abstract java.sql.ResultSet java.sql.PreparedStatement.executeQuery() throws java.sql.SQLException and this should the method throw an Exception MonProxy-Exception: (class=com.mypackage.MyClass): Exception: public void helloWorld() throws MyException

Author:
stevesouza

Constructor Summary
MonProxyLabeler()
           
MonProxyLabeler(java.lang.String summaryPrefix, java.lang.String exceptionPrefix)
           
 
Method Summary
 java.lang.Object clone()
          This method should return an exact copy of this object though it need not be the same instance.
 java.lang.String getExceptionLabel(java.lang.reflect.Method method)
          When an exception is thrown this returns what jamon label do you want to use
 java.lang.String getExceptionPrefix()
           
 java.lang.String getSummaryLabel(java.lang.reflect.Method method)
          Summary label that you want jamon to use
 java.lang.String getSummaryPrefix()
           
 void init(MonProxy monProxy)
          Note init is called at time of initialization.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MonProxyLabeler

public MonProxyLabeler()

MonProxyLabeler

public MonProxyLabeler(java.lang.String summaryPrefix,
                       java.lang.String exceptionPrefix)
Method Detail

init

public void init(MonProxy monProxy)
Note init is called at time of initialization. This is a good time to get the class name being monitored for example via something like monProxy.getMonitoredObject().getClass().getName()

Specified by:
init in interface MonProxyLabelerInt

getSummaryLabel

public java.lang.String getSummaryLabel(java.lang.reflect.Method method)
Description copied from interface: MonProxyLabelerInt
Summary label that you want jamon to use

Specified by:
getSummaryLabel in interface MonProxyLabelerInt

getExceptionLabel

public java.lang.String getExceptionLabel(java.lang.reflect.Method method)
Description copied from interface: MonProxyLabelerInt
When an exception is thrown this returns what jamon label do you want to use

Specified by:
getExceptionLabel in interface MonProxyLabelerInt

getSummaryPrefix

public java.lang.String getSummaryPrefix()

getExceptionPrefix

public java.lang.String getExceptionPrefix()

clone

public java.lang.Object clone()
This method should return an exact copy of this object though it need not be the same instance.

Specified by:
clone in interface MonProxyLabelerInt
Overrides:
clone in class java.lang.Object