org.exolab.core.messenger
Class ChannelListenerAcceptor

java.lang.Object
  extended by org.exolab.core.messenger.ChannelListenerAcceptor
All Implemented Interfaces:
ChannelHandler

public class ChannelListenerAcceptor
extends java.lang.Object
implements ChannelHandler

A ChannelHandler that accepts a single Channel and binds a ChannelListener to it.

Version:
$Revision: 1.1 $ $Date: 2002/02/17 20:48:50 $
Author:
Tim Anderson
See Also:
Channel, ChannelListener, Connection.accept(String, ChannelListener)

Constructor Summary
ChannelListenerAcceptor(Connection connection, java.lang.String name, ChannelListener listener)
          Construct a new ChannelListenerAcceptor
 
Method Summary
 void opened(Channel channel)
          Handle a new channel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelListenerAcceptor

public ChannelListenerAcceptor(Connection connection,
                               java.lang.String name,
                               ChannelListener listener)
Construct a new ChannelListenerAcceptor

Parameters:
connection - the owning connection
name - the channel name
listener - the channel listener
Throws:
java.lang.IllegalArgumentException - if any argument is null
Method Detail

opened

public void opened(Channel channel)
Handle a new channel.

This implementation binds the listener to the channel, and prevents any more channels from being opened.

Specified by:
opened in interface ChannelHandler
Parameters:
channel - the new channel


Copyright © 1999-2012 The Exolab Group. All Rights Reserved.