T
- The type of event to be distributed to subscriberspublic interface Topic<T>
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.annotation.Annotation> |
getTopicQualifiers()
The qualifiers associated with this Topic.
|
java.lang.reflect.Type |
getTopicType()
Gets the type of the topic, in order to match the message
to subscribers
|
Topic<T> |
named(java.lang.String name)
Returns an Topic that is further qualified
with the given name
|
<U> Topic<U> |
ofType(java.lang.reflect.Type type)
Returns an Topic that is of the given type.
|
void |
publish(T message)
Publishes a message to all subscribers
|
Topic<T> |
qualifiedWith(java.lang.annotation.Annotation... qualifiers)
A set of qualifiers to further restrict this Topic to.
|
void publish(T message)
message
- The non-null message to send to all current subscribersjava.lang.IllegalStateException
- If there is no implementation of
TopicDistributionService
to do the distribution of the messageTopic<T> named(java.lang.String name)
name
- The value field of the Named annotation parameter. Must
not be null<U> Topic<U> ofType(java.lang.reflect.Type type)
type
- The type to restrict the returned Topic toTopic<T> qualifiedWith(java.lang.annotation.Annotation... qualifiers)
qualifiers
- The qualifiers to further restrict this Topic tojava.lang.reflect.Type getTopicType()
java.util.Set<java.lang.annotation.Annotation> getTopicQualifiers()