public class EventControllerContextImpl extends Object implements EventControllerContext
CONSUMED_EVENT_FLOODED, EVENT_CONSUMER_INFO_NOT_AVAILABLE, EVENT_CONSUMER_NOT_AVAILABLE, EVENT_PRODUCER_INFO_NOT_AVAILABLE, EVENT_PRODUCER_NOT_AVAILABLE, PORTLET_DOES_NOT_CONSUME_EVENT, PRODUCED_EVENT_FLOODED| Constructor and Description |
|---|
EventControllerContextImpl(org.gatein.pc.api.PortletInvoker invoker) |
| Modifier and Type | Method and Description |
|---|---|
void |
eventConsumed(EventPhaseContext context,
WindowEvent consumedEvent,
org.gatein.pc.api.invocation.response.PortletInvocationResponse consumerResponse)
Context call back when an event is consumed by a portlet.
|
void |
eventDiscarded(EventPhaseContext context,
WindowEvent discardedEvent,
int cause)
Context call back when an event is discarded by the controller for a specific reason.
|
void |
eventFailed(EventPhaseContext context,
WindowEvent failedEvent,
Throwable throwable)
Context call back when an event failed to be delivered because the invoker threw an exception.
|
Iterable<WindowEvent> |
eventProduced(EventPhaseContext context,
WindowEvent producedEvent,
WindowEvent sourceEvent)
Context call back when an event is produced.
|
public EventControllerContextImpl(org.gatein.pc.api.PortletInvoker invoker)
public Iterable<WindowEvent> eventProduced(EventPhaseContext context, WindowEvent producedEvent, WindowEvent sourceEvent)
EventControllerContextContext call back 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 phase by returning a null value. It has also access to the full history of distributed events in order to provide advanced implementation of event cycle detection.
The method can translate produced event to event to consume by returning an serie of events. When the context wants to interrupt the phase it should return the null value instead of an iterable.
During the invocation of this method, any error thrown will be propagated to the portlet controller invoker.
eventProduced in interface EventControllerContextcontext - the sessionproducedEvent - the produced eventsourceEvent - the source eventpublic void eventConsumed(EventPhaseContext context, WindowEvent consumedEvent, org.gatein.pc.api.invocation.response.PortletInvocationResponse consumerResponse)
EventControllerContextContext call back 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.
During the invocation of this method, any runtime exception thrown will be ignored by the controller.
During the invocation of this method, any error thrown will be propagated to the portlet controller invoker.
eventConsumed in interface EventControllerContextcontext - the sessionconsumedEvent - the consumed eventconsumerResponse - the consumer responsepublic void eventFailed(EventPhaseContext context, WindowEvent failedEvent, Throwable throwable)
EventControllerContextContext call back when an event failed to be delivered because the invoker threw an exception. The session argument only provides querying capabilities and it is not possible to queue event or interrupt the session.
During the invocation of this method, any runtime exception thrown will be ignored by the controller.
During the invocation of this method, any error thrown will be propagated to the portlet controller invoker.
eventFailed in interface EventControllerContextcontext - the sessionfailedEvent - the failed eventthrowable - the throwablepublic void eventDiscarded(EventPhaseContext context, WindowEvent discardedEvent, int cause)
EventControllerContextContext call back when an event is discarded by the controller for a specific reason. The session argument only provides querying capabilities and it is not possible to queue event or interrupt the session.
The cause value is an integer among the constantsEventControllerContext.CONSUMED_EVENT_FLOODEDEventControllerContext.EVENT_CONSUMER_INFO_NOT_AVAILABLEEventControllerContext.EVENT_CONSUMER_NOT_AVAILABLEEventControllerContext.EVENT_PRODUCER_INFO_NOT_AVAILABLEEventControllerContext.EVENT_PRODUCER_NOT_AVAILABLEEventControllerContext.PORTLET_DOES_NOT_CONSUME_EVENTEventControllerContext.PRODUCED_EVENT_FLOODEDDuring the invocation of this method, any runtime exception thrown will be ignored by the controller.
During the invocation of this method, any error thrown will be propagated to the portlet controller invoker.
eventDiscarded in interface EventControllerContextcontext - the sessiondiscardedEvent - the discarded eventcause - the causeCopyright © 2003-2018 GateIn. All Rights Reserved.