org.codehaus.waffle.monitor
Class AbstractWritingMonitor
java.lang.Object
org.codehaus.waffle.monitor.AbstractWritingMonitor
- All Implemented Interfaces:
- ActionMonitor, BindMonitor, ContextMonitor, ControllerMonitor, Monitor, RegistrarMonitor, ServletMonitor, ValidationMonitor, ViewMonitor
- Direct Known Subclasses:
- CommonsLoggingMonitor, ConsoleMonitor, SilentMonitor
public abstract class AbstractWritingMonitor
- extends java.lang.Object
- implements ActionMonitor, BindMonitor, ContextMonitor, ControllerMonitor, RegistrarMonitor, ServletMonitor, ValidationMonitor, ViewMonitor
Abstract implementation of Monitor that delegates writing to concrete subclasses.
- Author:
- Mauro Talevi
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
| Nested classes/interfaces inherited from interface org.codehaus.waffle.monitor.Monitor |
Monitor.Level |
|
Method Summary |
void |
actionMethodExecuted(ActionMethodResponse actionMethodResponse)
|
void |
actionMethodExecutionFailed(java.lang.Exception cause)
|
void |
actionMethodFound(MethodDefinition methodDefinition)
|
void |
actionMethodInvocationFailed(java.lang.Exception cause)
|
void |
applicationContextContainerDestroyed()
|
void |
applicationContextContainerStarted()
|
void |
argumentNameNotMatched(java.lang.String name,
java.lang.String pattern)
|
void |
argumentNameResolved(java.lang.String name,
java.lang.Object value,
HierarchicalArgumentResolver.Scope scope)
|
void |
componentRegistered(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object[] parameters)
|
void |
contextInitializationFailed(WaffleException cause)
|
void |
contextInitialized()
|
void |
controllerBindFailed(java.lang.Object controller,
BindErrorMessage errorMessage,
java.lang.Exception cause)
|
void |
controllerNameResolved(java.lang.String name,
java.lang.String path)
|
void |
controllerNotFound(java.lang.String name)
|
void |
controllerValidatorNotFound(java.lang.String controllerValidatorName,
java.lang.String controllerName)
|
void |
controllerValueBound(java.lang.String name,
java.lang.Object value,
java.lang.Object controller)
|
void |
defaultActionMethodCached(java.lang.Class<?> controllerType,
MethodDefinition methodDefinition)
|
void |
defaultActionMethodFound(MethodDefinition methodDefinition)
|
protected java.util.List<java.lang.Exception> |
findExceptions(java.lang.Object[] arguments)
|
void |
genericParameterTypeFound(java.lang.reflect.Type type,
java.lang.reflect.Method method)
|
void |
genericParameterTypeNotFound(java.lang.reflect.Method method)
|
void |
instanceRegistered(java.lang.Object key,
java.lang.Object instance)
|
void |
methodDefinitionNotFound(ControllerDefinition controllerDefinition)
|
void |
methodDefinitionNotFound(java.lang.String controllerName)
|
void |
methodIntercepted(java.lang.reflect.Method method,
java.lang.Object[] arguments,
java.lang.Object returnValue)
|
void |
methodNameResolved(java.lang.String methodName,
java.lang.String methodKey,
java.util.Set<java.lang.String> keys)
|
protected java.util.Map<java.lang.String,Monitor.Level> |
monitorLevels()
Creates the default map of monitor levels, keyed on the event name. |
protected java.util.Map<java.lang.String,java.lang.String> |
monitorMessages()
Creates the default map of monitor message templates, keyed on the event name. |
void |
nonCachingComponentRegistered(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object[] parameters)
|
void |
pragmaticActionMethodFound(MethodDefinition methodDefinition)
|
void |
registrarCreated(Registrar registrar,
RegistrarMonitor registrarMonitor)
|
void |
registrarNotFound(java.lang.String registrarClassName)
|
void |
requestContextContainerCreated(ContextContainer sessionContextContainer)
|
void |
requestContextContainerNotFound()
|
void |
responseIsCommitted(javax.servlet.http.HttpServletResponse response)
|
void |
servletInitialized(javax.servlet.Servlet servlet)
|
void |
servletServiceFailed(java.lang.Exception cause)
|
void |
servletServiceRequested(java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
|
void |
sessionContextContainerCreated(ContextContainer applicationContextContainer)
|
protected abstract void |
trace(java.lang.Throwable exception)
Traces an exception. |
void |
validationFailed(java.lang.Exception cause)
|
void |
valueConverterFound(java.lang.reflect.Type type,
ValueConverter converter)
|
void |
valueConverterNotFound(java.lang.reflect.Type type)
|
void |
viewBindFailed(java.lang.Object controller,
java.lang.Exception cause)
|
void |
viewDispatched(View view)
|
void |
viewForwarded(java.lang.String path)
|
void |
viewRedirected(RedirectView redirectView)
|
void |
viewResponded(ResponderView responderView)
|
void |
viewValueBound(java.lang.String name,
java.lang.Object value,
java.lang.Object controller)
|
protected abstract void |
write(Monitor.Level level,
java.lang.String message)
Writes message for a given level. |
protected void |
write(java.lang.String event,
java.lang.Object... arguments)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractWritingMonitor
protected AbstractWritingMonitor()
monitorLevels
protected java.util.Map<java.lang.String,Monitor.Level> monitorLevels()
- Creates the default map of monitor levels, keyed on the event name.
Subclasses may override any of these by retrieving the levels via
super.monitorLevels(), overwriting any entry and returning
the map.
- Returns:
- A Map
monitorMessages
protected java.util.Map<java.lang.String,java.lang.String> monitorMessages()
- Creates the default map of monitor message templates, keyed on the event name.
Subclasses may override any of these by retrieving the messages via
super.monitorMessages(), overwriting any entry and returning
the map. Message templates need to be maintained in a format compatible with
MessageFormat and will expect the same number of arguments as the event
(with the argument index reflecting the argument order of the event).
- Returns:
- A Map
write
protected void write(java.lang.String event,
java.lang.Object... arguments)
findExceptions
protected java.util.List<java.lang.Exception> findExceptions(java.lang.Object[] arguments)
write
protected abstract void write(Monitor.Level level,
java.lang.String message)
- Writes message for a given level. Concrete implementations should provide writing functionality.
- Parameters:
level - the Levelmessage - the message to write
trace
protected abstract void trace(java.lang.Throwable exception)
- Traces an exception. Concrete implementations should provide writing functionality.
- Parameters:
exception - the Throwable to trace
defaultActionMethodFound
public void defaultActionMethodFound(MethodDefinition methodDefinition)
- Specified by:
defaultActionMethodFound in interface ActionMonitor
defaultActionMethodCached
public void defaultActionMethodCached(java.lang.Class<?> controllerType,
MethodDefinition methodDefinition)
- Specified by:
defaultActionMethodCached in interface ActionMonitor
pragmaticActionMethodFound
public void pragmaticActionMethodFound(MethodDefinition methodDefinition)
- Specified by:
pragmaticActionMethodFound in interface ActionMonitor
actionMethodFound
public void actionMethodFound(MethodDefinition methodDefinition)
- Specified by:
actionMethodFound in interface ActionMonitor
actionMethodExecuted
public void actionMethodExecuted(ActionMethodResponse actionMethodResponse)
- Specified by:
actionMethodExecuted in interface ActionMonitor
actionMethodExecutionFailed
public void actionMethodExecutionFailed(java.lang.Exception cause)
- Specified by:
actionMethodExecutionFailed in interface ActionMonitor
methodNameResolved
public void methodNameResolved(java.lang.String methodName,
java.lang.String methodKey,
java.util.Set<java.lang.String> keys)
- Specified by:
methodNameResolved in interface ActionMonitor
methodIntercepted
public void methodIntercepted(java.lang.reflect.Method method,
java.lang.Object[] arguments,
java.lang.Object returnValue)
- Specified by:
methodIntercepted in interface ActionMonitor
argumentNameResolved
public void argumentNameResolved(java.lang.String name,
java.lang.Object value,
HierarchicalArgumentResolver.Scope scope)
- Specified by:
argumentNameResolved in interface ActionMonitor
argumentNameNotMatched
public void argumentNameNotMatched(java.lang.String name,
java.lang.String pattern)
- Specified by:
argumentNameNotMatched in interface ActionMonitor
responseIsCommitted
public void responseIsCommitted(javax.servlet.http.HttpServletResponse response)
- Specified by:
responseIsCommitted in interface ActionMonitor
viewDispatched
public void viewDispatched(View view)
- Specified by:
viewDispatched in interface ActionMonitor
genericParameterTypeFound
public void genericParameterTypeFound(java.lang.reflect.Type type,
java.lang.reflect.Method method)
- Specified by:
genericParameterTypeFound in interface BindMonitor
genericParameterTypeNotFound
public void genericParameterTypeNotFound(java.lang.reflect.Method method)
- Specified by:
genericParameterTypeNotFound in interface BindMonitor
valueConverterFound
public void valueConverterFound(java.lang.reflect.Type type,
ValueConverter converter)
- Specified by:
valueConverterFound in interface BindMonitor
valueConverterNotFound
public void valueConverterNotFound(java.lang.reflect.Type type)
- Specified by:
valueConverterNotFound in interface BindMonitor
viewBindFailed
public void viewBindFailed(java.lang.Object controller,
java.lang.Exception cause)
- Specified by:
viewBindFailed in interface BindMonitor
viewValueBound
public void viewValueBound(java.lang.String name,
java.lang.Object value,
java.lang.Object controller)
- Specified by:
viewValueBound in interface BindMonitor
controllerBindFailed
public void controllerBindFailed(java.lang.Object controller,
BindErrorMessage errorMessage,
java.lang.Exception cause)
- Specified by:
controllerBindFailed in interface BindMonitor
controllerValueBound
public void controllerValueBound(java.lang.String name,
java.lang.Object value,
java.lang.Object controller)
- Specified by:
controllerValueBound in interface BindMonitor
registrarCreated
public void registrarCreated(Registrar registrar,
RegistrarMonitor registrarMonitor)
- Specified by:
registrarCreated in interface ContextMonitor
registrarNotFound
public void registrarNotFound(java.lang.String registrarClassName)
- Specified by:
registrarNotFound in interface ContextMonitor
contextInitialized
public void contextInitialized()
- Specified by:
contextInitialized in interface ContextMonitor
contextInitializationFailed
public void contextInitializationFailed(WaffleException cause)
- Specified by:
contextInitializationFailed in interface ContextMonitor
applicationContextContainerStarted
public void applicationContextContainerStarted()
- Specified by:
applicationContextContainerStarted in interface ContextMonitor
applicationContextContainerDestroyed
public void applicationContextContainerDestroyed()
- Specified by:
applicationContextContainerDestroyed in interface ContextMonitor
sessionContextContainerCreated
public void sessionContextContainerCreated(ContextContainer applicationContextContainer)
- Specified by:
sessionContextContainerCreated in interface ContextMonitor
requestContextContainerCreated
public void requestContextContainerCreated(ContextContainer sessionContextContainer)
- Specified by:
requestContextContainerCreated in interface ContextMonitor
controllerNameResolved
public void controllerNameResolved(java.lang.String name,
java.lang.String path)
- Specified by:
controllerNameResolved in interface ControllerMonitor
controllerNotFound
public void controllerNotFound(java.lang.String name)
- Specified by:
controllerNotFound in interface ControllerMonitor
methodDefinitionNotFound
public void methodDefinitionNotFound(java.lang.String controllerName)
- Specified by:
methodDefinitionNotFound in interface ControllerMonitor
requestContextContainerNotFound
public void requestContextContainerNotFound()
- Specified by:
requestContextContainerNotFound in interface ControllerMonitor
componentRegistered
public void componentRegistered(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object[] parameters)
- Specified by:
componentRegistered in interface RegistrarMonitor
instanceRegistered
public void instanceRegistered(java.lang.Object key,
java.lang.Object instance)
- Specified by:
instanceRegistered in interface RegistrarMonitor
nonCachingComponentRegistered
public void nonCachingComponentRegistered(java.lang.Object key,
java.lang.Class<?> type,
java.lang.Object[] parameters)
- Specified by:
nonCachingComponentRegistered in interface RegistrarMonitor
actionMethodInvocationFailed
public void actionMethodInvocationFailed(java.lang.Exception cause)
- Specified by:
actionMethodInvocationFailed in interface ServletMonitor
servletInitialized
public void servletInitialized(javax.servlet.Servlet servlet)
- Specified by:
servletInitialized in interface ServletMonitor
servletServiceFailed
public void servletServiceFailed(java.lang.Exception cause)
- Specified by:
servletServiceFailed in interface ServletMonitor
servletServiceRequested
public void servletServiceRequested(java.util.Map<java.lang.String,java.util.List<java.lang.String>> parameters)
- Specified by:
servletServiceRequested in interface ServletMonitor
controllerValidatorNotFound
public void controllerValidatorNotFound(java.lang.String controllerValidatorName,
java.lang.String controllerName)
- Specified by:
controllerValidatorNotFound in interface ValidationMonitor
methodDefinitionNotFound
public void methodDefinitionNotFound(ControllerDefinition controllerDefinition)
- Specified by:
methodDefinitionNotFound in interface ValidationMonitor
validationFailed
public void validationFailed(java.lang.Exception cause)
- Specified by:
validationFailed in interface ValidationMonitor
viewForwarded
public void viewForwarded(java.lang.String path)
- Specified by:
viewForwarded in interface ViewMonitor
viewRedirected
public void viewRedirected(RedirectView redirectView)
- Specified by:
viewRedirected in interface ViewMonitor
viewResponded
public void viewResponded(ResponderView responderView)
- Specified by:
viewResponded in interface ViewMonitor
Copyright © 2008. All Rights Reserved.