@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[] |
authenticated
If true a call to this annotated method has to be authenticated.
|
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.public abstract boolean[] authenticated
WampAuthenticated and the
global setting WampConfigurer.authenticationRequired()Copyright © 2014–2015. All rights reserved.