public static enum Topic.BroadcastDirection extends java.lang.Enum<Topic.BroadcastDirection>
Message buses
may be organised into hierarchies
. That allows to provide
additional messaging features like 'broadcasting'
. Here it means that messages sent to particular topic within
particular message bus may be dispatched to subscribers of the same topic within another message buses.
Current enum holds available broadcasting options.
Enum Constant and Description |
---|
NONE
No broadcasting is performed for the
|
TO_CHILDREN
The message is dispatched to all subscribers of the target topic registered within the child message buses.
|
TO_PARENT
The message send to particular topic at particular bus is dispatched to all subscribers of the same topic within the parent bus.
|
Modifier and Type | Method and Description |
---|---|
static Topic.BroadcastDirection |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Topic.BroadcastDirection[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Topic.BroadcastDirection TO_CHILDREN
Example:
parent-bus <--- topic1 / \ * / \ * topic1 ---> child-bus1 child-bus2 <--- topic1
Here subscribers of the 'topic1'
registered within the 'child-bus1'
and 'child-bus2'
will receive the message sent to the 'topic1'
topic at the 'parent-bus'
.
public static final Topic.BroadcastDirection NONE
public static final Topic.BroadcastDirection TO_PARENT
Example:
parent-bus <--- topic1 | child-bus <--- topic1
Here subscribers of the topic1
registered within 'parent-bus'
will receive messages posted
to the same topic within 'child-bus'
.
public static Topic.BroadcastDirection[] values()
for (Topic.BroadcastDirection c : Topic.BroadcastDirection.values()) System.out.println(c);
public static Topic.BroadcastDirection valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null