1 package org.apache.archiva.configuration;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 /**
23 *
24 * The network configuration for external http request to
25 * repositories.
26 *
27 *
28 * @version $Revision$ $Date$
29 */
30 @SuppressWarnings( "all" )
31 public class NetworkConfiguration
32 implements java.io.Serializable
33 {
34
35 //--------------------------/
36 //- Class/Member Variables -/
37 //--------------------------/
38
39 /**
40 * maximum total external http connections.
41 */
42 private int maxTotal = 30;
43
44 /**
45 * maximum total external http connections per host.
46 */
47 private int maxTotalPerHost = 30;
48
49 /**
50 * use or not http connection pooling default true.
51 */
52 private boolean usePooling = true;
53
54
55 //-----------/
56 //- Methods -/
57 //-----------/
58
59 /**
60 * Get maximum total external http connections.
61 *
62 * @return int
63 */
64 public int getMaxTotal()
65 {
66 return this.maxTotal;
67 } //-- int getMaxTotal()
68
69 /**
70 * Get maximum total external http connections per host.
71 *
72 * @return int
73 */
74 public int getMaxTotalPerHost()
75 {
76 return this.maxTotalPerHost;
77 } //-- int getMaxTotalPerHost()
78
79 /**
80 * Get use or not http connection pooling default true.
81 *
82 * @return boolean
83 */
84 public boolean isUsePooling()
85 {
86 return this.usePooling;
87 } //-- boolean isUsePooling()
88
89 /**
90 * Set maximum total external http connections.
91 *
92 * @param maxTotal
93 */
94 public void setMaxTotal( int maxTotal )
95 {
96 this.maxTotal = maxTotal;
97 } //-- void setMaxTotal( int )
98
99 /**
100 * Set maximum total external http connections per host.
101 *
102 * @param maxTotalPerHost
103 */
104 public void setMaxTotalPerHost( int maxTotalPerHost )
105 {
106 this.maxTotalPerHost = maxTotalPerHost;
107 } //-- void setMaxTotalPerHost( int )
108
109 /**
110 * Set use or not http connection pooling default true.
111 *
112 * @param usePooling
113 */
114 public void setUsePooling( boolean usePooling )
115 {
116 this.usePooling = usePooling;
117 } //-- void setUsePooling( boolean )
118
119 }