hmi.elckerlyc.bridge
Class LoggingRealizerBridge

java.lang.Object
  extended by hmi.elckerlyc.bridge.LoggingRealizerBridge
All Implemented Interfaces:
RealizerBridge, BMLTPlanningListener, BMLExceptionListener, BMLFeedbackListener, BMLListener, BMLWarningListener

public class LoggingRealizerBridge
extends Object
implements RealizerBridge, BMLFeedbackListener, BMLExceptionListener, BMLWarningListener, BMLTPlanningListener

A LoggingRealizerBridge can be put between two bridges to log their communication. It logs feedback from its output bridge and logs BML requests from its input bridge. On construction, it is provided with a Elckerlyc.SchedulingClock; the timestamps from this clock are logged together with the requests.

Author:
welberge, reidsma

Field Summary
private  SchedulingClock clock
           
private  org.slf4j.Logger logger
           
private  RealizerBridge outputBridge
           
 
Constructor Summary
LoggingRealizerBridge(org.slf4j.Logger logger, RealizerBridge outBridge, SchedulingClock clock)
           
 
Method Summary
 void addListeners(BMLListener... listeners)
          Add some listeners to which BML Feedback will be sent
 void exception(BMLExceptionFeedback be)
           
 void performanceStart(BMLPerformanceStartFeedback psf)
           
 void performanceStop(BMLPerformanceStopFeedback psf)
           
 void performBML(String bmlString)
          Asks the realizer to perform a BML block.
 void planningFinished(BMLTPlanningFinishedFeedback pff)
           
 void planningStart(BMLTPlanningStartFeedback psf)
           
 void syncProgress(BMLSyncPointProgressFeedback spp)
           
 void warn(BMLWarningFeedback bw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private final org.slf4j.Logger logger

outputBridge

private final RealizerBridge outputBridge

clock

private final SchedulingClock clock
Constructor Detail

LoggingRealizerBridge

public LoggingRealizerBridge(org.slf4j.Logger logger,
                             RealizerBridge outBridge,
                             SchedulingClock clock)
Method Detail

performanceStop

public void performanceStop(BMLPerformanceStopFeedback psf)
Specified by:
performanceStop in interface BMLFeedbackListener

performanceStart

public void performanceStart(BMLPerformanceStartFeedback psf)
Specified by:
performanceStart in interface BMLFeedbackListener

syncProgress

public void syncProgress(BMLSyncPointProgressFeedback spp)
Specified by:
syncProgress in interface BMLFeedbackListener

exception

public void exception(BMLExceptionFeedback be)
Specified by:
exception in interface BMLExceptionListener

warn

public void warn(BMLWarningFeedback bw)
Specified by:
warn in interface BMLWarningListener

planningFinished

public void planningFinished(BMLTPlanningFinishedFeedback pff)
Specified by:
planningFinished in interface BMLTPlanningListener

planningStart

public void planningStart(BMLTPlanningStartFeedback psf)
Specified by:
planningStart in interface BMLTPlanningListener

addListeners

public void addListeners(BMLListener... listeners)
Description copied from interface: RealizerBridge
Add some listeners to which BML Feedback will be sent

Specified by:
addListeners in interface RealizerBridge

performBML

public void performBML(String bmlString)
Description copied from interface: RealizerBridge
Asks the realizer to perform a BML block. Non-blocking: this call will NOT block until the BML has been completely performed! It may block until the BML has been scheduled, though -- this is undetermined.

Specified by:
performBML in interface RealizerBridge