Package rife.engine
Interface SseConnectionFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The method of a
SseConnectionFilter will be executed for each of
the connections of a SseBroadcaster, so that an operation is
limited to the connections that it accepts.
This makes it possible to address the clients that belong together, for instance the ones that are watching the same document or that are logged in as the same user, which relies on the attributes that you gave the connections when they were established.
Note that a filter is executed again when a client reconnects and the events that it missed are replayed from the history, so that it has to keep deciding the same way to stay consistent.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(SseConnection connection) Executed to determine whether an operation applies to a connection.
-
Method Details
-
accepts
Executed to determine whether an operation applies to a connection.- Parameters:
connection- the connection that is being considered- Returns:
trueif the operation applies to the connection; orfalseif it doesn't- Since:
- 1.10
-