ChannelHub

public abstract class ChannelHub<C extends MessageChannel> implements AutoCloseable

The hub of channels grouped in some logical way.

Serves for channel creation and storage-per-ID which in a way makes the hub similar to an entity repository.

Inheritors

Constructors

Link copied to clipboard
protected void ChannelHub(TransportFactory transportFactory)

Functions

Link copied to clipboard
public void close()
Link copied to clipboard
public void closeStaleChannels()
Closes the stale channels and removes those from the hub.
Link copied to clipboard
public C get(ChannelId channelId)
Obtains a channel from this hub by the given channel ID.
Link copied to clipboard
public boolean hasChannel(ChannelId id)
Checks if this channel hub contains a channel with a given ID.
Link copied to clipboard
public Set<ChannelId> ids()
Link copied to clipboard
protected abstract C newChannel(ChannelId id)
Creates a new channel under the specified ID.