-
Notifications
You must be signed in to change notification settings - Fork 11
Messaging topics
Besides services, Brutusin-RPC allows the developer to create Topics, a programming model based on the Publish–subscribe pattern that lets the applications define client-side functionality that can be triggered on the certain sever events.
In this framework, Topics are implemented over Websockets.
##Server code
Brutusin-RPC topics offer an additional message filtering capability to the standard publish–subscribe model. A filter parameter can be defined to discriminate among subscribers of a topic, that is, messages are delivered to subscribers that satisfy the filtering criteria.
###Topic implementation
A Brutusin-RPC topic is an object instance of a class extending org.brutusin.rpc.websocket.Topic
(https://github.com/brutusin/Brutusin-RPC/blob/master/rpc-api/src/main/java/org/brutusin/rpc/websocket/Topic.java).
public abstract Set<WritableSession> getSubscribers(F filter)
protected void onSubscribe(WritableSession session)
protected void onUnsubscribe(WritableSession session)
###Topic registration ###Publishing from actions ##Client subscription
##Testing
- Home
- Getting started
- Services
- HTTP services
- Messaging topics
- Spring
- Documenting
- Referencing source code
- Builtin components
- Configuration
- Deployment
- Client APIs
- Security
- Developer notes
- Architecture
- Examples