| Modifier and Type | Method and Description |
|---|---|
default Topic<? super C> |
Topic.getParentTopic()
Gets the parent topic if any.
|
Topic<? extends C> |
Event.getTopic()
Gets the topic of the event.
|
| Modifier and Type | Method and Description |
|---|---|
default boolean |
Topic.covers(Topic<?> topic)
States whether this topic covers the specified topics.
|
<C> void |
EventBus.publish(Topic<C> topic,
Channel channel,
C content)
Sends the specified content for the specified topic on the specified channel.
|
<C> int |
EventBus.subscribe(Topic<C> topic,
Channel channel,
EventFilter<? super C> filter,
EventHandler<? super C> handler)
Registers a subscriber for the specified topic on the specified channel with the specified filter by adding an
event handler.
|
| Constructor and Description |
|---|
Event(Topic<? extends C> topic)
Constructor specifying only the topic.
|
Event(Topic<? extends C> topic,
C content)
Constructor specifying the topic and content of the event.
|
Event(Topic<? extends C> topic,
Channel channel,
C content)
Constructor specifying the topic, channel and content of the event.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<Topic<?>,Collection<AbstractEventBus.SubscriptionEntry<?>>> |
AbstractEventBus.topicToSubscription
Mapping between subscriptions and topics.
|
| Modifier and Type | Method and Description |
|---|---|
Topic<C> |
AbstractEventBus.SubscriptionEntry.getTopic()
Gets the for which the subscription applies.
|
| Modifier and Type | Method and Description |
|---|---|
static <C> void |
StaticEventBus.publish(Topic<C> topic,
C content) |
<C> void |
AbstractEventBus.publish(Topic<C> topic,
C content)
Sends the specified content for the specified topic on the broadcast channel.
|
static <C> void |
StaticEventBus.publish(Topic<C> topic,
Channel channel,
C content) |
<C> void |
AbstractEventBus.publish(Topic<C> topic,
Channel channel,
C content) |
static void |
StaticEventBus.publish(Topic<Void> topic) |
void |
AbstractEventBus.publish(Topic<Void> topic)
Sends null for the specified topic on the broadcast channel.
|
static <C> int |
StaticEventBus.subscribe(Topic<C> topic,
Channel channel,
EventFilter<? super C> filter,
EventHandler<? super C> handler) |
<C> int |
AbstractEventBus.subscribe(Topic<C> topic,
Channel channel,
EventFilter<? super C> filter,
EventHandler<? super C> handler) |
static <C> int |
StaticEventBus.subscribe(Topic<C> topic,
Channel channel,
EventHandler<? super C> handler) |
<C> int |
AbstractEventBus.subscribe(Topic<C> topic,
Channel channel,
EventHandler<? super C> handler)
Registers a subscriber for the specified topic on the specified channel by adding an event handler.
|
static <C> int |
StaticEventBus.subscribe(Topic<C> topic,
EventFilter<? super C> filter,
EventHandler<? super C> handler) |
<C> int |
AbstractEventBus.subscribe(Topic<C> topic,
EventFilter<? super C> filter,
EventHandler<? super C> handler)
Registers a subscriber for the specified topic with the specified filter by adding an event handler.
|
static <C> int |
StaticEventBus.subscribe(Topic<C> topic,
EventHandler<? super C> handler) |
<C> int |
AbstractEventBus.subscribe(Topic<C> topic,
EventHandler<? super C> handler)
Registers a subscriber for the specified topic by adding an event handler.
|
static void |
StaticEventBus.unsubscribe(Topic<?> topic)
Unsubscribes all event handlers for the specified topic.
|
| Constructor and Description |
|---|
SubscriptionEntry(int id,
Topic<C> topic,
EventFilter<? super C> filter,
EventHandler<? super C> handler)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
TopicFilter.addTopic(Topic<? extends C> topic)
Adds the specified topic for which the events should either be accepted or rejected.
|
void |
TopicFilter.removeTopic(Topic<? extends C> topic)
Removes the specified topic for which the events should now be either rejected or accepted.
|
| Constructor and Description |
|---|
TopicFilter(boolean accept,
Topic<? extends C>... topics)
Constructor.
|
TopicFilter(Topic<? extends C>... topics)
Constructor.
|
TopicFilter(Topic<? extends C> topic)
Constructor.
|
| Constructor and Description |
|---|
TopicFilter(boolean accept,
Collection<Topic<? extends C>> topics)
Constructor.
|
TopicFilter(Collection<Topic<? extends C>> topics)
Constructor.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SimpleTopic<C>
Simple implementation of a topic that can be named (e.g.
|
| Modifier and Type | Method and Description |
|---|---|
Topic<? super C> |
SimpleTopic.getParentTopic() |
| Constructor and Description |
|---|
SimpleTopic(String name,
Topic<? super C> parent)
Constructor.
|
SimpleTopic(Topic<? super C> parent)
Constructor.
|
Copyright © 2017. All rights reserved.