mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[227406] [dstore] DStoreFileService must listen to buffer size preference changes
This commit is contained in:
parent
386321b71b
commit
121a608ff7
5 changed files with 58 additions and 57 deletions
|
@ -29,6 +29,7 @@
|
||||||
* David McKnight (IBM) - [220123] [api][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) - [220123] [api][dstore] Configurable timeout on irresponsiveness
|
||||||
* David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
|
* David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
|
||||||
* David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
|
* David Dykstal (IBM) - [225089][ssh][shells][api] Canceling connection leads to exception
|
||||||
|
* David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.connectorservice.dstore;
|
package org.eclipse.rse.connectorservice.dstore;
|
||||||
|
@ -125,6 +126,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
private ConnectionStatusListener _connectionStatusListener = null;
|
private ConnectionStatusListener _connectionStatusListener = null;
|
||||||
private IServerLauncher starter = null;
|
private IServerLauncher starter = null;
|
||||||
private IServerLauncherProperties _remoteServerLauncherProperties = null;
|
private IServerLauncherProperties _remoteServerLauncherProperties = null;
|
||||||
|
private boolean _isConnecting = false;
|
||||||
|
|
||||||
// Shortcut to sysInfo to save time
|
// Shortcut to sysInfo to save time
|
||||||
private transient DataElement sysInfo = null;
|
private transient DataElement sysInfo = null;
|
||||||
|
@ -520,9 +522,11 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
*/
|
*/
|
||||||
protected void internalConnect(IProgressMonitor monitor) throws Exception
|
protected void internalConnect(IProgressMonitor monitor) throws Exception
|
||||||
{
|
{
|
||||||
if (isConnected()) {
|
if (isConnected() || _isConnecting) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_isConnecting = true;
|
||||||
|
|
||||||
// set A_PLUGIN_PATH so that dstore picks up the property
|
// set A_PLUGIN_PATH so that dstore picks up the property
|
||||||
setPluginPathProperty();
|
setPluginPathProperty();
|
||||||
|
@ -669,6 +673,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
|
ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
|
||||||
if (provider != null)
|
if (provider != null)
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
if (provider.importCertificates(certs, getHostName()))
|
if (provider.importCertificates(certs, getHostName()))
|
||||||
{
|
{
|
||||||
connect(monitor);
|
connect(monitor);
|
||||||
|
@ -727,12 +732,14 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
}
|
}
|
||||||
if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT))
|
if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT))
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
internalConnect(monitor);
|
internalConnect(monitor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (launchMsg != null && isPortOutOfRange(launchMsg))
|
else if (launchMsg != null && isPortOutOfRange(launchMsg))
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
launchFailed = true;
|
launchFailed = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -771,6 +778,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
if (conE instanceof SSLHandshakeException)
|
if (conE instanceof SSLHandshakeException)
|
||||||
{
|
{
|
||||||
List certs = connectStatus.getUntrustedCertificates();
|
List certs = connectStatus.getUntrustedCertificates();
|
||||||
|
@ -779,6 +787,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
|
ISystemKeystoreProvider provider = SystemKeystoreProviderManager.getInstance().getDefaultProvider();
|
||||||
if (provider != null)
|
if (provider != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (provider.importCertificates(certs, getHostName()))
|
if (provider.importCertificates(certs, getHostName()))
|
||||||
{
|
{
|
||||||
connect(monitor);
|
connect(monitor);
|
||||||
|
@ -807,6 +816,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
}
|
}
|
||||||
if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
|
if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
importCertsAndReconnect(connectStatus, monitor);
|
importCertsAndReconnect(connectStatus, monitor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -851,6 +861,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
connectStatus = launchServer(clientConnection, info, serverLauncher, monitor);
|
connectStatus = launchServer(clientConnection, info, serverLauncher, monitor);
|
||||||
if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
|
if (!connectStatus.isConnected() && connectStatus.isSLLProblem())
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
importCertsAndReconnect(connectStatus, monitor);
|
importCertsAndReconnect(connectStatus, monitor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -871,8 +882,9 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_SSL);
|
DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_SSL);
|
||||||
Display.getDefault().syncExec(msgAction);
|
Display.getDefault().syncExec(msgAction);
|
||||||
if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
|
if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
|
||||||
{
|
{
|
||||||
internalDisconnect(monitor);
|
internalDisconnect(monitor);
|
||||||
|
_isConnecting = false;
|
||||||
throw new InterruptedException();
|
throw new InterruptedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -886,6 +898,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
|
if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
|
||||||
{
|
{
|
||||||
internalDisconnect(monitor);
|
internalDisconnect(monitor);
|
||||||
|
_isConnecting = false;
|
||||||
throw new InterruptedException();
|
throw new InterruptedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -972,12 +985,12 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
|
|
||||||
int keepaliveResponseTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
int keepaliveResponseTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
||||||
if (keepaliveResponseTimeout == 0){ // use the default
|
if (keepaliveResponseTimeout == 0){ // use the default
|
||||||
keepaliveResponseTimeout = IUniversalDStoreConstants.DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT;
|
keepaliveResponseTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
int socketTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
int socketTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
||||||
if (socketTimeout == 0){ // use the default
|
if (socketTimeout == 0){ // use the default
|
||||||
socketTimeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_READ_TIMEOUT;
|
socketTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// these preferences are only for the client
|
// these preferences are only for the client
|
||||||
|
@ -1021,6 +1034,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
{
|
{
|
||||||
if (provider.importCertificates(certs, getHostName()))
|
if (provider.importCertificates(certs, getHostName()))
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
internalConnect(monitor);
|
internalConnect(monitor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1048,6 +1062,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
}
|
}
|
||||||
else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1)
|
else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1)
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
if (launchFailed)
|
if (launchFailed)
|
||||||
{
|
{
|
||||||
clearPassword(true, true);
|
clearPassword(true, true);
|
||||||
|
@ -1085,6 +1100,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
throw connectException;
|
throw connectException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Try to connect again. This is a recursive call, but will only
|
// Try to connect again. This is a recursive call, but will only
|
||||||
// call if the user presses OK on the password prompt dialog, otherwise
|
// call if the user presses OK on the password prompt dialog, otherwise
|
||||||
// it will continue and return
|
// it will continue and return
|
||||||
|
@ -1096,6 +1112,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
// If password has expired and must be changed
|
// If password has expired and must be changed
|
||||||
else if (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
|
else if (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
|
||||||
{
|
{
|
||||||
|
_isConnecting = false;
|
||||||
SystemSignonInformation oldCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
|
SystemSignonInformation oldCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
|
||||||
SystemSignonInformation newCredentials = null;
|
SystemSignonInformation newCredentials = null;
|
||||||
while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
|
while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
|
||||||
|
@ -1117,7 +1134,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
launchMsg = launchStatus.getMessage();
|
launchMsg = launchStatus.getMessage();
|
||||||
}
|
}
|
||||||
if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT))
|
if (launchMsg != null && launchMsg.equals(IDataStoreConstants.ATTEMPT_RECONNECT))
|
||||||
{
|
{
|
||||||
internalConnect(monitor);
|
internalConnect(monitor);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1223,6 +1240,8 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_isConnecting = false;
|
||||||
|
|
||||||
// Check if the user cancelled the prompt
|
// Check if the user cancelled the prompt
|
||||||
if (connectException instanceof OperationCanceledException)
|
if (connectException instanceof OperationCanceledException)
|
||||||
|
@ -1230,6 +1249,7 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
throw connectException;
|
throw connectException;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Try to connect again. This is a recursive call, but will only
|
// Try to connect again. This is a recursive call, but will only
|
||||||
// call if the user presses OK on the password prompt dialog, otherwise
|
// call if the user presses OK on the password prompt dialog, otherwise
|
||||||
// it will continue and return
|
// it will continue and return
|
||||||
|
@ -1239,8 +1259,10 @@ public class DStoreConnectorService extends StandardConnectorService implements
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_isConnecting = false;
|
||||||
throw new SystemMessageException(msg);
|
throw new SystemMessageException(msg);
|
||||||
}
|
}
|
||||||
|
_isConnecting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean isPortOutOfRange(String message)
|
protected boolean isPortOutOfRange(String message)
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
* David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
|
||||||
* David McKnight (IBM) - [221747] Default Connection Timeout is too high
|
* David McKnight (IBM) - [221747] Default Connection Timeout is too high
|
||||||
* David McKnight (IBM) - [228334] [dstore] Default DataStore connection timeout is too short
|
* David McKnight (IBM) - [228334] [dstore] Default DataStore connection timeout is too short
|
||||||
|
* David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.connectorservice.dstore;
|
package org.eclipse.rse.connectorservice.dstore;
|
||||||
|
@ -61,42 +62,27 @@ public interface IUniversalDStoreConstants
|
||||||
|
|
||||||
// RemoteClassLoader caching preferences
|
// RemoteClassLoader caching preferences
|
||||||
public static final String RESID_PREF_CACHE_REMOTE_CLASSES = RESID_PREF_PREFIX + "cacheremoteclasses"; //$NON-NLS-1$
|
public static final String RESID_PREF_CACHE_REMOTE_CLASSES = RESID_PREF_PREFIX + "cacheremoteclasses"; //$NON-NLS-1$
|
||||||
public static final boolean DEFAULT_PREF_CACHE_REMOTE_CLASSES = true;
|
|
||||||
|
// Socket timeout preference
|
||||||
// Socket timeout preference
|
|
||||||
public static final String RESID_PREF_SOCKET_TIMEOUT = RESID_PREF_PREFIX + "sockettimeout"; //$NON-NLS-1$
|
public static final String RESID_PREF_SOCKET_TIMEOUT = RESID_PREF_PREFIX + "sockettimeout"; //$NON-NLS-1$
|
||||||
public static final int DEFAULT_PREF_SOCKET_TIMEOUT = 5000;
|
|
||||||
|
|
||||||
public static final String RESID_PREF_DO_KEEPALIVE = RESID_PREF_PREFIX + "dokeepalive"; //$NON-NLS-1$
|
public static final String RESID_PREF_DO_KEEPALIVE = RESID_PREF_PREFIX + "dokeepalive"; //$NON-NLS-1$
|
||||||
public static final boolean DEFAULT_PREF_DO_KEEPALIVE = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public static final String RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT = RESID_PREF_PREFIX + "keepalivetimeout"; //$NON-NLS-1$
|
public static final String RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT = RESID_PREF_PREFIX + "keepalivetimeout"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
|
||||||
* @since 3.0
|
|
||||||
*/
|
|
||||||
public static final int DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT = 60000;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public static final String RESID_PREF_SOCKET_READ_TIMEOUT = RESID_PREF_PREFIX + "socketreadtimeout"; //$NON-NLS-1$
|
public static final String RESID_PREF_SOCKET_READ_TIMEOUT = RESID_PREF_PREFIX + "socketreadtimeout"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
|
||||||
* @since 3.0
|
|
||||||
*/
|
|
||||||
public static final int DEFAULT_PREF_SOCKET_READ_TIMEOUT = 3600000;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public static final String ALERT_MISMATCHED_SERVER = RESID_PREFIX + "alert.mismatched.server"; //$NON-NLS-1$
|
public static final String ALERT_MISMATCHED_SERVER = RESID_PREFIX + "alert.mismatched.server"; //$NON-NLS-1$
|
||||||
/**
|
|
||||||
* @since 3.0
|
|
||||||
*/
|
|
||||||
public static final boolean DEFAULT_ALERT_MISMATCHED_SERVER = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
||||||
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
|
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
|
||||||
* David McKnight (IBM) - [220123] [api][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) - [220123] [api][dstore] Configurable timeout on irresponsiveness
|
||||||
|
* David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.connectorservice.dstore;
|
package org.eclipse.rse.internal.connectorservice.dstore;
|
||||||
|
@ -57,28 +58,22 @@ public class Activator extends SystemBasePlugin {
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
|
IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
|
||||||
int timeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT;
|
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, 5000);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, timeout);
|
|
||||||
|
|
||||||
// do keepalive
|
// do keepalive
|
||||||
boolean doKeepalive = IUniversalDStoreConstants.DEFAULT_PREF_DO_KEEPALIVE;
|
store.setValue(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE, true);
|
||||||
store.setValue(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE, doKeepalive);
|
|
||||||
|
|
||||||
// socket read timeout
|
// socket read timeout
|
||||||
int socketTimeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_READ_TIMEOUT;
|
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT, 3600000);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT, socketTimeout);
|
|
||||||
|
|
||||||
// keepalive response timeout
|
// keepalive response timeout
|
||||||
int keepaliveTimeout = IUniversalDStoreConstants.DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT;
|
store.setDefault(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT, 60000);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT, keepaliveTimeout);
|
|
||||||
|
|
||||||
// show mismatched server warning
|
// show mismatched server warning
|
||||||
boolean showMismatchedWarning = IUniversalDStoreConstants.DEFAULT_ALERT_MISMATCHED_SERVER;
|
store.setDefault(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER, true);
|
||||||
store.setDefault(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER, showMismatchedWarning);
|
|
||||||
|
|
||||||
// cache remote classes
|
// cache remote classes
|
||||||
boolean cacheRemoteClasses = IUniversalDStoreConstants.DEFAULT_PREF_CACHE_REMOTE_CLASSES;
|
store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, true);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, cacheRemoteClasses);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
|
||||||
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
|
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
|
||||||
* David McKnight (IBM) - [221095] [dstore][launcher] Specified REXEC port number is not used
|
* David McKnight (IBM) - [221095] [dstore][launcher] Specified REXEC port number is not used
|
||||||
|
* David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.connectorservice.dstore;
|
package org.eclipse.rse.internal.connectorservice.dstore;
|
||||||
|
@ -31,7 +32,6 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.dstore.core.client.ClientConnection;
|
import org.eclipse.dstore.core.client.ClientConnection;
|
||||||
import org.eclipse.dstore.core.client.ConnectionStatus;
|
import org.eclipse.dstore.core.client.ConnectionStatus;
|
||||||
import org.eclipse.osgi.util.NLS;
|
import org.eclipse.osgi.util.NLS;
|
||||||
import org.eclipse.rse.connectorservice.dstore.IUniversalDStoreConstants;
|
|
||||||
import org.eclipse.rse.core.model.SystemSignonInformation;
|
import org.eclipse.rse.core.model.SystemSignonInformation;
|
||||||
import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
|
import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
|
||||||
import org.eclipse.rse.core.subsystems.IServerLauncher;
|
import org.eclipse.rse.core.subsystems.IServerLauncher;
|
||||||
|
@ -63,7 +63,7 @@ public class RexecDstoreServer implements IServerLauncher
|
||||||
private boolean isModeChecked = false;
|
private boolean isModeChecked = false;
|
||||||
private boolean checkPort =true;
|
private boolean checkPort =true;
|
||||||
private boolean logInfo = false;
|
private boolean logInfo = false;
|
||||||
private int _socketTimeoutValue = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT;
|
private int _socketTimeoutValue = 5000;
|
||||||
|
|
||||||
private static char[] ebcdictounicode =
|
private static char[] ebcdictounicode =
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
|
* David McKnight (IBM) - [216596] dstore preferences (timeout, and others)
|
||||||
* David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
|
* David McKnight (IBM) - [220123][dstore] Configurable timeout on irresponsiveness
|
||||||
|
* David McKnight (IBM) - [227406] [dstore] DStoreFileService must listen to buffer size preference changes
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
package org.eclipse.rse.internal.connectorservice.dstore.ui.propertypages;
|
package org.eclipse.rse.internal.connectorservice.dstore.ui.propertypages;
|
||||||
|
|
||||||
|
@ -170,7 +171,7 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
timeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
|
timeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
timeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT;
|
timeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, timeout);
|
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT, timeout);
|
||||||
}
|
}
|
||||||
_connectionTimeout.setText(""+timeout); //$NON-NLS-1$
|
_connectionTimeout.setText(""+timeout); //$NON-NLS-1$
|
||||||
|
@ -182,7 +183,7 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
cacheRemoteClasses = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
|
cacheRemoteClasses = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cacheRemoteClasses = IUniversalDStoreConstants.DEFAULT_PREF_CACHE_REMOTE_CLASSES;
|
cacheRemoteClasses = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, cacheRemoteClasses);
|
store.setDefault(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES, cacheRemoteClasses);
|
||||||
}
|
}
|
||||||
_cacheRemoteClassesButton.setSelection(cacheRemoteClasses);
|
_cacheRemoteClassesButton.setSelection(cacheRemoteClasses);
|
||||||
|
@ -194,9 +195,7 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
doKeepalive = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
|
doKeepalive = store.getBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
doKeepalive = IUniversalDStoreConstants.DEFAULT_PREF_DO_KEEPALIVE;
|
doKeepalive = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE, doKeepalive);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
_doKeepaliveButton.setSelection(doKeepalive);
|
_doKeepaliveButton.setSelection(doKeepalive);
|
||||||
|
|
||||||
|
@ -205,8 +204,7 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
socketTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
socketTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
socketTimeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_READ_TIMEOUT;
|
socketTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT, socketTimeout);
|
|
||||||
}
|
}
|
||||||
_socketReadTimeout.setText(""+socketTimeout); //$NON-NLS-1$
|
_socketReadTimeout.setText(""+socketTimeout); //$NON-NLS-1$
|
||||||
_socketReadTimeout.setEnabled(doKeepalive);
|
_socketReadTimeout.setEnabled(doKeepalive);
|
||||||
|
@ -216,8 +214,7 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
keepaliveTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
keepaliveTimeout = store.getInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
keepaliveTimeout = IUniversalDStoreConstants.DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT;
|
keepaliveTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
||||||
store.setDefault(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT, keepaliveTimeout);
|
|
||||||
}
|
}
|
||||||
_keepaliveResponseTimeout.setText(""+keepaliveTimeout); //$NON-NLS-1$
|
_keepaliveResponseTimeout.setText(""+keepaliveTimeout); //$NON-NLS-1$
|
||||||
_keepaliveResponseTimeout.setEnabled(doKeepalive);
|
_keepaliveResponseTimeout.setEnabled(doKeepalive);
|
||||||
|
@ -228,9 +225,7 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
showMismatchedWarning = store.getBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
|
showMismatchedWarning = store.getBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
showMismatchedWarning = IUniversalDStoreConstants.DEFAULT_ALERT_MISMATCHED_SERVER;
|
showMismatchedWarning = store.getDefaultBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
|
||||||
store.setDefault(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER, showMismatchedWarning);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
_showMismatchedServerWarningButton.setSelection(showMismatchedWarning);
|
_showMismatchedServerWarningButton.setSelection(showMismatchedWarning);
|
||||||
}
|
}
|
||||||
|
@ -243,30 +238,33 @@ public class DStorePreferencePage extends PreferencePage implements IWorkbenchPr
|
||||||
protected void performDefaults() {
|
protected void performDefaults() {
|
||||||
super.performDefaults();
|
super.performDefaults();
|
||||||
|
|
||||||
int timeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_TIMEOUT;
|
IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
|
||||||
|
int timeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_TIMEOUT);
|
||||||
_connectionTimeout.setText(""+timeout); //$NON-NLS-1$
|
_connectionTimeout.setText(""+timeout); //$NON-NLS-1$
|
||||||
|
|
||||||
// do keepalive
|
// do keepalive
|
||||||
boolean doKeepalive = IUniversalDStoreConstants.DEFAULT_PREF_DO_KEEPALIVE;
|
boolean doKeepalive = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_DO_KEEPALIVE);
|
||||||
_doKeepaliveButton.setSelection(doKeepalive);
|
_doKeepaliveButton.setSelection(doKeepalive);
|
||||||
|
|
||||||
// socket read timeout
|
// socket read timeout
|
||||||
int socketTimeout = IUniversalDStoreConstants.DEFAULT_PREF_SOCKET_READ_TIMEOUT;
|
int socketTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_SOCKET_READ_TIMEOUT);
|
||||||
|
|
||||||
_socketReadTimeout.setText(""+socketTimeout); //$NON-NLS-1$
|
_socketReadTimeout.setText(""+socketTimeout); //$NON-NLS-1$
|
||||||
_socketReadTimeout.setEnabled(doKeepalive);
|
_socketReadTimeout.setEnabled(doKeepalive);
|
||||||
|
|
||||||
// keepalive response timeout
|
// keepalive response timeout
|
||||||
int keepaliveTimeout = IUniversalDStoreConstants.DEFAULT_PREF_KEEPALIVE_RESPONSE_TIMEOUT;
|
int keepaliveTimeout = store.getDefaultInt(IUniversalDStoreConstants.RESID_PREF_KEEPALIVE_RESPONSE_TIMEOUT);
|
||||||
_keepaliveResponseTimeout.setText(""+keepaliveTimeout); //$NON-NLS-1$
|
_keepaliveResponseTimeout.setText(""+keepaliveTimeout); //$NON-NLS-1$
|
||||||
_keepaliveResponseTimeout.setEnabled(doKeepalive);
|
_keepaliveResponseTimeout.setEnabled(doKeepalive);
|
||||||
|
|
||||||
|
|
||||||
// show mismatched server warning
|
// show mismatched server warning
|
||||||
boolean showMismatchedWarning = IUniversalDStoreConstants.DEFAULT_ALERT_MISMATCHED_SERVER;
|
boolean showMismatchedWarning = store.getDefaultBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER);
|
||||||
_showMismatchedServerWarningButton.setSelection(showMismatchedWarning);
|
_showMismatchedServerWarningButton.setSelection(showMismatchedWarning);
|
||||||
|
|
||||||
// cache remote classes
|
// cache remote classes
|
||||||
boolean cacheRemoteClasses = IUniversalDStoreConstants.DEFAULT_PREF_CACHE_REMOTE_CLASSES;
|
boolean cacheRemoteClasses = store.getDefaultBoolean(IUniversalDStoreConstants.RESID_PREF_CACHE_REMOTE_CLASSES);
|
||||||
_cacheRemoteClassesButton.setSelection(cacheRemoteClasses);
|
_cacheRemoteClassesButton.setSelection(cacheRemoteClasses);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue