Author: julien(a)jboss.com
Date: 2008-02-28 19:27:43 -0500 (Thu, 28 Feb 2008)
New Revision: 10157
Added:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventProduction.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/AbstractEventControllerContext.java
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventPhaseSessionImpl.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/PortletRequestHandler.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/Event.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventControllerContext.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventPhaseSession.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/event/EventControllerContextImpl.java
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/EventControllerContextSupport.java
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/PortletControllerTestCase.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PageEventControllerContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java
Log:
rework a bit the event controller context
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventPhaseSessionImpl.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventPhaseSessionImpl.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventPhaseSessionImpl.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -37,50 +37,52 @@
{
/** . */
- private final Logger log;
+ static final int READ_MODE = 0;
/** . */
- LinkedList<Event> producedEventHistory;
+ static final int READ_WRITE_MODE = 1;
/** . */
- LinkedList<Event> consumedEventHistory;
+ static final int INTERRUPTED_MODE = 2;
/** . */
- LinkedList<Event> producedEvents;
+ private final Logger log;
/** . */
+ LinkedList<EventProduction> producedEvents;
+
+ /** . */
LinkedList<Event> toConsumeEvents;
/** . */
- boolean interruped;
+ int consumedEventSize;
+ /** . */
+ int producedEventSize;
+
+ /** . */
+ int mode;
+
EventPhaseSessionImpl(Logger log)
{
this.log = log;
- this.producedEventHistory = new LinkedList<Event>();
- this.consumedEventHistory = new LinkedList<Event>();
- this.producedEvents = new LinkedList<Event>();
+ this.producedEvents = new LinkedList<EventProduction>();
this.toConsumeEvents = new LinkedList<Event>();
- this.interruped = false;
+ this.consumedEventSize = 0;
+ this.producedEventSize = 0;
+ this.mode = READ_MODE;
}
- public Iterator<Event> browseProducedEventHistory()
- {
- return this.producedEventHistory.iterator();
- }
-
-
- public Iterator<Event> browseConsumedEventHistory()
- {
- return this.consumedEventHistory.iterator();
- }
-
public void queueEvent(Event event)
{
- if (interruped)
+ if (mode == INTERRUPTED_MODE)
{
- throw new IllegalStateException("The event phase is interruped");
+ throw new IllegalStateException("The event phase cannot queue events
because it is interruped");
}
+ if (mode == READ_MODE)
+ {
+ throw new IllegalStateException("The event phase cannot queue
events");
+ }
if (event == null)
{
throw new IllegalArgumentException("No null event accepted");
@@ -95,9 +97,15 @@
public void interrupt()
{
+ if (mode == READ_MODE)
+ {
+ throw new IllegalStateException("The event phase is not
interruptable");
+ }
+
+ //
log.trace("Event delivery interruped");
//
- this.interruped = true;
+ this.mode = INTERRUPTED_MODE;
}
}
Added:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventProduction.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventProduction.java
(rev 0)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/EventProduction.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -0,0 +1,55 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.controller;
+
+import org.jboss.portal.portlet.controller.event.Event;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+class EventProduction
+{
+
+ /** . */
+ private final Event consumedEvent;
+
+ /** . */
+ private final Event producedEvent;
+
+ EventProduction(Event consumedEvent, Event producedEvent)
+ {
+ this.consumedEvent = consumedEvent;
+ this.producedEvent = producedEvent;
+ }
+
+ public Event getConsumedEvent()
+ {
+ return consumedEvent;
+ }
+
+ public Event getProducedEvent()
+ {
+ return producedEvent;
+ }
+}
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/PortletRequestHandler.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/PortletRequestHandler.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/PortletRequestHandler.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -111,7 +111,8 @@
// Feed session it with the events that may have been produced
for (UpdateNavigationalStateResponse.Event portletEvent :
stateResponse.getEvents())
{
- session.producedEvents.add(new Event(portletEvent.getName(),
portletEvent.getPayload(), portletRequest.getWindowId()));
+ Event producedEvent = new Event(portletEvent.getName(),
portletEvent.getPayload(), portletRequest.getWindowId());
+ session.producedEvents.add(new EventProduction(null, producedEvent));
}
//
@@ -120,7 +121,8 @@
// Deliver events
while (session.producedEvents.size() > 0)
{
- Event producedEvent = session.producedEvents.removeFirst();
+ EventProduction eventProduction = session.producedEvents.removeFirst();
+ Event producedEvent = eventProduction.getProducedEvent();
//
String producerId = producedEvent.getWindowId();
@@ -147,7 +149,7 @@
int producedEventThreshold = controller.getProducedEventThreshold();
if (producedEventThreshold >= 0)
{
- if (session.producedEventHistory.size() + 1 > producedEventThreshold)
+ if (session.producedEventSize + 1 > producedEventThreshold)
{
log.trace("Event distribution interrupted because the maximum
number of produced event is reached");
eventDistributionStatus = PortletResponse.PRODUCED_EVENT_FLOODED;
@@ -158,7 +160,8 @@
// Give control to the event context
try
{
- eventCC.handleEvent(session, producedEvent);
+ session.mode = EventPhaseSessionImpl.READ_WRITE_MODE;
+ eventCC.eventProduced(session, eventProduction.getConsumedEvent(),
producedEvent);
}
catch (Exception e)
{
@@ -168,7 +171,7 @@
}
// Perform flow control
- if (session.interruped)
+ if (session.mode == EventPhaseSessionImpl.INTERRUPTED_MODE)
{
log.trace("Event distribution interrupted by controller
context");
eventDistributionStatus = PortletResponse.INTERRUPTED;
@@ -185,8 +188,6 @@
//
PortletInfo consumerPortletInfo = context.getPortletInfo(consumedId);
-
- //
if (consumerPortletInfo == null)
{
if (log.isTraceEnabled())
@@ -213,7 +214,7 @@
int consumedEventThreshold = controller.getConsumedEventThreshold();
if (consumedEventThreshold >= 0)
{
- if (session.consumedEventHistory.size() + 1 >
consumedEventThreshold)
+ if (session.consumedEventSize + 1 > consumedEventThreshold)
{
log.trace("Event distribution interrupted because the maximum
number of consumed event is reached");
eventDistributionStatus = PortletResponse.CONSUMED_EVENT_FLOODED;
@@ -225,8 +226,19 @@
PortletInvocationResponse eventResponse = deliverEvent(context,
toConsumeEvent, pageNavigationalState, requestProperties.getCookies());
// Now it is consumed we add it to the history
- session.consumedEventHistory.addFirst(toConsumeEvent);
+ session.consumedEventSize++;
+ // And we make a callback
+ try
+ {
+ session.mode = EventPhaseSessionImpl.READ_MODE;
+ eventCC.eventConsumed(session, producedEvent, toConsumeEvent);
+ }
+ catch (Exception e)
+ {
+ log.trace("Event consumed callback threw an exception that is
ignored by the controller", e);
+ }
+
//
if (eventResponse instanceof UpdateNavigationalStateResponse)
{
@@ -238,7 +250,8 @@
// Add events to source event queue
for (UpdateNavigationalStateResponse.Event portletEvent :
eventStateResponse.getEvents())
{
- session.producedEvents.add(new Event(portletEvent.getName(),
portletEvent.getPayload(), toConsumeEvent.getWindowId()));
+ Event blah = new Event(portletEvent.getName(),
portletEvent.getPayload(), toConsumeEvent.getWindowId());
+ session.producedEvents.add(new EventProduction(toConsumeEvent,
blah));
}
//
@@ -259,7 +272,7 @@
}
// We archive the consumed event in the history
- session.producedEventHistory.addFirst(producedEvent);
+ session.producedEventSize++;
}
//
Added:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/AbstractEventControllerContext.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/AbstractEventControllerContext.java
(rev 0)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/AbstractEventControllerContext.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.controller.event;
+
+/**
+ * An implementation of the event controller context that do no ops.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class AbstractEventControllerContext implements EventControllerContext
+{
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
+ {
+ }
+
+ public void eventConsumed(EventPhaseSession session, Event sourceEvent, Event
consumedEvent)
+ {
+ }
+}
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/Event.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/Event.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/Event.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -24,6 +24,7 @@
import javax.xml.namespace.QName;
import java.io.Serializable;
+import java.util.concurrent.atomic.AtomicLong;
/**
* An event associated with a portlet window.
@@ -34,6 +35,8 @@
public class Event
{
+ private static final AtomicLong generator = new AtomicLong();
+
/** . */
private final QName name;
@@ -43,6 +46,9 @@
/** . */
private final String windowId;
+ /** . */
+ private final long serialNumber = generator.incrementAndGet();
+
public Event(QName name, Serializable payload, String windowId)
{
if (name == null)
@@ -73,8 +79,13 @@
return windowId;
}
+ public long getSerialNumber()
+ {
+ return serialNumber;
+ }
+
public String toString()
{
- return "Event[name=" + name + ",windowId=" + windowId +
",payload=" + payload + "]";
+ return "Event[name=" + name + ",windowId=" + windowId +
",payload=" + payload + ",serialNumber=" + serialNumber +
"]";
}
}
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventControllerContext.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventControllerContext.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventControllerContext.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -44,8 +44,26 @@
* to the portlet controller invoker.</p>
*
* @param session the session
+ * @param sourceEvent the source event
* @param producedEvent the produced event
*/
- void handleEvent(EventPhaseSession session, Event producedEvent);
+ 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);
+
}
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventPhaseSession.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventPhaseSession.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/event/EventPhaseSession.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.portlet.controller.event;
-import java.util.Iterator;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
@@ -32,33 +30,19 @@
{
/**
- * Returns an iterator for browsing the history of the produced events.
- * The iterator returns the produced events from the most recent to the oldest.
- *
- * @return all the events produced during the session
- */
- Iterator<Event> browseProducedEventHistory();
-
- /**
- * Returns an iterator for browsing the history of the consumed events.
- * The iterator returns the consumed events from the most recent to the oldest.
- *
- * @return all the events consumed during the session
- */
- Iterator<Event> browseConsumedEventHistory();
-
- /**
* 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 the event phase is interrupted
+ * @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();
+ void interrupt() throws IllegalStateException;
}
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/event/EventControllerContextImpl.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/event/EventControllerContextImpl.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/impl/event/EventControllerContextImpl.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -45,7 +45,7 @@
this.invoker = invoker;
}
- public void handleEvent(EventPhaseSession session, Event producedEvent)
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
{
try
{
@@ -54,8 +54,8 @@
PortletInfo portletInfo = portlet.getInfo();
if
(portletInfo.getEventing().getConsumedEvents().containsKey(producedEvent.getName()))
{
- Event consumedEvent = new Event(producedEvent.getName(),
producedEvent.getPayload(), portlet.getContext().getId());
- session.queueEvent(consumedEvent);
+ Event distributedEvent = new Event(producedEvent.getName(),
producedEvent.getPayload(), portlet.getContext().getId());
+ session.queueEvent(distributedEvent);
}
}
}
@@ -65,4 +65,8 @@
session.interrupt();
}
}
+
+ public void eventConsumed(EventPhaseSession session, Event sourceEvent, Event
consumedEvent)
+ {
+ }
}
Modified:
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/EventControllerContextSupport.java
===================================================================
---
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/EventControllerContextSupport.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/EventControllerContextSupport.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -42,7 +42,7 @@
/** . */
private final Map<Point, List<Point>> wires = new HashMap<Point,
List<Point>>();
- public void handleEvent(EventPhaseSession session, Event producedEvent)
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
{
List<Point> dsts = wires.get(new Point(producedEvent.getName(),
producedEvent.getWindowId()));
@@ -56,6 +56,10 @@
}
}
+ public void eventConsumed(EventPhaseSession session, Event sourceEvent, Event
consumedEvent)
+ {
+ }
+
public void createWire(QName srcName, String srcWindowId, QName dstName, String
dstWindowId)
{
Point src = new Point(srcName, srcWindowId);
Modified:
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/PortletControllerTestCase.java
===================================================================
---
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/PortletControllerTestCase.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/controller/src/test/java/org/jboss/portal/portlet/controller/PortletControllerTestCase.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -29,9 +29,9 @@
import org.jboss.portal.portlet.controller.response.ControllerResponse;
import org.jboss.portal.portlet.controller.response.PageUpdateResponse;
import org.jboss.portal.portlet.controller.response.PortletResponse;
-import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.event.EventPhaseSession;
import org.jboss.portal.portlet.controller.event.Event;
+import org.jboss.portal.portlet.controller.event.AbstractEventControllerContext;
import org.jboss.portal.portlet.OpaqueStateString;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.support.PortletSupport;
@@ -310,9 +310,9 @@
//
controller.setConsumedEventThreshold(10);
controller.setProducedEventThreshold(10);
- context.setEventControllerContext(new EventControllerContext()
+ context.setEventControllerContext(new AbstractEventControllerContext()
{
- public void handleEvent(EventPhaseSession session, Event producedEvent)
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
{
session.interrupt();
}
@@ -348,9 +348,9 @@
//
controller.setConsumedEventThreshold(10);
controller.setProducedEventThreshold(10);
- context.setEventControllerContext(new EventControllerContext()
+ context.setEventControllerContext(new AbstractEventControllerContext()
{
- public void handleEvent(EventPhaseSession session, Event producedEvent)
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
{
throw new RuntimeException();
}
@@ -362,9 +362,9 @@
//
final Error error = new Error();
- context.setEventControllerContext(new EventControllerContext()
+ context.setEventControllerContext(new AbstractEventControllerContext()
{
- public void handleEvent(EventPhaseSession session, Event producedEvent)
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
{
throw error;
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PageEventControllerContext.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PageEventControllerContext.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PageEventControllerContext.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -29,9 +29,6 @@
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.info.PortletInfo;
-import java.util.List;
-import java.util.ArrayList;
-
/**
* Route events according to the portlets discovered on the page. For now it is pretty
trivial.
* We could leverage JSP tags to 'wire' portlets on the same page for instance.
@@ -56,7 +53,7 @@
this.prepareResponse = prepareResponse;
}
- public void handleEvent(EventPhaseSession session, Event producedEvent)
+ public void eventProduced(EventPhaseSession session, Event sourceEvent, Event
producedEvent)
{
for (String windowId : prepareResponse.getWindowIds())
{
@@ -72,17 +69,20 @@
//
if
(portletInfo.getEventing().getConsumedEvents().containsKey(producedEvent.getName()))
{
- session.queueEvent(new Event(producedEvent.getName(),
producedEvent.getPayload(), windowId));
+ Event distributedEvent = new Event(producedEvent.getName(),
producedEvent.getPayload(), windowId);
+ session.queueEvent(distributedEvent);
}
}
}
catch (PortletInvokerException e)
{
e.printStackTrace();
-
- //
session.interrupt();
}
}
}
+
+ public void eventConsumed(EventPhaseSession session, Event sourceEvent, Event
consumedEvent)
+ {
+ }
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java 2008-02-28
14:45:26 UTC (rev 10156)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/PagePortletControllerContext.java 2008-02-29
00:27:43 UTC (rev 10157)
@@ -26,7 +26,6 @@
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.PortletInvoker;
import org.jboss.portal.portlet.info.PortletInfo;
-import org.jboss.portal.portlet.controller.event.EventControllerContext;
import org.jboss.portal.portlet.controller.state.StateControllerContext;
import org.jboss.portal.portlet.controller.state.PageNavigationalState;
import org.jboss.portal.portlet.controller.state.PageNavigationalStateSerialization;
@@ -53,7 +52,7 @@
{
/** . */
- private final EventControllerContext eventControllerContext;
+ private final PageEventControllerContext eventControllerContext;
/** . */
private final StateControllerContext stateControllerContext;
@@ -118,7 +117,7 @@
return invoker.invoke(invocation);
}
- public EventControllerContext getEventControllerContext()
+ public PageEventControllerContext getEventControllerContext()
{
return eventControllerContext;
}