com.sun.sgs.client
Interface ClientChannelListener


public interface ClientChannelListener

Listener for events relating to a ClientChannel.

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:


Method Summary
 void leftChannel(ClientChannel channel)
          Notifies this listener that the associated client was removed from the specified channel.
 void receivedMessage(ClientChannel channel, ByteBuffer message)
          Notifies this listener that the specified message was received on the specified channel.
 

Method Detail

receivedMessage

void receivedMessage(ClientChannel channel,
                     ByteBuffer message)
Notifies this listener that the specified message was received on the specified channel. This listener is notified of messages that its associated client sends.

If the message originated from a client, the server-side application may have altered the message (for application-specific reasons) from the original message sent.

Parameters:
channel - a client channel
message - a message

leftChannel

void leftChannel(ClientChannel channel)
Notifies this listener that the associated client was removed from the specified channel. The associated client can no longer send messages on the specified channel.

Parameters:
channel - a client channel

RedDwarf, Version 0.10.0
2010-02-12 09:11:07

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved