1package org.apache.archiva.admin.model.beans;
2/*3 * Licensed to the Apache Software Foundation (ASF) under one4 * or more contributor license agreements. See the NOTICE file5 * distributed with this work for additional information6 * regarding copyright ownership. The ASF licenses this file7 * to you under the Apache License, Version 2.0 (the8 * "License"); you may not use this file except in compliance9 * with the License. You may obtain a copy of the License at10 *11 * http://www.apache.org/licenses/LICENSE-2.012 *13 * Unless required by applicable law or agreed to in writing,14 * software distributed under the License is distributed on an15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY16 * KIND, either express or implied. See the License for the17 * specific language governing permissions and limitations18 * under the License.19 */2021import javax.xml.bind.annotation.XmlRootElement;
22import java.io.Serializable;
2324/**25 * @author Olivier Lamy26 * @since 1.4-M127 */28 @XmlRootElement( name = "networkConfiguration" )
29publicclassNetworkConfiguration30implements Serializable
31 {
32/**33 * maximum total external http connections.34 */35privateint maxTotal = 30;
3637/**38 * maximum total external http connections per host.39 */40privateint maxTotalPerHost = 30;
4142privateboolean usePooling = true;
4344publicNetworkConfiguration()
45 {
46// no op47 }
4849publicNetworkConfiguration( int maxTotal, int maxTotalPerHost, boolean usePooling )
50 {
51this.maxTotal = maxTotal;
52this.maxTotalPerHost = maxTotalPerHost;
53this.usePooling = usePooling;
54 }
5556publicint getMaxTotal()
57 {
58return maxTotal;
59 }
6061publicvoid setMaxTotal( int maxTotal )
62 {
63this.maxTotal = maxTotal;
64 }
6566publicint getMaxTotalPerHost()
67 {
68return maxTotalPerHost;
69 }
7071publicvoid setMaxTotalPerHost( int maxTotalPerHost )
72 {
73this.maxTotalPerHost = maxTotalPerHost;
74 }
7576publicboolean isUsePooling()
77 {
78return usePooling;
79 }
8081publicvoid setUsePooling( boolean usePooling )
82 {
83this.usePooling = usePooling;
84 }
8586 @Override
87public String toString()
88 {
89final StringBuilder sb = new StringBuilder();
90 sb.append( "NetworkConfiguration" );
91 sb.append( "{maxTotal=" ).append( maxTotal );
92 sb.append( ", maxTotalPerHost=" ).append( maxTotalPerHost );
93 sb.append( ", usePooling=" ).append( usePooling );
94 sb.append( '}' );
95return sb.toString();
96 }
97 }