| Constructor and Description |
|---|
SimpleChannel()
Constructor.
|
SimpleChannel(Channel... subChannels)
Constructor.
|
SimpleChannel(Collection<Channel> subChannels)
Constructor.
|
SimpleChannel(String name)
Constructor.
|
SimpleChannel(String name,
Channel... subChannels)
Constructor.
|
SimpleChannel(String name,
Collection<Channel> subChannels)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubChannel(Channel channel)
Adds the specified sub-channel into which this channel can flow.
|
boolean |
flowsInto(Channel channel)
States whether this channel flows into the specified channel.
|
String |
getName()
Gets the name of the channel, mostly useful for logging/debugging purposes.
|
Collection<Channel> |
getSubChannels()
Gets the sub-channels into which this channel can flow.
|
void |
removeSubChannel(Channel channel)
Removes the specified sub-channel into which this channel can no longer flow.
|
String |
toString() |
public SimpleChannel()
A default, unique name will be used.
public SimpleChannel(Channel... subChannels)
A default, unique name will be used.
subChannels - Sub-channels into which this channel can flow.public SimpleChannel(Collection<Channel> subChannels)
A default, unique name will be used.
subChannels - Sub-channels into which this channel can flow.public SimpleChannel(String name)
If no name is given, a default, unique name will be used.
name - Name that can be used, for example, for logging or debugging purposes.public SimpleChannel(String name, Channel... subChannels)
If no name is given, a default, unique name will be used.
name - Name that can be used, for example, for logging or debugging purposes.subChannels - Sub-channels into which this channel can flow.public SimpleChannel(String name, Collection<Channel> subChannels)
If no name is given, a default, unique name will be used.
name - Name that can be used, for example, for logging or debugging purposes.subChannels - Sub-channels into which this channel can flow.public String getName()
ChannelBy default, the class's simple name followed by the instance's hash code.
getName in interface ChannelChannel.getName()public Collection<Channel> getSubChannels()
public void addSubChannel(Channel channel)
channel - Sub-channel to be added.public void removeSubChannel(Channel channel)
channel - Sub-channel to be removed.public boolean flowsInto(Channel channel)
ChannelBy default, a channel only flows into itself.
flowsInto in interface Channelchannel - Channel to be checked (whether it accepts events from this channel).Channel.flowsInto(Channel)Copyright © 2017. All rights reserved.