T
- The type of event to be distributed to subscriberspublic interface Topic<T>
Modifier and Type | Method and Description |
---|---|
Set<Annotation> |
getTopicQualifiers()
The qualifiers associated with this Topic.
|
Type |
getTopicType()
Gets the type of the topic, in order to match the message
to subscribers
|
Topic<T> |
named(String name)
Returns an Topic that is further qualified
with the given name
|
<U> Topic<U> |
ofType(Type type)
Returns an Topic that is of the given type.
|
void |
publish(T message)
Publishes a message to all subscribers
|
Topic<T> |
qualifiedWith(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 subscribersIllegalStateException
- If there is no implementation of
TopicDistributionService
to do the distribution of the messageTopic<T> named(String name)
name
- The value field of the Named annotation parameter. Must
not be null<U> Topic<U> ofType(Type type)
type
- The type to restrict the returned Topic toTopic<T> qualifiedWith(Annotation... qualifiers)
qualifiers
- The qualifiers to further restrict this Topic toType getTopicType()
Set<Annotation> getTopicQualifiers()
Copyright © 2009-2017, Oracle and/or its affiliates. All Rights Reserved.