1 /********************************************************************** 2 * ChannelRegistrar.java 3 * created on 05.03.2005 by netseeker 4 * $Source$ 5 * $Date$ 6 * $Revision$ 7 * 8 * ==================================================================== 9 * 10 * Copyright 2005-2006 netseeker aka Michael Manske 11 * 12 * Licensed under the Apache License, Version 2.0 (the "License"); 13 * you may not use this file except in compliance with the License. 14 * You may obtain a copy of the License at 15 * 16 * http://www.apache.org/licenses/LICENSE-2.0 17 * 18 * Unless required by applicable law or agreed to in writing, software 19 * distributed under the License is distributed on an "AS IS" BASIS, 20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 * See the License for the specific language governing permissions and 22 * limitations under the License. 23 * ==================================================================== 24 * 25 * This file is part of the ejoe framework. 26 * For more information on the author, please see 27 * <http://www.manskes.de/>. 28 * 29 *********************************************************************/ 30 package de.netseeker.ejoe; 31 32 /*** 33 * @author netseeker 34 */ 35 public interface ChannelRegistrar 36 { 37 /*** 38 * (Re-)Adds a incomplete read channel to the list of channels processed by 39 * the Selector of this ChannelRegistrar 40 * 41 * @param receiverInfo 42 * the ConnectionHeader initially sent by the receiver 43 * @param interest 44 * OP_WRITE or OP_READ interest 45 */ 46 public void register(ConnectionHeader receiverInfo, int interest); 47 48 /*** 49 * Tells whether this ChannelRegistrar is running and accepting 50 * channels for further processing 51 * 52 * @return true if this ChannelRegistrar is running and accepting 53 * channels for further processing otherwise false 54 */ 55 public boolean isValid(); 56 }