Interface representing a communication group, a {@code Channel}, consisting of multiple client sessions. Classes that implement {@code Channel} must also implement {@link Serializable}.
A channel is created by invoking the {@link ChannelManager#createChannel ChannelManager.createChannel} method with aname, a {@code ChannelListener}, and a {@link Delivery} guarantee. A{@link ClientSession} can be added or removed from a channel using that{@code Channel}'s {@link #join(ClientSession) join} and {@link #leave(ClientSession) leave} methods respectively. All client sessionscan be removed from a channel by invoking {@link #leaveAll leaveAll} onthe channel. To explicitly close a {@code Channel}, remove the {@code Channel} object from the data manager using the {@link DataManager#removeObject DataManager.removeObject} method.
The server can send a message to all client sessions joined to a channel by using the {@link #send send} method. Note that the methodsof this interface are invoked within the context of an executing {@link Task}; as a result, a message sent to client sessions using the {@code send} method will not be sent until after its corresponding taskcompletes.
Messages sent on a channel are delivered in a manner that satisfies the channel's delivery guarantee, specified at creation time. When possible, channel messages are delivered using the most efficient means to satisfy the delivery guarantee. However, a stronger delivery guarantee may be used to deliver the message if the underlying protocol only supports stronger delivery guarantees. A client session can not be joined to a channel if that client session does not support a protocol satisfying the minimum requirements of the channel's delivery guarantee.
A client session joined to one or more channels may become disconnected due to the client logging out or due to other factors such as forced disconnection or network failure. If a client session becomes disconnected, then that client session is removed from each channel that it is a member of.
When the application is finished using a channel, the application should remove the channel from the data manager, which closes the channel and releases all resources associated with the channel.
@see ChannelManager#createChannel ChannelManager.createChannel