public interface DataFilter
A filter that can add, modify or remove fields from the
message data
.
Modifier and Type | Interface and Description |
---|---|
static class |
DataFilter.AbortException
Aborts the filtering of the message data.
|
Modifier and Type | Method and Description |
---|---|
Object |
filter(ServerSession session,
ServerChannel channel,
Object data)
Modifies the given message data.
|
Object filter(ServerSession session, ServerChannel channel, Object data) throws DataFilter.AbortException
Modifies the given message data.
Returning null
or throwing DataFilter.AbortException
results in the message processing being interrupted
and the message itself discarded.
If the returned object is different (as returned by
the !=
operator) from the data
parameter
then it is set as the new message data via
Message.Mutable#setData(Object)
.
session
- the ServerSession
that sends the datachannel
- the channel the data is being sent ondata
- the data being sentDataFilter.AbortException
- to abort the filtering of the dataCopyright © 2008–2024 The CometD Project. All rights reserved.