UIX 2.2.16

oracle.cabo.servlet.event
Class CompoundEventHandler

java.lang.Object
  |
  +--oracle.cabo.servlet.event.CompoundEventHandler
All Implemented Interfaces:
EventHandler

public final class CompoundEventHandler
extends java.lang.Object
implements EventHandler

The CompoundEventHandler chains together a array of event handlers, until event result causes a page navigation.


Constructor Summary
CompoundEventHandler()
          Creates a new CompoundEventHandler.
 
Method Summary
 EventResult handleEvent(BajaContext context, Page page, PageEvent event)
          Handle an event.
 void setHandlers(EventHandler[] handlers)
          Sets the array of event handlers to compound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundEventHandler

public CompoundEventHandler()
Creates a new CompoundEventHandler.
Method Detail

setHandlers

public void setHandlers(EventHandler[] handlers)
Sets the array of event handlers to compound.

handleEvent

public EventResult handleEvent(BajaContext context,
                               Page page,
                               PageEvent event)
                        throws java.lang.Throwable
Description copied from interface: EventHandler
Handle an event. Clients return an EventResult object that encapsulates the resulsts. If handleEvent() returns null, the PageBroker will simply redisplay the same page. Otherwise, the result will be passed to the PageFlowEngine to determine the Page to render.

Note: while the Page object is mutable, any calls that set properties, etc., will be ignored unless the Page is itself returned inside the EventResult.

Specified by:
handleEvent in interface EventHandler
Following copied from interface: oracle.cabo.servlet.event.EventHandler
Parameters:
context - the BajaContext
page - the page the client is requesting
event - the event on that page, or null if the client is just requesting a page display
Returns:
an object encapsulating results of this event
Throws:
java.lang.Throwable - if any processing of the event fails

UIX 2.2.16