com.sri.emo.wizard.defaults
Class Log4jWizMonitor

java.lang.Object
  extended by com.sri.emo.wizard.defaults.Log4jWizMonitor
All Implemented Interfaces:
WizardMonitor, Externalizable, Serializable

public class Log4jWizMonitor
extends Object
implements WizardMonitor, Externalizable

Default implementation that logs to Log4j Logger when the various events are invoked.

Author:
Michael Rimov
See Also:
Serialized Form

Constructor Summary
Log4jWizMonitor()
           
 
Method Summary
 boolean equals(Object parm1)
          Override of equals.
 int hashCode()
          Since all log4j wizard monitors are equal, hash the class.
 void onBack(WizardPage src)
          Logs with debug priority the source event toString().
 void onCancel(WizardPage src)
          Logs with info priority the source event toString().
 void onEnterPage(WizardPage src)
          Logs with debug priority the source event toString().
 void onError(WizardPage src, Throwable error)
          Logs with error priority the source event toString() and the exception.
 void onFinish(WizardPage src)
          Logs with debug priority the source event toString().
 void onForward(WizardPage src)
          Logs with debug priority the source event toString().
 void readExternal(ObjectInput in)
          Nothing to read.
 String toString()
          Override of toString();
 void writeExternal(ObjectOutput out)
          Nothing to write.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Log4jWizMonitor

public Log4jWizMonitor()
Method Detail

onEnterPage

public void onEnterPage(WizardPage src)
Logs with debug priority the source event toString().

Debugging event for when a page is fired.

Specified by:
onEnterPage in interface WizardMonitor
Parameters:
src - the Wizard Page that is the source of the event.

onForward

public void onForward(WizardPage src)
Logs with debug priority the source event toString().

Fired when forward id pressed on a wizard page.

Specified by:
onForward in interface WizardMonitor
Parameters:
src - the Wizard Page that is the source of the event.

onBack

public void onBack(WizardPage src)
Logs with debug priority the source event toString().

Fired when back id is pressed on a wizard page.

Specified by:
onBack in interface WizardMonitor
Parameters:
src - the Wizard Page that is the source of the event.

onFinish

public void onFinish(WizardPage src)
Logs with debug priority the source event toString().

Fired when the finish button is pressed on a wizard page.

Specified by:
onFinish in interface WizardMonitor
Parameters:
src - the Wizard Page that is the source of the event.

onCancel

public void onCancel(WizardPage src)
Logs with info priority the source event toString().

Fired when the cancel button is pressed on a wizard page.

Specified by:
onCancel in interface WizardMonitor
Parameters:
src - the Wizard Page that is the source of the event.

onError

public void onError(WizardPage src,
                    Throwable error)
Logs with error priority the source event toString() and the exception.

Fired when an error occurs while processing the wizard page.

Specified by:
onError in interface WizardMonitor
Parameters:
src - the Wizard Page that is the source of the event.
error - the Exception thrown while processing the wizard.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Nothing to write.

Specified by:
writeExternal in interface Externalizable
Parameters:
out - the object output stream.
Throws:
IOException - upon error.

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Nothing to read.

Specified by:
readExternal in interface Externalizable
Parameters:
in - the object input stream.
Throws:
IOException - when the class cannot be read from the stream.
ClassNotFoundException - when the class cannot be found.

equals

public boolean equals(Object parm1)
Override of equals.

Overrides:
equals in class Object
Parameters:
parm1 - the other object.
Returns:
true if they're equal

toString

public String toString()
Override of toString();

Overrides:
toString in class Object
Returns:
java.lang.String

hashCode

public int hashCode()
Since all log4j wizard monitors are equal, hash the class.

Overrides:
hashCode in class Object
Returns:
integer


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.