net.sf.doolin.bus.support
Class SysOutBusLog

java.lang.Object
  extended by net.sf.doolin.bus.support.AbstractTextBusLog
      extended by net.sf.doolin.bus.support.SysOutBusLog
All Implemented Interfaces:
BusLog

public class SysOutBusLog
extends AbstractTextBusLog

This BusLog logs all bus messages on the Standard Output. Any bus error message is associated with its stack trace.

Author:
Damien Coraboeuf
See Also:
System.out

Constructor Summary
SysOutBusLog()
           
 
Method Summary
protected  void log(String text)
          Actually logs the text message.
<M> void
messageWithError(M message, Subscriber<M> subscriber, Exception ex)
          This method is called when the processing of a message by a subscriber has resulted in an error.
 
Methods inherited from class net.sf.doolin.bus.support.AbstractTextBusLog
messageAccepted, messageNoSubscription, messageReceived, registrationOk, unregistration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SysOutBusLog

public SysOutBusLog()
Method Detail

log

protected void log(String text)
Description copied from class: AbstractTextBusLog
Actually logs the text message.

Specified by:
log in class AbstractTextBusLog
Parameters:
text - Text to log

messageWithError

public <M> void messageWithError(M message,
                                 Subscriber<M> subscriber,
                                 Exception ex)
Description copied from interface: BusLog
This method is called when the processing of a message by a subscriber has resulted in an error.

Specified by:
messageWithError in interface BusLog
Overrides:
messageWithError in class AbstractTextBusLog
Type Parameters:
M - Type of the message
Parameters:
message - Received message
subscriber - Subscriber which handled the message
ex - Resulting error


Copyright © 2011. All Rights Reserved.