Package org.jvnet.hk2.internal
Class TopicImpl<T>
java.lang.Object
org.jvnet.hk2.internal.TopicImpl<T>
- All Implemented Interfaces:
Topic<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServiceLocatorImpl
private final Set
<Annotation> private final Type
-
Constructor Summary
ConstructorsConstructorDescriptionTopicImpl
(ServiceLocatorImpl locator, Type topicType, Set<Annotation> requiredQualifiers) -
Method Summary
Modifier and TypeMethodDescriptionThe qualifiers associated with this Topic.Gets the type of the topic, in order to match the message to subscribersReturns an Topic that is further qualified with the given name<U> Topic
<U> Returns an Topic that is of the given type.void
Publishes a message to all subscribersqualifiedWith
(Annotation... qualifiers) A set of qualifiers to further restrict this Topic to.
-
Field Details
-
locator
-
topicType
-
requiredQualifiers
-
-
Constructor Details
-
TopicImpl
TopicImpl(ServiceLocatorImpl locator, Type topicType, Set<Annotation> requiredQualifiers)
-
-
Method Details
-
publish
Description copied from interface:Topic
Publishes a message to all subscribers -
named
Description copied from interface:Topic
Returns an Topic that is further qualified with the given name -
ofType
Description copied from interface:Topic
Returns an Topic that is of the given type. This type must be more specific than the type of this Topic -
qualifiedWith
Description copied from interface:Topic
A set of qualifiers to further restrict this Topic to.- Specified by:
qualifiedWith
in interfaceTopic<T>
- Parameters:
qualifiers
- The qualifiers to further restrict this Topic to- Returns:
- An Topic restricted with the given qualifiers
-
getTopicType
Description copied from interface:Topic
Gets the type of the topic, in order to match the message to subscribers- Specified by:
getTopicType
in interfaceTopic<T>
- Returns:
- the Type of this topic. Will not return null
-
getTopicQualifiers
Description copied from interface:Topic
The qualifiers associated with this Topic. Messages should only be distributed to subscribers that have matching qualifiers- Specified by:
getTopicQualifiers
in interfaceTopic<T>
- Returns:
- the non-null but possibly empty set of qualifiers associated with this Topic
-