7.3. MessageEvent

This object is sent to registered MessageListeners by the portlet container when a portlet executes the send method of the PortletContext object. There are two important methods available in this object

  • getMessage: returns the message object sent with this event. Since this method returns a PortletMessage, the result must be cast to the appropriate type as illustrated in Example 7-1.

  • getRequest: returns the current PortletRequest. The request can be used to access the PortletSession object or to store data to be used in the doView method.

Get IBM Rational Application Developer V6 Portlet Application Development and Portal Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.