@PushEndpoint
public interface PushRule
DefaultPushRule
is used to creates
channel of communication based on the value of the request's pathInfo.
Broadcaster
)
on the fly. For example, the following PushRule will create a single Channel of communication. All invocation of
PushContext.push(String, Object)
will be shared to all connected browser
boolean apply(AtmosphereResource resource) { Broadcaster all = BroadcasterFactory.getDefault().lookup("/*", true); resource.setBroadcaster(all); return true; }For more information on how to manipulate the Atmosphere's object, see https://github.com/Atmosphere/atmosphere/wiki/Understanding-BroadcasterBroadcaster AtmosphereResource
Modifier and Type | Method and Description |
---|---|
boolean |
apply(org.atmosphere.cpr.AtmosphereResource resource)
Deprecated.
Configure an
AtmosphereResource and creates channel of communication on the fly. |
boolean apply(org.atmosphere.cpr.AtmosphereResource resource)
AtmosphereResource
and creates channel of communication on the fly.resource
- an AtmosphereResource
Copyright © 2014. All rights reserved.