JBoss Community Archive (Read Only)

Portlet Bridge 3.3

Receive Event

Portlet Configuration

For a portlet to receive an event, it needs to specify the following within portlet.xml within its' <portlet> section:


The portlet also needs to specify that it is able to receive an event from the portal by adding the below to portlet.xml within its' <portlet> section:

  <qname xmlns:jbp="urn:jboss:portal:samples:event">jbp:BookingEvent</qname>

As when defining the portlet that can publish an event, the portlet that can receive that event needs to define the link between the qname and event type. The identical <event-definition> specified in Send Event can be used.

Event Handler

To process the Event within a portlet a handler, that was defined within portlet.xml as seen earlier, needs to be created with content similar to the following:

public class BookingEventHandler implements BridgeEventHandler {
  public EventNavigationResult handleEvent(FacesContext context, Event event) {
    // Process event payload as appropriate
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:28:52 UTC, last content change 2012-07-31 21:00:15 UTC.