View Javadoc
1 /* 2 Bloof - visualize the evolution of your software project 3 Copyright ( C ) 2003 Lukasz Pekacki <lukasz@pekacki.de> 4 http://bloof.sf.net/ 5 6 This file was part of JavaCVS by Nicholas Allen ( nallen@freenet.co.uk ). 7 8 This program is free software; you can redistribute it and/or modify it 9 under the terms of the GNU General Public License. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License along with 17 this program; if not, write to the Free Software Foundation, Inc., 18 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20 $RCSfile: CvsConnection.java,v $ 21 Created on $Date: 2003/05/30 13:52:21 $ 22 */ 23 24 package net.sf.bloof.scm.cvsplugin; 25 26 import java.io.InputStream; 27 import java.io.OutputStream; 28 import java.util.logging.Logger; 29 30 /*** 31 * Defines a connection with a CVS server. A server connection has an input 32 * and an output stream over which to communicate. 33 * @author Nicholas Allen 34 * @author Lukasz Pekacki 35 */ 36 public abstract class CvsConnection { 37 private RepositoryLocation mRepositoryLocation; 38 /*** 39 * Constructs a Connection 40 * @param aLocation specifies the location of the Repository 41 */ 42 public CvsConnection( RepositoryLocation aLocation ) { 43 mRepositoryLocation = aLocation; 44 } 45 46 /*** 47 * Gets the repository location that this connection is connected to 48 * @return RepositoryLocation 49 */ 50 public RepositoryLocation getRepositoryLocation( ) { 51 return mRepositoryLocation; 52 } 53 54 /*** 55 * Gets the input stream from which the client should read server responses from 56 * @return InputStream 57 */ 58 public abstract InputStream getInputStream( ); 59 60 /*** 61 * Gets the output stream over which the client should send its requests to the server 62 * @return OutputStream 63 */ 64 public abstract OutputStream getOutputStream( ); 65 66 /*** 67 * Gets the stream used for displaying error messages. If <code>null</code> then there is not error stream 68 * @return InputStream 69 */ 70 public InputStream getErrorStream( ) { 71 return null; 72 } 73 74 /*** 75 * Closes the connection 76 */ 77 public abstract void close( ); 78 79 /*** 80 * Displays any status messages during creation of the connection. 81 * */ 82 protected void displayStatus( String aMessage ) { 83 if ( aMessage != null ) { 84 sLogger.fine(aMessage); 85 } 86 } 87 private static Logger sLogger = Logger.getLogger( CvsConnection.class.getName() ); 88 89 }

This page was automatically generated by Maven