public interface BroadcastFilter
AtmosphereHandler.onStateChange(org.atmosphere.cpr.AtmosphereResourceEvent)
.
See XSSHtmlFilter
for an example.Modifier and Type | Interface and Description |
---|---|
static class |
BroadcastFilter.BroadcastAction
Simple class that tells the
Broadcaster to broadcast or not the transformed value. |
Modifier and Type | Field and Description |
---|---|
static String |
VOID_ATMOSPHERE_RESOURCE_UUID
When a message is about to get cached and some
BroadcastFilter are defined, and when no AtmosphereResource
is available, a no-op AtmosphereResource with uuid == -1 will be used to invoke BroadcastFilter. |
Modifier and Type | Method and Description |
---|---|
BroadcastFilter.BroadcastAction |
filter(String broadcasterId,
Object originalMessage,
Object message)
Transform or filter a message.
|
static final String VOID_ATMOSPHERE_RESOURCE_UUID
BroadcastFilter
are defined, and when no AtmosphereResource
is available, a no-op AtmosphereResource
with uuid == -1 will be used to invoke BroadcastFilter.BroadcastFilter.BroadcastAction filter(String broadcasterId, Object originalMessage, Object message)
Broadcaster
to discard the message, eg. to not broadcast it.broadcasterId
- the Broadcaster.getID()
calling this objectoriginalMessage
- The original message which was Broadcaster.broadcast(Object)
;message
- The transformed or not message.Copyright © 2016. All rights reserved.