|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ClientChannel
Represents a client's view of a channel. A channel is a communication group, consisting of multiple clients and the server.
The server is solely responsible for creating channels and
adding and removing clients from channels. If desired, a client
can request that a channel be created or its session be joined to or
removed from the channel by sending an application-specific message to
the server (using its ServerSession).
When the server adds a client session to a channel, the client's
ServerSessionListener's joinedChannel method is
invoked with that client channel, returning the client's
ClientChannelListener for the channel. A
ClientChannelListener for a client channel is notified
as follows:
receivedMessage
method is invoked with the channel and the message. The listener
is notified of messages that its client sends on its associated
channel; that is, a sender receives its own broadcasts.leftChannel method is
invoked with the channel. Once a client has been removed
from a channel, that client can no longer send messages on that
channel.
| Method Summary | |
|---|---|
String |
getName()
Returns the name of this channel. |
void |
send(ByteBuffer message)
Sends the message contained in the specified ByteBuffer
to all channel members, including the sender. |
| Method Detail |
|---|
String getName()
void send(ByteBuffer message)
throws IOException
ByteBuffer
to all channel members, including the sender. The message starts at
the buffer's current position and ends at the buffer's limit.
The buffer's position is not modified by this operation.
The server-side application associated with this client may alter the message being sent, or may discard the message for application-specific reasons. In the latter case, there will be no notification of the message being sent.
The ByteBuffer may be reused immediately after this method
returns. Changes made to the buffer after this method returns will
have no effect on the message sent to the channel by this invocation.
message - a message to send
IllegalStateException - if the sender is not a member of
this channel
IOException - if a synchronous I/O problem occurs
|
Project Darkstar, Version 0.9.8.7 2013-07-29 20:34:04 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||