Top Fields Constructors Methods
org.jvnet.hk2.internal

public Class TopicImpl<T>

extends Object
implements Topic<T>
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.api.messaging.Topic
Imports
java.lang.annotation.Annotation, java.lang.reflect.Type, java.util.Collections, .HashSet, .Set, org.glassfish.hk2.api.messaging.Topic, .TopicDistributionService, org.glassfish.hk2.utilities.NamedImpl

Author
jwells

Field Summary

Modifier and TypeField and Description
private final ServiceLocatorImpl
private final Set<Annotation>
private final Type

Constructor Summary

AccessConstructor and Description
pack-priv
TopicImpl(ServiceLocatorImpl locator, Type topicType, Set<Annotation> requiredQualifiers)

Method Summary

Modifier and TypeMethod and Description
public Set<Annotation>
getTopicQualifiers()

Implements org.glassfish.hk2.api.messaging.Topic.getTopicQualifiers.

The qualifiers associated with this Topic.

public Type
getTopicType()

Implements org.glassfish.hk2.api.messaging.Topic.getTopicType.

Gets the type of the topic, in order to match the message to subscribers

public Topic<T>
named(String name)

Implements org.glassfish.hk2.api.messaging.Topic.named.

Returns an Topic that is further qualified with the given name

public <U> Topic<U>
ofType(Type type)

Implements org.glassfish.hk2.api.messaging.Topic.ofType.

Returns an Topic that is of the given type.

public void
publish(T message)

Implements org.glassfish.hk2.api.messaging.Topic.publish.

Publishes a message to all subscribers

public Topic<T>
qualifiedWith(Annotation... qualifiers)

Implements org.glassfish.hk2.api.messaging.Topic.qualifiedWith.

A set of qualifiers to further restrict this Topic to.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

locatorback to summary
private final ServiceLocatorImpl locator
requiredQualifiersback to summary
private final Set<Annotation> requiredQualifiers
topicTypeback to summary
private final Type topicType

Constructor Detail

TopicImplback to summary
pack-priv TopicImpl(ServiceLocatorImpl locator, Type topicType, Set<Annotation> requiredQualifiers)

Method Detail

getTopicQualifiersback to summary
public Set<Annotation> getTopicQualifiers()

Implements org.glassfish.hk2.api.messaging.Topic.getTopicQualifiers.

Doc from org.glassfish.hk2.api.messaging.Topic.getTopicQualifiers.

The qualifiers associated with this Topic. Messages should only be distributed to subscribers that have matching qualifiers

Annotations
@Override
getTopicTypeback to summary
public Type getTopicType()

Implements org.glassfish.hk2.api.messaging.Topic.getTopicType.

Doc from org.glassfish.hk2.api.messaging.Topic.getTopicType.

Gets the type of the topic, in order to match the message to subscribers

Annotations
@Override
namedback to summary
public Topic<T> named(String name)

Implements org.glassfish.hk2.api.messaging.Topic.named.

Doc from org.glassfish.hk2.api.messaging.Topic.named.

Returns an Topic that is further qualified with the given name

Annotations
@Override
ofTypeback to summary
public <U> Topic<U> ofType(Type type)

Implements org.glassfish.hk2.api.messaging.Topic.ofType.

Doc from org.glassfish.hk2.api.messaging.Topic.ofType.

Returns an Topic that is of the given type. This type must be more specific than the type of this Topic

Annotations
@Override
publishback to summary
public void publish(T message)

Implements org.glassfish.hk2.api.messaging.Topic.publish.

Doc from org.glassfish.hk2.api.messaging.Topic.publish.

Publishes a message to all subscribers

Annotations
@Override
qualifiedWithback to summary
public Topic<T> qualifiedWith(Annotation... qualifiers)

Implements org.glassfish.hk2.api.messaging.Topic.qualifiedWith.

Doc from org.glassfish.hk2.api.messaging.Topic.qualifiedWith.

A set of qualifiers to further restrict this Topic to.

Annotations
@Override