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 write events.
007 *
008 * @author Arnold Lankamp
009 */
010 public interface IWriteMultiplexer{
011
012 /**
013 * Registers the given channel for writing.
014 *
015 * @param channel
016 * The channel that needs to be registered for writing.
017 * @param ioHandler
018 * The I/O handler that is associated with the given channel
019 */
020 void registerForWrite(SelectableChannel channel, SocketIOHandler ioHandler);
021
022 /**
023 * Deregisters the given channel for writing (if nessecary).
024 *
025 * @param channel
026 * The channel that needs to be deregistered for writing.
027 */
028 void deregisterForWrite(SelectableChannel channel);
029 }