org.exolab.core.messenger
Interface ChannelAcceptor


public interface ChannelAcceptor

A ChannelAcceptor handles requests on an SystemChannel to open or close user channels

Version:
$Revision: 1.2 $ $Date: 2002/02/17 20:46:53 $
Author:
Tim Anderson
See Also:
SystemChannel, Connection

Method Summary
 void accept(java.lang.String name, ChannelHandler handler)
          Accept requests for the specified channel, and pass them on to the handler.
 void accept(java.lang.String name, ChannelListener listener)
          Accept a single channel connection for the specified name, and bind the listener to it
This method returns immediately.
 void close()
          Close the acceptor, freeing all associated resources
 void close(java.lang.String name)
          Stop accepting requests on the specified channel
 

Method Detail

accept

public void accept(java.lang.String name,
                   ChannelHandler handler)
            throws java.rmi.RemoteException
Accept requests for the specified channel, and pass them on to the handler.
This method returns immediately.

Parameters:
name - the channel name
handler - the handler to pass new channels to
Throws:
java.rmi.RemoteException - if a handler is already registered for the specified channel
java.lang.IllegalArgumentException - if any argument is null

accept

public void accept(java.lang.String name,
                   ChannelListener listener)
            throws java.rmi.RemoteException
Accept a single channel connection for the specified name, and bind the listener to it
This method returns immediately.

Parameters:
name - the channel name to listen on
listener - the listener to handle requests on the channel
Throws:
java.rmi.RemoteException - if an error occurs accepting channels
java.lang.IllegalArgumentException - if any argument is null

close

public void close(java.lang.String name)
Stop accepting requests on the specified channel

Parameters:
name - the channel name
Throws:
java.lang.IllegalArgumentException - if name is null

close

public void close()
           throws java.rmi.RemoteException
Close the acceptor, freeing all associated resources

Throws:
java.rmi.RemoteException - if an error occurs


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