lejos.pc.comm
Class NXTCommLoggable

java.lang.Object
  extended by lejos.pc.comm.NXTCommLoggable
Direct Known Subclasses:
NXJLinkAndUpload, NXTConnector, Upload

public abstract class NXTCommLoggable
extends java.lang.Object

Abstract class that allows inheriting class to register and use log listeners.

Author:
Lawrie Griffiths and Matthias Paul Scholz

Field Summary
protected  java.util.ArrayList<NXTCommLogListener> fLogListeners
           
 
Constructor Summary
NXTCommLoggable()
           
 
Method Summary
 void addLogListener(NXTCommLogListener listener)
          register log listener
protected  void log(java.lang.String s)
          Log a message to all the log listeners
protected  void log(java.lang.Throwable t)
          Log an exception to all the log listeners
 void removeLogListener(NXTCommLogListener listener)
          unregister log listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fLogListeners

protected java.util.ArrayList<NXTCommLogListener> fLogListeners
Constructor Detail

NXTCommLoggable

public NXTCommLoggable()
Method Detail

addLogListener

public void addLogListener(NXTCommLogListener listener)
register log listener

Parameters:
listener - the log listener

removeLogListener

public void removeLogListener(NXTCommLogListener listener)
unregister log listener

Parameters:
listener - the log listener

log

protected void log(java.lang.Throwable t)
Log an exception to all the log listeners

Parameters:
t - a Throwable

log

protected void log(java.lang.String s)
Log a message to all the log listeners

Parameters:
s - the message