KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jk > core > JkChannel


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.jk.core;
18
19 import java.io.IOException JavaDoc;
20
21 import org.apache.coyote.Request;
22
23 /**
24  * A Channel represents a connection point to the outside world.
25  *
26  * @author Bill Barker
27  */

28
29 public interface JkChannel {
30
31
32     /**
33      * Return the identifying name of this Channel.
34      */

35     public String JavaDoc getChannelName();
36
37     /**
38      * Send a message back to the client.
39      * @param msg The message to send.
40      * @param ep The connection point for this request.
41      */

42     public int send(Msg msg, MsgContext ep) throws IOException JavaDoc;
43
44     /**
45      * Recieve a message from the client.
46      * @param msg The place to recieve the data into.
47      * @param ep The connection point for this request.
48      */

49     public int receive(Msg msg, MsgContext ep) throws IOException JavaDoc;
50
51     /**
52      * Flush the data to the client.
53      */

54     public int flush(Msg msg, MsgContext ep) throws IOException JavaDoc;
55
56     /**
57      * Invoke the request chain.
58      */

59     public int invoke(Msg msg, MsgContext ep) throws IOException JavaDoc;
60
61     /**
62      * Confirm that a shutdown request was recieved form us.
63      */

64     public boolean isSameAddress(MsgContext ep);
65
66     /**
67      * Register a new Request in the Request pool.
68      */

69     public void registerRequest(Request req, MsgContext ep, int count);
70
71     /**
72      * Create a new request endpoint.
73      */

74     public MsgContext createMsgContext();
75
76 }
77
Popular Tags