You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

NetworkConfiguration.java 2.9KB

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