@Target(value=METHOD) @Retention(value=RUNTIME) public @interface Subscribe
AjaxRequestTarget
, the second defines the type of events to
receive. This method will receive any event posted to the EventBus
if it matches the type
of the second parameter and the filter accepts it. Any context a Wicket component expects to be
available, such as the RequestCycle
and Session
, is accessible on invocation of
the method.
Annotated methods will automatically be detected by AtmosphereEventSubscriptionCollector
.
The page on which the component is placed will get a AtmosphereBehavior
, which sets up a
persistent connection (for example websocket or streaming http).
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends com.google.common.base.Predicate<AtmosphereEvent>> |
contextAwareFilter
An optional filter on events to be received by the method.
|
Class<? extends com.google.common.base.Predicate<AtmosphereEvent>> |
filter
An optional filter on events to be received by the method.
|
public abstract Class<? extends com.google.common.base.Predicate<AtmosphereEvent>> filter
RequestCycle
may not be available. For events filtered by
this filter, Wicket-Atmosphere will not have to setup initiate the Wicket request cycle,
which is quite expensive.public abstract Class<? extends com.google.common.base.Predicate<AtmosphereEvent>> contextAwareFilter
Session
and the RequestCycle
. If your filter does
not require this context, you should use filter()
to prevent unnecessary setup of
the request cycle.Copyright © 2006–2021 Apache Software Foundation. All rights reserved.