Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Created on Jul 13, 2010, 4:49:22 PM
 
 package com.dmurph.mvc.monitor;
 
Prints out all events before they dispatch to std out.

Author(s):
Daniel Murphy
public class DebugMonitor implements IGlobalEventMonitor {
	public DebugMonitor(){
		this(null);
	}
	public DebugMonitor(IGlobalEventMonitor argMonitor){
		 = argMonitor;
	}
	public void afterDispatch(MVCEvent argEvent) {
		if( != null){
		}
	}

	public void beforeDispatch(MVCEvent argEvent) {
		if( != null){
		}
		if(argEvent instanceof ObjectEvent<?>){
			..println(I18n.getText("monitor.dispatchingValue"argEvent.key, ((ObjectEvent<?>) argEvent).getValue().toString()));
		}else{
			..println(I18n.getText("monitor.dispatching"argEvent.key));
		}
	}

	public void noListeners(MVCEvent argEvent) {
		if( != null){
		}
	}
	public void exceptionThrown(MVCEvent argEventException argException) {
		if( != null){
			.exceptionThrown(argEventargException);
		}
	}
New to GrepCode? Check out our FAQ X