diff options
author | Michael Valenta | 2002-12-18 19:00:56 +0000 |
---|---|---|
committer | Michael Valenta | 2002-12-18 19:00:56 +0000 |
commit | 1ca7f65cb7a52871d0b00baaf8b289c3141c6b5f (patch) | |
tree | c9e496f192f7bf25607dd23e18ff319f8675abbf /bundles/org.eclipse.team.cvs.core | |
parent | 2908318af424d052e4d8377b13bbb3f745be465f (diff) | |
download | eclipse.platform.team-1ca7f65cb7a52871d0b00baaf8b289c3141c6b5f.tar.gz eclipse.platform.team-1ca7f65cb7a52871d0b00baaf8b289c3141c6b5f.tar.xz eclipse.platform.team-1ca7f65cb7a52871d0b00baaf8b289c3141c6b5f.zip |
Changes in preparation for SSH2 optimizationsRoot_SSH2_Branch
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core')
3 files changed, 19 insertions, 4 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java index 98c360546..f5fdd7a33 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/IConnectionMethod.java @@ -28,4 +28,18 @@ public interface IConnectionMethod { * (which includes the user name) and the given password. */ public IServerConnection createConnection(ICVSRepositoryLocation location, String password); + + /** + * Some connection method may persist the physical connection to the server + * through several IServerConnections. For example, when making several + * successive connections to the same location using SSH2, it would be very + * expensive to re-connect, re-negotiate and re-authenticate for each + * operation; therefore the SSH2 connection method will create one SSH + * session and open several channels (one for each IServerConnection + * created), and keep the session open until disconnect() is called. + * <p> + * This method actually closes any connection to the indicated location. + * </p> + */ + public void disconnect(ICVSRepositoryLocation location); } diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java index 1b97fc84b..958f90041 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/ExtConnectionMethod.java @@ -5,9 +5,7 @@ package org.eclipse.team.internal.ccvs.core.connection; * All Rights Reserved. */ -import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation; -import org.eclipse.team.internal.ccvs.core.IConnectionMethod; -import org.eclipse.team.internal.ccvs.core.IServerConnection; +import org.eclipse.team.internal.ccvs.core.*; public class ExtConnectionMethod implements IConnectionMethod { /** @@ -23,4 +21,7 @@ public class ExtConnectionMethod implements IConnectionMethod { public IServerConnection createConnection(ICVSRepositoryLocation repositoryRoot, String password) { return new ExtConnection(repositoryRoot, password); } + + public void disconnect(ICVSRepositoryLocation location) { + } }
\ No newline at end of file diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java index 264ba8091..e93b9b76c 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnectionMethod.java @@ -1 +1 @@ -package org.eclipse.team.internal.ccvs.core.connection;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
import org.eclipse.team.internal.ccvs.core.IServerConnection;
public class PServerConnectionMethod implements IConnectionMethod {
/**
* @see IConnectionMethod#createConnection(ICVSRepositoryLocation, String)
*/
public IServerConnection createConnection(ICVSRepositoryLocation location, String password) {
return new PServerConnection(location, password);
}
/**
* @see IConnectionMethod#getName()
*/
public String getName() {
return "pserver";//$NON-NLS-1$
}
}
\ No newline at end of file +package org.eclipse.team.internal.ccvs.core.connection;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation;
import org.eclipse.team.internal.ccvs.core.IConnectionMethod;
import org.eclipse.team.internal.ccvs.core.IServerConnection;
public class PServerConnectionMethod implements IConnectionMethod {
/**
* @see IConnectionMethod#createConnection(ICVSRepositoryLocation, String)
*/
public IServerConnection createConnection(ICVSRepositoryLocation location, String password) {
return new PServerConnection(location, password);
}
/**
* @see IConnectionMethod#getName()
*/
public String getName() {
return "pserver";//$NON-NLS-1$
}
/**
* @see org.eclipse.team.internal.ccvs.core.IConnectionMethod#disconnect(org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation)
*/
public void disconnect(ICVSRepositoryLocation location) {
}
}
\ No newline at end of file |