1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.team.internal.ccvs.core; 12 13 import java.io.IOException; 14 import java.io.InputStream; 15 import java.io.OutputStream; 16 import org.eclipse.core.runtime.IProgressMonitor; 17 import org.eclipse.team.internal.ccvs.core.connection.CVSAuthenticationException; 18 /** 19 * CVS supports different connection methods for communicating between a client and the server. 20 * Furthermore, custom connection methods can be added. Connection methods are added 21 * to the CVS client as an IConnectionMethod, which can be used to create connections of 22 * type IServerConnection. 23 * 24 * @see IConnectionMethod 25 */ 26 public interface IServerConnection { 27 /** 28 * Open a connection to the CVS server. 29 * 30 * Throw CVSAuthenticationException if the username or password is invalid. 31 * Throw IOExceptions for other failures. 32 */ 33 public void open(IProgressMonitor monitor) throws IOException, CVSAuthenticationException; 34 /** 35 * Close the connection 36 * 37 * Throw IOException on failures 38 */ 39 public void close() throws IOException; 40 /** 41 * Get the input stream to receive responses from the server 42 */ 43 public InputStream getInputStream(); 44 /** 45 * Get the output stream to send requests to the server 46 */ 47 public OutputStream getOutputStream(); 48 } 49