@Target(value={TYPE,METHOD}) @Retention(value=RUNTIME) @Documented public @interface WampPublishListener
PublishMessage and the topicURI matches one of the listed values of
the annotation.
If no topicURI is provided the method is accessible by the topicURI
'beanName.methodName'
In the following example the method can be called by sending a PublishMessage
with the topicURI 'myService.doSomething'
@Service
public class MyService {
@WampPublishListener
public void doSomething(PublishMessage message) {
}
}
If the attribute replyTo has a value the return value of the method (if any)
will be wrapped into an EventMessage and sent to the listed
topicURI(s). Additionally if the excludeSender attribute is true the sender
of the PublishMessage does not receive an EventMessage.| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
excludeSender
Exclude the sender of the
PublishMessage from the replyTo
receivers. |
String[] |
replyTo
Send the return value with an
EventMessage to the listed
topicURI(s). |
String[] |
value
TopicURI(s) for the subscription.
|
public abstract String[] value
public abstract String[] replyTo
EventMessage to the listed
topicURI(s). No EventMessage will be created when the method
returns nothing (void) or nullpublic abstract boolean excludeSender
PublishMessage from the replyTo
receivers. This attribut will be ignored if no EventMessage is
created.Copyright © 2014. All Rights Reserved.