Sun Java System Portal Server 7 2005Q4 Release Note Supplement

Overview

This API uses event generation and notification to convey the information/data among portlets. The event notification will be for the portlets which have registered themselves for listening to that particular event. Portlets interested in receiving an event will implement a single interface PortletEventListener.

The EventRequest interface can then be used to obtain the event name and event payload data. Event payload data can be obtained either by getting the event stream and reading from it or by calling getEventData() method which returns an Object and then casting it appropriately.

The EventResponse interface can then be used to set the render parameters so that the information can be passed on to the render method after processing the event received in handleEvent() method. The portlets can generate events only from within the handleEvent() or processAction() methods. Event can be generated by instantiating PortletEventBroker and calling createEvent() method on it.