public interface PageEvent<T extends PageActionContext> extends BaseChannelEvent
PageEvent
which will be put on the internal Guava event bus for
synchronous
events dispatching where listeners to this event can inject logic or short-circuit
processing by setting a RuntimeException
through PageEvent#setException(java.lang.RuntimeException)
. When a RuntimeException
is
set on this PageEvent
by a listener, the
org.hippoecm.hst.pagecomposer.jaxrs.services.AbstractConfigResource#publishSynchronousEvent
will rethrow the
exception. The reason that this has to be done via this PageCopyEvent object is that Guava
com.google.common.eventbus.EventBus
always catches an exception thrown by a listener, even when injecting a
custom com.google.common.eventbus.SubscriberExceptionHandler
Note that listeners for PageEvent
s must never invoke
HstRequestContext#getSession()#save()
. Changes in the JCR Session
will always be persisted by the code that posted the PageEvent
to the guava event bus
Modifier and Type | Method and Description |
---|---|
T |
getPageActionContext()
Return the page action context data.
|
getChannel, getLogger
getException, setException
T getPageActionContext()
Copyright © 2008–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.