Package ch.rasc.wamp2spring.annotation
Annotation Interface WampListener
Annotation that denotes a method that is called when the Broker receives a
PublishMessage and the topic matches one of the listed values of the annotation
( topic()).
If no topic is provided the method listens for the topic 'beanName.methodName'
The method feed in the following example listens for
PublishMessage that are sent to the topic 'myService.feed'.
The method publishNews is called by the library when a
PublishMessage with the topic 'topic.news' arrives.
@Service
public class MyService {
@WampListener
public void feed() {
}
@WampListener("topic.news")
public void publishNews(String news) {
}
}
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
One or more topics the method should listen on. If empty the default 'beanName.methodName' is used.- Default:
- {}
-
topic
One or more topics the method should listen on. If empty the default 'beanName.methodName' is used.- Default:
- {}
-
match
MatchPolicy matchSpecifies the match policy- Default:
- EXACT
-