org.barracudamvc.core.event
Interface BaseEventListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AbstractPage, BlockIterateHandler, BTemplateViewHandler, DataObjectDeleteHandler, DataObjectHandler, DataObjectNewHandler, DataObjectSaveHandler, DataObjectViewHandler, DefaultBaseEventListener, DefaultViewHandler, DummyPageHandler, ModifyDomViewHandler, PageEventListener, RenderPageHandler, XmlFormViewHandler

public interface BaseEventListener
extends EventListener

This class defines the methods for Event listeners


Method Summary
 String getListenerID()
          Get the ID that identifies this listener.
 void handleEvent(EventContext context)
          Handle all events.
 boolean isHandled()
          Return true if the event was handled in the handleEvent method.
 

Method Detail

handleEvent

void handleEvent(EventContext context)
                 throws EventException
Handle all events. This represents a default implementation that will route the event on to the convenience respective convenience methods. Notice that we get servlet response and request information from the queue state. This means that if you use a custom event broker, it needs to set this information in the queue.

Parameters:
context - the event context containing event, queue, and, sometimes, http information
Throws:
EventException

isHandled

boolean isHandled()
Return true if the event was handled in the handleEvent method. By default, most implementations will return true for you, so the only time you'd need to override is if the handler wanted to specifically indicate that it had NOT handled the event (ie in logging scenarios).

Returns:
true if the event was handled in the handleEvent method

getListenerID

String getListenerID()
Get the ID that identifies this listener. This will typically be the class name.

Returns:
a string that uniquely identifies this listener


Copyright © 2006 BarracudaMVC.org All Rights Reserved.