org.apache.commons.latka.event
Class LatkaEventPublisher

java.lang.Object
  extended by org.apache.commons.latka.event.LatkaEventPublisher
All Implemented Interfaces:
LatkaEventListener

public class LatkaEventPublisher
extends Object
implements LatkaEventListener

A LatkaEventListener that publishes the incoming events to other listeners

Version:
$Id: LatkaEventPublisher.java 155424 2005-02-26 13:09:29Z dirkv $
Author:
Morgan Delagrange, dIon Gillard

Field Summary
protected  List _list
          the listeners to publish events to
 
Constructor Summary
LatkaEventPublisher()
           
 
Method Summary
 void addListener(LatkaEventListener listener)
          add a LatkaEventListener to the list of publishees.
 void broadcastEvent(LatkaEvent event)
          Send the provided event object to all registered listeners
protected  void broadcastEvent(LatkaEvent event, LatkaEventListener listener)
          Send the provided event to the provided listener
 void reportMessage(ReportMessageEvent event)
          send the supplied event to all listeners
 void requestError(RequestEvent event)
          send the supplied event to all listeners
 void requestFailed(RequestEvent event)
          send the supplied event to all listeners
 void requestSkipped(RequestEvent event)
          send the supplied event to all listeners
 void requestSucceeded(RequestEvent event)
          send the supplied event to all listeners
 void suiteCompleted(SuiteEvent event)
          send the supplied event to all listeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_list

protected List _list
the listeners to publish events to

Constructor Detail

LatkaEventPublisher

public LatkaEventPublisher()
Method Detail

addListener

public void addListener(LatkaEventListener listener)
add a LatkaEventListener to the list of publishees.

Parameters:
listener - a LatkaEventListener

broadcastEvent

public void broadcastEvent(LatkaEvent event)
Send the provided event object to all registered listeners

Parameters:
event - an event to be sent

broadcastEvent

protected void broadcastEvent(LatkaEvent event,
                              LatkaEventListener listener)
Send the provided event to the provided listener

Parameters:
event - an event to be sent
listener - the listener to send it to

requestSucceeded

public void requestSucceeded(RequestEvent event)
send the supplied event to all listeners

Specified by:
requestSucceeded in interface LatkaEventListener
Parameters:
event - an event to be broadcast

requestFailed

public void requestFailed(RequestEvent event)
send the supplied event to all listeners

Specified by:
requestFailed in interface LatkaEventListener
Parameters:
event - an event to be broadcast

requestSkipped

public void requestSkipped(RequestEvent event)
send the supplied event to all listeners

Specified by:
requestSkipped in interface LatkaEventListener
Parameters:
event - an event to be broadcast

requestError

public void requestError(RequestEvent event)
send the supplied event to all listeners

Specified by:
requestError in interface LatkaEventListener
Parameters:
event - an event to be broadcast

reportMessage

public void reportMessage(ReportMessageEvent event)
send the supplied event to all listeners

Specified by:
reportMessage in interface LatkaEventListener
Parameters:
event - a message event to be broadcast

suiteCompleted

public void suiteCompleted(SuiteEvent event)
send the supplied event to all listeners

Specified by:
suiteCompleted in interface LatkaEventListener
Parameters:
event - an event to be broadcast


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.