This content has been marked as final.
Show 5 replies
-
1. Re: Event debugger
julien1 Feb 28, 2008 7:21 PM (in response to julien1)here are the relevant methods of the event controller context
/** * <p>Give control to the context when an event is produced. The session * argument gives to the context the capability to queue events in response * of the produced event or to interrupt the session. It has also access * to the full history of distributed events in order to provide advanced * implementation of event cycle detection.</p> * * <p>During the invocation of this method, any runtime exception thrown will signal * a failure and the produced event will be discarded although the event * distribution will continue.</p> * * <p>During the invocation of this method, any error thrown will be propagated * to the portlet controller invoker.</p> * * @param session the session * @param sourceEvent the source event * @param producedEvent the produced event */ void eventProduced(EventPhaseSession session, Event sourceEvent, Event producedEvent); /** * <p>Signal to the context when an event is consumed by a portlet. The session argument * only provides querying capabilities and it is not possible to queue event * or interrupt the session.</p> * * <p>During the invocation of this method, any runtime exception thrown will * be ignored by the controller.</p> * * <p>During the invocation of this method, any error thrown will be propagated * to the portlet controller invoker.</p> * * @param session the session * @param sourceEvent the source event * @param consumedEvent the consumed event */ void eventConsumed(EventPhaseSession session, Event sourceEvent, Event consumedEvent);
the first method is used to route an produced event to create events in reaction.
the second method is more an acknowledgement method that say that en event was consumed.
I plan to add other callbacks for ignored events or failures. -
2. Re: Event debugger
julien1 Feb 28, 2008 7:23 PM (in response to julien1)Here is the EventPhaseSession interface:
public interface EventPhaseSession { /** * Queue an event for consumption. The queue is a FIFO queue. * * @param event an event * @throws IllegalArgumentException if the event is null * @throws IllegalStateException if an event cannot be published */ void queueEvent(Event event) throws IllegalArgumentException, IllegalStateException; /** * Stop processing of all events and returns from the controller. * * @throws IllegalStateException if the session cannot be interrupted. */ void interrupt() throws IllegalStateException; }
It is usable really only during the routing phase and the event controller context can use it to queue events.
the interrupt method is used by the controller context can be used to interrupt the event phase (for instance a portal logout event could do that). -
3. Re: Event debugger
wesleyhales Feb 29, 2008 8:17 AM (in response to julien1)I have a working demo for the debugger, how do you propose that I get the debugging data (i.e. portlet id, event param, etc) to the ui?
-
4. Re: Event debugger
julien1 Feb 29, 2008 8:22 AM (in response to julien1)I propose to provide that data as a portlet request attribute during the render phase.
"wesleyhales" wrote:
I have a working demo for the debugger, how do you propose that I get the debugging data (i.e. portlet id, event param, etc) to the ui? -
5. Re: Event debugger
julien1 Feb 29, 2008 8:23 AM (in response to julien1)so it would be a portlet component inserted in a page.
"julien@jboss.com" wrote:
I propose to provide that data as a portlet request attribute during the render phase."wesleyhales" wrote:
I have a working demo for the debugger, how do you propose that I get the debugging data (i.e. portlet id, event param, etc) to the ui?