001 package toolbus.communication;
002
003 import java.nio.channels.SelectableChannel;
004
005 /**
006 * Implement this interface if you're a multiplexer that is able to select on read events.
007 *
008 * @author Arnold Lankamp
009 */
010 public interface IReadMultiplexer{
011
012
013 /**
014 * Registers the given channel for reading.
015 *
016 * @param channel
017 * The channel that needs to be registered for reading.
018 * @param ioHandler
019 * The I/O handler that is associated with the given channel.
020 */
021 void registerForRead(SelectableChannel channel, SocketIOHandler ioHandler);
022
023
024 /**
025 * Deregisters the given channel for reading (if nessecary).
026 *
027 * @param channel
028 * The channel that needs to be deregistered for reading.
029 */
030 void deregisterForRead(SelectableChannel channel);
031 }