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