1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 04:55:22 +02:00

[225089][ssh][shells][api] Canceling connection leads to exception

https://bugs.eclipse.org/bugs/show_bug.cgi?id=225089
This commit is contained in:
David Dykstal 2008-04-04 14:03:18 +00:00
parent c91dfb4717
commit c13dc278b9
5 changed files with 12 additions and 14 deletions

View file

@ -404,11 +404,8 @@ public abstract class AbstractConnectorService extends RSEModelObject implements
return getPort(); return getPort();
} }
/** /* (non-Javadoc)
* Connects to the target system. * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(org.eclipse.core.runtime.IProgressMonitor)
* Calls {@link #internalConnect(IProgressMonitor)}
* @param monitor a monitor for progress monitoring and cancelation.
* @throws Exception if the connect fails
*/ */
public final void connect(IProgressMonitor monitor) throws Exception { public final void connect(IProgressMonitor monitor) throws Exception {
preConnect(); preConnect();

View file

@ -181,10 +181,7 @@ public abstract class AuthenticatingConnectorService extends AbstractConnectorSe
credentialsProvider.setSuppressed(suppressed); credentialsProvider.setSuppressed(suppressed);
} }
/** /* (non-Javadoc)
* Acquires the credentials by delegating the request to the
* credentials provider.
* @param reacquire if true will cause the credentials to be reobtained if necessary.
* @see org.eclipse.rse.core.subsystems.IConnectorService#acquireCredentials(boolean) * @see org.eclipse.rse.core.subsystems.IConnectorService#acquireCredentials(boolean)
*/ */
public final void acquireCredentials(boolean reacquire) throws OperationCanceledException { public final void acquireCredentials(boolean reacquire) throws OperationCanceledException {

View file

@ -90,7 +90,7 @@ public interface IConnectorService extends IRSEModelObject {
* operation. * operation.
* @throws Exception an exception of there is a failure to connect. * @throws Exception an exception of there is a failure to connect.
* Typically, this will be a {@link SystemMessageException}. * Typically, this will be a {@link SystemMessageException}.
* If the connect was canceled by the user this will be an {@link OperationCanceledException} * @since 3.0 throws an {@link OperationCanceledException} if the connect was canceled by the user
*/ */
public void connect(IProgressMonitor monitor) throws Exception; public void connect(IProgressMonitor monitor) throws Exception;
@ -275,12 +275,13 @@ public interface IConnectorService extends IRSEModelObject {
* by using the {@link #setSuppressed(boolean)}. * by using the {@link #setSuppressed(boolean)}.
* <p> * <p>
* Implementations may retain a remembered credentials or * Implementations may retain a remembered credentials or
* use this acquire the credentials using some implementation defined means. * use this to acquire the credentials using some implementation defined means.
* <p> * <p>
* Throws {@link OperationCanceledException} if acquisition of the * Throws {@link OperationCanceledException} if acquisition of the
* credentials is canceled or is being suppressed. * credentials is canceled or is being suppressed.
* @param refresh if true will force the connector service to discard * @param refresh if true will force the connector service to discard
* any remembered value and reacquire the credentials. * any remembered value and reacquire the credentials.
* @since 3.0 throws OperationCanceledException instead of InterruptedException
*/ */
public void acquireCredentials(boolean refresh) throws OperationCanceledException; public void acquireCredentials(boolean refresh) throws OperationCanceledException;
@ -398,7 +399,7 @@ public interface IConnectorService extends IRSEModelObject {
* If false, allow passwords to be saved in the keychain. * If false, allow passwords to be saved in the keychain.
* @return the number of saved passwords removed by this operation. * @return the number of saved passwords removed by this operation.
* This will always be zero if "deny" is false. * This will always be zero if "deny" is false.
* @since org.eclipse.rse.core 3.0 * @since 3.0 org.eclipse.rse.core
*/ */
public int setDenyPasswordSave(boolean deny); public int setDenyPasswordSave(boolean deny);
@ -406,7 +407,7 @@ public interface IConnectorService extends IRSEModelObject {
* Retrieves the value of the "DENY_PASSWORD_SAVE" property of this connector service. * Retrieves the value of the "DENY_PASSWORD_SAVE" property of this connector service.
* If the value has never been set, this will return false. * If the value has never been set, this will return false.
* @return true if password saving is denied. * @return true if password saving is denied.
* @since org.eclipse.rse.core 3.0 * @since 3.0 org.eclipse.rse.core
*/ */
public boolean getDenyPasswordSave(); public boolean getDenyPasswordSave();

View file

@ -43,6 +43,7 @@ public interface ICredentialsProvider {
* canceled by the user, if the provider is in suppressed state, * canceled by the user, if the provider is in suppressed state,
* a resource (such as the workbench) not being available, * a resource (such as the workbench) not being available,
* or interrupted by some other means. * or interrupted by some other means.
* @since 3.0 throws OperationCanceledException instead of InterruptedException
*/ */
void acquireCredentials(boolean reacquire) throws OperationCanceledException; void acquireCredentials(boolean reacquire) throws OperationCanceledException;
@ -56,6 +57,7 @@ public interface ICredentialsProvider {
* @throws OperationCanceledException if the repair is canceled for some reason. This could * @throws OperationCanceledException if the repair is canceled for some reason. This could
* include the inability of a credentials provider to open a dialog or a dialog being * include the inability of a credentials provider to open a dialog or a dialog being
* canceled. * canceled.
* @since 3.0 throws OperationCanceledException instead of InterruptedException
*/ */
void repairCredentials(SystemMessage message)throws OperationCanceledException; void repairCredentials(SystemMessage message)throws OperationCanceledException;

View file

@ -157,7 +157,7 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
} }
/** /**
* <i>Do not override.</i> * @noimplement
* Acquires the credentials (userid and password) for this connector service. * Acquires the credentials (userid and password) for this connector service.
* The search order for the password is as follows:</p> * The search order for the password is as follows:</p>
* <ol> * <ol>
@ -172,6 +172,7 @@ public class StandardCredentialsProvider extends AbstractCredentialsProvider {
* if the password was found and is valid. * if the password was found and is valid.
* @throws OperationCanceledException if user is prompted and user * @throws OperationCanceledException if user is prompted and user
* cancels that prompt or if {@link #isSuppressed()} is true. * cancels that prompt or if {@link #isSuppressed()} is true.
* @since 3.0 throws {@link OperationCanceledException} rather than {@link InterruptedException}
*/ */
public final void acquireCredentials(boolean reacquire) throws OperationCanceledException { public final void acquireCredentials(boolean reacquire) throws OperationCanceledException {
if (isSuppressed()) { if (isSuppressed()) {