This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.configuration;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022/**
023 * 
024 *         The network configuration for external http request to
025 * repositories.
026 *       
027 * 
028 * @version $Revision$ $Date$
029 */
030@SuppressWarnings( "all" )
031public class NetworkConfiguration
032    implements java.io.Serializable
033{
034
035      //--------------------------/
036     //- Class/Member Variables -/
037    //--------------------------/
038
039    /**
040     * maximum total external http connections.
041     */
042    private int maxTotal = 30;
043
044    /**
045     * maximum total external http connections per host.
046     */
047    private int maxTotalPerHost = 30;
048
049    /**
050     * use or not http connection pooling default true.
051     */
052    private boolean usePooling = true;
053
054
055      //-----------/
056     //- Methods -/
057    //-----------/
058
059    /**
060     * Get maximum total external http connections.
061     * 
062     * @return int
063     */
064    public int getMaxTotal()
065    {
066        return this.maxTotal;
067    } //-- int getMaxTotal()
068
069    /**
070     * Get maximum total external http connections per host.
071     * 
072     * @return int
073     */
074    public int getMaxTotalPerHost()
075    {
076        return this.maxTotalPerHost;
077    } //-- int getMaxTotalPerHost()
078
079    /**
080     * Get use or not http connection pooling default true.
081     * 
082     * @return boolean
083     */
084    public boolean isUsePooling()
085    {
086        return this.usePooling;
087    } //-- boolean isUsePooling()
088
089    /**
090     * Set maximum total external http connections.
091     * 
092     * @param maxTotal
093     */
094    public void setMaxTotal( int maxTotal )
095    {
096        this.maxTotal = maxTotal;
097    } //-- void setMaxTotal( int )
098
099    /**
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}