com.sun.sgs.impl.app.profile
Class ProfileChannelManager

java.lang.Object
  extended by com.sun.sgs.impl.app.profile.ProfileChannelManager
All Implemented Interfaces:
ChannelManager

public class ProfileChannelManager
extends Object
implements ChannelManager

This is implementation of ChannelManager simply calls its backing manager for each manager method.


Constructor Summary
ProfileChannelManager(ChannelManager backingManager)
          Creates an instance of ProfileChannelManager.
 
Method Summary
 Channel createChannel(String name, ChannelListener listener, Delivery delivery)
          Creates a new channel with the specified listener and delivery guarantee, binds it to the specified name, and returns it.
 Channel getChannel(String name)
          Returns an existing channel with the specified name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProfileChannelManager

public ProfileChannelManager(ChannelManager backingManager)
Creates an instance of ProfileChannelManager.

Parameters:
backingManager - the ChannelManager to call through to
Method Detail

createChannel

public Channel createChannel(String name,
                             ChannelListener listener,
                             Delivery delivery)
Creates a new channel with the specified listener and delivery guarantee, binds it to the specified name, and returns it.

If the specified listener is null, then any messages sent on the returned channel by any client session will be automatically forwarded, unfiltered, to all channel members.

If the specified listener is non-null, then when any client session sends a message on the returned channel, the specified listener's receivedMessage method is invoked with the channel, client session and the message. The specified listener is not invoked for messages that the server sends on the channel via the channel's send method. If the specified listener is non-null, then it must also be Serializable.

Supplying a non-null listener (although not required) is strongly suggested. A listener's receivedMessage method provides an opportunity for an application to intervene when a client sends a channel message, to perform access control, filtering, or take other application-specific action on such channel messages.

If a non-null listener is provided, it is strongly suggested that a different listener instance be provided for each channel created, in order to reduce the possible contention on channel listeners.

Messages sent on the returned channel are delivered in a manner that satisfies the minimum requirements of the specified delivery guarantee.

Specified by:
createChannel in interface ChannelManager
Parameters:
name - a name
listener - a channel listener, or null
delivery - a delivery guarantee
Returns:
a new channel bound to the specified name

getChannel

public Channel getChannel(String name)
Returns an existing channel with the specified name.

Specified by:
getChannel in interface ChannelManager
Parameters:
name - a channel name
Returns:
an existing channel bound to the specified name

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

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