Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-10-26 14:28:57 -0400
committerslewis2009-10-26 14:28:57 -0400
commitda30f9346d9fea6f9e28bf67c80dc0f75d38d64d (patch)
tree38d345eb290f5037bd5ceeabfd16681751813939 /providers/bundles/org.eclipse.ecf.provider.filetransfer
parentfae0aa94cecadb4919d170692be6a76b862a87de (diff)
downloadorg.eclipse.ecf-da30f9346d9fea6f9e28bf67c80dc0f75d38d64d.tar.gz
org.eclipse.ecf-da30f9346d9fea6f9e28bf67c80dc0f75d38d64d.tar.xz
org.eclipse.ecf-da30f9346d9fea6f9e28bf67c80dc0f75d38d64d.zip
Added system properties for setting default connection and read timeouts. See bug 292995
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.filetransfer')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java8
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java6
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java8
3 files changed, 15 insertions, 7 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
index 4f00dc77a..d3f16c7a0 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/URLFileSystemBrowser.java
@@ -46,11 +46,15 @@ public class URLFileSystemBrowser extends AbstractFileSystemBrowser {
private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout"; //$NON-NLS-1$
- private static final String DEFAULT_CONNECT_TIMEOUT = "30000"; //$NON-NLS-1$
+ // 10/26/2009: Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.browse.connectTimeout
+ // for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+ private static final String DEFAULT_CONNECT_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.browse.connectTimeout", "30000"); //$NON-NLS-1$ //$NON-NLS-2$
private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout"; //$NON-NLS-1$
- private static final String DEFAULT_READ_TIMEOUT = "30000"; //$NON-NLS-1$
+ // 10/26/2009: Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.browse.readTimeout
+ // for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+ private static final String DEFAULT_READ_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.browse.readTimeout", "30000"); //$NON-NLS-1$ //$NON-NLS-2$
private JREProxyHelper proxyHelper = null;
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
index cba2189ae..03f76b9f0 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/AbstractRetrieveFileTransfer.java
@@ -66,13 +66,13 @@ public abstract class AbstractRetrieveFileTransfer implements IIncomingFileTrans
public static final int DEFAULT_BUF_LENGTH = 4096;
- protected static final int POLLING_RETRY_ATTEMPTS = 20;
+ protected static final int POLLING_RETRY_ATTEMPTS = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.retryAttempts", "20")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;;
protected static final int TIMEOUT_INPUTSTREAM_BUFFER_SIZE = 8192;
- protected static final int READ_TIMEOUT = 1000;
+ protected static final int READ_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.readTimeout", "1000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;
- protected static final int CLOSE_TIMEOUT = 1000;
+ protected static final int CLOSE_TIMEOUT = new Integer(System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout", "1000")).intValue(); //$NON-NLS-1$ //$NON-NLS-2$;
protected Object jobLock = new Object();
protected Job job;
diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
index c205bccc7..64a5d7b11 100644
--- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
+++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/retrieve/UrlConnectionRetrieveFileTransfer.java
@@ -47,11 +47,15 @@ public class UrlConnectionRetrieveFileTransfer extends AbstractRetrieveFileTrans
private static final String JRE_CONNECT_TIMEOUT_PROPERTY = "sun.net.client.defaultConnectTimeout"; //$NON-NLS-1$
- private static final String DEFAULT_CONNECT_TIMEOUT = "15000"; //$NON-NLS-1$
+ // 10/26/2009: Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.connectTimeout
+ // for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+ private static final String DEFAULT_CONNECT_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.connectTimeout", "15000"); //$NON-NLS-1$ //$NON-NLS-2$
private static final String JRE_READ_TIMEOUT_PROPERTY = "sun.net.client.defaultReadTimeout"; //$NON-NLS-1$
- private static final String DEFAULT_READ_TIMEOUT = "1000"; //$NON-NLS-1$
+ // 10/26/2009: Added being able to set with system property with name org.eclipse.ecf.provider.filetransfer.readTimeout
+ // for https://bugs.eclipse.org/bugs/show_bug.cgi?id=292995
+ private static final String DEFAULT_READ_TIMEOUT = System.getProperty("org.eclipse.ecf.provider.filetransfer.retrieve.readTimeout", "1000"); //$NON-NLS-1$ //$NON-NLS-2$
protected URLConnection urlConnection;

Back to the top