@Inject
private NetworkProxyAdmin networkProxyAdmin;
+ int checkReadTimeout = 10000;
+ int checkTimeout = 9000;
+
@Override
public List<RemoteRepository> getRemoteRepositories()
throws ArchivaRestServiceException
.networkProxy( networkProxy ) );
// hardcoded value as it's a check of the remote repo connectivity
- wagon.setReadTimeout( 4000 );
- wagon.setTimeout( 3000 );
+ wagon.setReadTimeout( checkReadTimeout );
+ wagon.setTimeout( checkTimeout );
if ( wagon instanceof AbstractHttpClientWagon )
{
HttpMethodConfiguration httpMethodConfiguration = new HttpMethodConfiguration() //
.setUsePreemptive( true ) //
- .setReadTimeout( 4000 );
+ .setReadTimeout( checkReadTimeout );
HttpConfiguration httpConfiguration = new HttpConfiguration().setGet( httpMethodConfiguration );
AbstractHttpClientWagon.class.cast( wagon ).setHttpConfiguration( httpConfiguration );
}
}
}
+
+ public int getCheckReadTimeout() {
+ return checkReadTimeout;
+ }
+
+ public void setCheckReadTimeout(int checkReadTimeout) {
+ this.checkReadTimeout = checkReadTimeout;
+ }
+
+ public int getCheckTimeout() {
+ return checkTimeout;
+ }
+
+ public void setCheckTimeout(int checkTimeout) {
+ this.checkTimeout = checkTimeout;
+ }
}