KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > components > net > CommonsHTTPClientProperties


1 /*
2  * Copyright 2001-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 package org.apache.axis.components.net;
17
18 /**
19  * Interface implemented by classes seeking to configure the properties
20  * of the multi threaded connection pool used in the CommonsHTTPSender
21  * transport implementation.
22  *
23  * @author Eric Friedman
24  */

25 public interface CommonsHTTPClientProperties {
26     /**
27      * Used to set the maximum number of connections that the pool can open
28      * for all hosts. Since connections imply sockets and sockets imply
29      * file descriptors, the setting you use must not exceed any limits
30      * your system imposes on the number of open file descriptors a
31      * single process may have.
32      *
33      * @return an integer > 1
34      */

35     public int getMaximumTotalConnections();
36
37     /**
38      * Used to set the maximum number of connections that will be pooled
39      * for a given host. This setting is also constrained by
40      * the one returned from getMaximumTotalConnections.
41      *
42      * @return an integer > 1
43      */

44     public int getMaximumConnectionsPerHost();
45
46     /**
47      * Used to set the amount of time, in milliseconds, spent waiting
48      * for an available connection from the pool. An exception is raised
49      * if the timeout is triggered.
50      *
51      * @return an integer > 1 OR 0 for infinite timeout
52      */

53     public int getConnectionPoolTimeout();
54
55     /**
56      * Used to set the default amount of time, in milliseconds, spent waiting
57      * for a connection. This can be overridden by the MessageContext
58      *
59      * @return an integer >= 0
60      */

61     public int getDefaultConnectionTimeout();
62
63     /**
64      * Used to set the default amount of time, in milliseconds, spent waiting
65      * for a reponse. This can be overridden by the MessageContext
66      *
67      * @return an integer >= 0
68      */

69     public int getDefaultSoTimeout();
70
71 }
72
Popular Tags