diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java index bb4caa3cb87..c899272678b 100644 --- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java +++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.java @@ -29,6 +29,7 @@ public class CommonMessages extends NLS { public static String MSG_COMM_AUTH_FAILED; public static String MSG_COMM_AUTH_FAILED_DETAILS; public static String MSG_COMM_NETWORK_ERROR; + public static String MSG_LOCK_TIMEOUT; public static String MSG_EXPAND_FAILED; public static String MSG_EXPAND_CANCELLED; diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties index 78feefcfdcf..4a4d77ba93f 100644 --- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties +++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/CommonMessages.properties @@ -27,6 +27,7 @@ MSG_COMM_AUTH_FAILED_DETAILS=Authentication with {0} failed because the password MSG_COMM_NETWORK_ERROR=Operation failed due to network I/O error ''{0}'' MSG_ERROR_UNEXPECTED=An unexpected error occurred. +MSG_LOCK_TIMEOUT=A timeout occurred while trying to acquire a shared resource. MSG_EXPAND_FAILED = Expand failed. Try again diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java index 84e0bfedada..32f6abfb7b9 100644 --- a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java +++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/ICommonMessageIds.java @@ -48,6 +48,7 @@ public interface ICommonMessageIds { public static final String MSG_EXCEPTION_MOVING = "RSEG1065"; //$NON-NLS-1$ public static final String MSG_ERROR_UNEXPECTED = "RSEG8002"; //$NON-NLS-1$ + public static final String MSG_LOCK_TIMEOUT = "RSEG9999";//FIXME //$NON-NLS-1$ public static final String MSG_COMM_AUTH_FAILED = "RSEC1002"; //$NON-NLS-1$ public static final String MSG_COMM_PWD_INVALID = "RSEC1004"; //$NON-NLS-1$ diff --git a/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java new file mode 100644 index 00000000000..14c7d2a1e46 --- /dev/null +++ b/rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemLockTimeoutException.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2008 Wind River Systems, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Martin Oberhuber (Wind River) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.rse.services.clientserver.messages; + +import org.eclipse.core.runtime.IStatus; + +/** + * Exception thrown when a remote operation requires an exclusive lock on some + * resources, such as a shared Mutex for some channel, and a timeout occurs + * acquiring that resource. + * + * @since 3.0 + */ +public class SystemLockTimeoutException extends SystemMessageException { + + /** + * A serialVersionUID is recommended for all serializable classes. This + * trait is inherited from Throwable. This should be updated if there is a + * schema change for this class. + */ + private static final long serialVersionUID = 1L; + + /** + * . * Default Constructor + * + * @param pluginId ID of the plugin in which the problem occurred. + */ + public SystemLockTimeoutException(String pluginId) { + super(getMyMessage(pluginId, null)); + } + + /** + * Constructor with a detail message. + * + * @param pluginId ID of the plugin in which the problem occurred. + */ + public SystemLockTimeoutException(String pluginId, String detailMsg) { + super(getMyMessage(pluginId, detailMsg)); + } + + private static SystemMessage getMyMessage(String pluginId, String detailMsg) { + return new SimpleSystemMessage(pluginId, ICommonMessageIds.MSG_LOCK_TIMEOUT, IStatus.ERROR, CommonMessages.MSG_LOCK_TIMEOUT, detailMsg); + } + +}