Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

allensoft.javacvs.client
Class CVSClient  view CVSClient download CVSClient.java

java.lang.Object
  extended byallensoft.javacvs.client.CVSClient

public class CVSClient
extends java.lang.Object

This is the main class that implements the CVS client/server protocol. It is used to send requests to the server and process the server's responses. Typical usage is to create a batch of requests to perform and then perform them using the perfromRequestBatch method. For example, to perform a request that commits changes to a file with the log message "Added some new features" you could do this:



        // Create a request batch to add requests to

        CVSRequestBatch batch = new CVSRequestBatch();

        // Add a request to the batch

        batch.addRequest (new CommitRequest (file, new CommitOptions ("Added some new features")));

        // Now try to run the batch of requests. In this example, there is only one request added to the
        // batch but you can add as many as you like. The requests can even be for completely different repositories.

        try
        {
                client.performRequestBatch (batch);	// Perform the batch
        }

        // Catch any problems and tell user

        catch (CVSException e) {...}
        catch (IOException e) {...}

As sending a single request is quite common there is also a more convenient method, performRequest, to do a single request without the requirement of creating a batch first. The above example could have also been written:


        try
        {
                client.performRequest (new CommitRequest (file, new CommitOptions ("Added some new features")));
        }

        // Catch any problems and tell user

        catch (CVSException e) {...}
        catch (IOException e) {...}

The CVSClient also has some other very unique and powerful features. One of those is a batch mode which causes requests to automatically be added to a batch and performed at a later time. This is transparent to any calling code that is trying to perform requests. Batch mode is turned on by calling the enterBatchMode method. The requests that have built up can then be sent by calling sendBatch. Batch mode can also be turned off by calling exitBatchMode but this will mean that none of the requests that have been built up since enterBatchMode will be performed.


Field Summary
private static java.text.DateFormat g_DateFormatter
           
private  RequestAbortedException m_AbortException
           
private  boolean m_bAborted
           
private  java.lang.Object m_BatchLock
           
private  boolean m_bCompressFiles
           
private  boolean m_bPerformingRequests
           
private  boolean m_bUseUnchanged
           
private  CVSConnection m_Connection
           
private  CVSConnectionManager m_ConnectionManager
           
private  CVSRequest m_CurrentRequest
           
private  java.util.Set m_DirectoriesSent
           
private  java.util.Set m_FileDetailsSent
           
private  GlobalOptions m_GlobalOptions
           
private  java.io.FileFilter m_IgnoreFileFilter
           
private  java.io.InputStream m_In
           
private  java.io.File m_LastDirectory
           
private  java.util.ArrayList m_Listeners
           
private  java.lang.Object m_Lock
           
private  LoginManager m_LoginManager
           
private  int m_nZipLevel
           
private  java.io.OutputStream m_Out
           
private  java.lang.StringBuffer m_ReceiveBuffer
           
private  RepositoryLocation m_RepositoryLocation
           
private  CVSRequestBatch m_RequestBatch
           
private  java.lang.String m_sValidRequests
           
private  java.lang.String m_sValidResponses
           
private  java.util.Set m_WorkingDirectoriesStateHasBeenSentFor
           
private static java.util.prefs.Preferences prefs
           
private static allensoft.util.ResourceLoader res
           
static java.lang.String VERSION
          Defines the version of this client.
 
Constructor Summary
CVSClient(CVSConnectionManager connectionManager, LoginManager loginManager)
          Creates a new CVS client that uses the supllied connection manager for creating connections and the supplied login manger for getting login details from the user.
CVSClient(LoginManager loginManager)
          Creates a new CVS client that uses the default connection manager for creating connections and the supplied login manger for getting login details from the user.
 
Method Summary
 void abortRequest()
           
 void abortRequest(RequestAbortedException e)
          Aborts the request(s) currently being performed.
 void addCVSClientListener(allensoft.javacvs.client.event.CVSClientListener listener)
           
private  void clearOptimisationState()
           
private  void closeConnection()
           
 void enterBatchMode()
          Puts this client in batch mode.
 void exitBatchMode()
          Exits batch mode.
(package private)  ExpandModulesResponse expandModules(java.lang.String[] modules)
           
protected  void fireEnteredBatchMode()
           
protected  void fireExitedBatchMode()
           
protected  void fireFinishedRequests()
           
protected  void fireOpenedConnection()
           
protected  void fireReceivedResponse(CVSResponse response)
           
protected  void fireReceivedText(java.lang.String sText)
           
protected  void fireSentText(java.lang.String sText)
           
protected  void fireStartingRequests()
           
protected  void fireStatusUpdate(java.lang.String sText)
           
(package private)  void flush()
          Flushes the output stream to the server.
(package private)  CVSException getAbortException()
           
 CVSRequestBatch getBatch()
          Gets the request batch that will be sent when sendBatch is called.
 CVSConnectionManager getConnectionManager()
          Gets the connection manager this client uses to create connections to a server.
(package private)  java.io.File getCurrentDirectory()
           
 CVSRequest getCurrentRequest()
           
static int getDefaultRemoteZipCompressionLevel()
           
(package private)  java.io.File getFileFromRelativePath(java.lang.String sRelativePath)
          Gets a file from a relative path received from the server.
 GlobalOptions getGlobalOptions()
           
 java.io.FileFilter getIgnoreFileFilter()
          Gets the file filter used to determine if a file should be ignored.
 LoginManager getLoginManager()
          Gets the login manager this client uses to get login details from the user when necessary.
(package private)  java.lang.String getRelativePath(java.io.File file)
          Gets the relative path from this request's working directory to the supplied file.
(package private)  java.lang.String getRelativePath(FileEntry file)
          Gets a relative path to the supplied file entry from this request's working directory.
(package private)  java.lang.String getRelativePath(WorkingDirectory workingDirectory)
          Gets a relative path to the supplied working directory from this request's working directory.
(package private)  RepositoryLocation getRepositoryLocation()
           
private  java.lang.String getResourceString(java.lang.String key)
           
 boolean getUseUnchanged()
           
 java.lang.String getValidResponses()
           
(package private)  GetWrapperRCSOptionsResponse getWrapperRCSOptions()
           
private  boolean isBinaryCharacter(int n)
           
 boolean isInBatchMode()
          Checks if this client is in batch mode.
 boolean isPerformingRequests()
           
 boolean isRequestValid(java.lang.String sRequest)
           
private  void notifyRequestsOfUnsuccessfulConnection(java.util.List requests)
           
private  void openConnection(RepositoryLocation location)
          Establish a connection with the server for the supplied repository location.
 CVSResponse performRequest(CVSRequest request)
           
 CVSResponse performRequest(CVSRequest request, boolean bSendImmediately)
          Performs a request.
 void performRequestBatch(CVSRequestBatch batch)
           
 void performRequestBatch(CVSRequestBatch batch, boolean bSendImmediately)
          Performs a sequential list of requests using only one connection to a server.
(package private)  CVSResponse performSubRequest(CVSRequest request)
          Performs the supplied request without trying to open a connection to the server.
(package private)  void receiveBinaryFile(java.io.File fileToSaveAs)
           
private  void receiveBinaryFile(java.io.OutputStream out)
          Receives a file transmission and outputs it to out.
(package private)  java.lang.String receiveLine()
          Receive a line of text from the server.
(package private)  void receiveTextFile(java.io.File fileToSaveAs)
          Receives a text file from the server.
private  void receiveTextFile(java.io.File file, java.io.Writer out)
          Receives the contents of a text file and writes them to out.
 void removeCVSClientListener(allensoft.javacvs.client.event.CVSClientListener listener)
           
(package private)  void sendArgument(java.io.File file)
           
(package private)  void sendArgument(FileEntry file)
           
(package private)  void sendArgument(java.lang.String sArgument)
           
(package private)  void sendArgument(WorkingDirectory workingDirectory)
           
 void sendBatch()
          Sends the current batch of requests that have built up since enterBatchMode was called and exits batch mode.
private  void sendBinaryFile(java.io.File file)
          Sends the contents of a binary file to the server.
(package private)  void sendCheckinProg(java.lang.String sProg)
           
(package private)  void sendCurrentDirectory()
           
(package private)  void sendDateOption(java.util.Date date)
           
(package private)  void sendDirectory(java.io.File directory, java.lang.String sRepositoryPath)
          Sends a "Directory" command to the server.
(package private)  void sendDirectory(WorkingDirectory workingDirectory)
          Sends a "Directory" command to the server.
(package private)  void sendDirectoryDetails(java.io.File directory)
           
(package private)  void sendDirectoryDetails(java.io.File directory, boolean bRecursive)
           
(package private)  void sendDirectoryDetails(java.io.File directory, boolean bRecursive, FileEntryFilter fileEntryFilter)
           
(package private)  void sendDirectoryDetails(WorkingDirectory workingDir)
           
(package private)  void sendDirectoryDetails(WorkingDirectory workingDir, boolean bRecursive)
           
(package private)  void sendDirectoryDetails(WorkingDirectory workingDir, boolean bRecursive, FileEntryFilter fileEntryFilter)
          Sends the details of an entire working directory to the server.
(package private)  void sendEditNotify(java.io.File file)
           
(package private)  void sendEntry(FileEntry entry)
          Sends an "Entry" command to the server.
(package private)  void sendFileDetails(java.io.File file)
           
(package private)  void sendFileDetails(FileEntry entry)
          Sends the details of a file to the server.
(package private)  void sendFileDetails(java.io.File file, KeywordSubstitutionMode mode)
           
(package private)  void sendGlobalOption(java.lang.String sOption)
           
(package private)  void sendIsModified(java.lang.String sName)
          Sends an "Is-modified" command to the server.
(package private)  void sendKopt(KeywordSubstitutionMode mode)
           
(package private)  void sendLine(java.lang.String sText)
          Sends the supplied text followed by a new line to the server.
(package private)  void sendModified(java.io.File file, boolean isBinary)
          Sends a "Modified" command to the server.
private  void sendNotify(java.io.File file, boolean edit)
           
(package private)  void sendOptions(Options options)
          Sends some options to the server.
(package private)  void sendQuestionable(java.lang.String sName)
           
(package private)  void sendStaticDirectory()
           
(package private)  void sendSticky(java.lang.String sTagSpec)
           
(package private)  void sendText(java.lang.String sText)
          Sends the supplied text to the server.
private  void sendTextFile(java.io.File file)
          Sends the contents of a text file to the server.
(package private)  void sendUnchanged(java.lang.String sName)
           
(package private)  void sendUneditNotify(java.io.File file)
           
(package private)  void sendUpdateProg(java.lang.String sProg)
           
(package private)  void sendWatchActions(WatchActions actions)
           
 void setConnectionManager(CVSConnectionManager manager)
          Sets the connection manager this client uses to create connections to a server.
static void setDefaultRemoteZipCompressionLevel(int n)
           
 void setGlobalOptions(GlobalOptions options)
           
 void setIgnoreFileFilter(java.io.FileFilter filter)
          Sets the file filter used to determine if a file should be ignored.
 void setLoginManager(LoginManager manager)
          Sets the login manager this client uses to get login details from the user when necessary.
 void setUseUnchanged(boolean b)
           
 void setValidResponses(java.lang.String sResponses)
           
(package private)  ValidRequestsResponse validRequests()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefs

private static java.util.prefs.Preferences prefs

res

private static allensoft.util.ResourceLoader res

VERSION

public static final java.lang.String VERSION
Defines the version of this client.

See Also:
Constant Field Values

m_ConnectionManager

private CVSConnectionManager m_ConnectionManager

m_RepositoryLocation

private RepositoryLocation m_RepositoryLocation

m_LoginManager

private LoginManager m_LoginManager

m_Connection

private CVSConnection m_Connection

m_In

private java.io.InputStream m_In

m_Out

private java.io.OutputStream m_Out

m_nZipLevel

private int m_nZipLevel

m_bCompressFiles

private boolean m_bCompressFiles

m_ReceiveBuffer

private java.lang.StringBuffer m_ReceiveBuffer

m_Listeners

private java.util.ArrayList m_Listeners

m_sValidResponses

private java.lang.String m_sValidResponses

m_bUseUnchanged

private boolean m_bUseUnchanged

m_bPerformingRequests

private boolean m_bPerformingRequests

m_CurrentRequest

private CVSRequest m_CurrentRequest

m_Lock

private java.lang.Object m_Lock

m_AbortException

private RequestAbortedException m_AbortException

m_bAborted

private boolean m_bAborted

m_sValidRequests

private java.lang.String m_sValidRequests

m_LastDirectory

private java.io.File m_LastDirectory

g_DateFormatter

private static final java.text.DateFormat g_DateFormatter

m_DirectoriesSent

private java.util.Set m_DirectoriesSent

m_WorkingDirectoriesStateHasBeenSentFor

private java.util.Set m_WorkingDirectoriesStateHasBeenSentFor

m_FileDetailsSent

private java.util.Set m_FileDetailsSent

m_IgnoreFileFilter

private java.io.FileFilter m_IgnoreFileFilter

m_GlobalOptions

private GlobalOptions m_GlobalOptions

m_RequestBatch

private CVSRequestBatch m_RequestBatch

m_BatchLock

private java.lang.Object m_BatchLock
Constructor Detail

CVSClient

public CVSClient(CVSConnectionManager connectionManager,
                 LoginManager loginManager)
Creates a new CVS client that uses the supllied connection manager for creating connections and the supplied login manger for getting login details from the user.


CVSClient

public CVSClient(LoginManager loginManager)
Creates a new CVS client that uses the default connection manager for creating connections and the supplied login manger for getting login details from the user.

Method Detail

getCurrentRequest

public CVSRequest getCurrentRequest()

addCVSClientListener

public void addCVSClientListener(allensoft.javacvs.client.event.CVSClientListener listener)

removeCVSClientListener

public void removeCVSClientListener(allensoft.javacvs.client.event.CVSClientListener listener)

getDefaultRemoteZipCompressionLevel

public static int getDefaultRemoteZipCompressionLevel()

setDefaultRemoteZipCompressionLevel

public static void setDefaultRemoteZipCompressionLevel(int n)

isPerformingRequests

public boolean isPerformingRequests()

getConnectionManager

public CVSConnectionManager getConnectionManager()
Gets the connection manager this client uses to create connections to a server.


setConnectionManager

public void setConnectionManager(CVSConnectionManager manager)
Sets the connection manager this client uses to create connections to a server.


getLoginManager

public LoginManager getLoginManager()
Gets the login manager this client uses to get login details from the user when necessary.


setLoginManager

public void setLoginManager(LoginManager manager)
Sets the login manager this client uses to get login details from the user when necessary.


getValidResponses

public java.lang.String getValidResponses()

setValidResponses

public void setValidResponses(java.lang.String sResponses)

getUseUnchanged

public boolean getUseUnchanged()

setUseUnchanged

public void setUseUnchanged(boolean b)

getIgnoreFileFilter

public java.io.FileFilter getIgnoreFileFilter()
Gets the file filter used to determine if a file should be ignored. The filter should accept files that should not be ignored. This is used only by the client to send questionable commands to the server. It will not actually prevent files from being added to a repository, say, if this filter thinks they should be ignored. If a filter is not set then a CVSIgnoreFileFilter will be returned.


setIgnoreFileFilter

public void setIgnoreFileFilter(java.io.FileFilter filter)
Sets the file filter used to determine if a file should be ignored. The filter should accept files that should not be ignored. This is used only by the client to send questionable commands to the server. It will not actually prevent files from being added to a repository, say, if this filter thinks they should be ignored.


getGlobalOptions

public GlobalOptions getGlobalOptions()

setGlobalOptions

public void setGlobalOptions(GlobalOptions options)

isRequestValid

public boolean isRequestValid(java.lang.String sRequest)

performRequest

public CVSResponse performRequest(CVSRequest request,
                                  boolean bSendImmediately)
                           throws java.io.IOException,
                                  CVSException
Performs a request. This involves sending the request to the server and receiving the response from the server. This is the main method for performing a request and by passing specific request types to this method different requests can be performed. For example, to send a request to update a file:
         client.performRequest (new UpdateRequest (file));
         
There are more convenient methods for performing common requests that build the request object and supply it to this method. If bSendImmediately is true then the request will be sent immediately regardless of whether this client is in batch mode or not.


performRequest

public CVSResponse performRequest(CVSRequest request)
                           throws java.io.IOException,
                                  CVSException

performRequestBatch

public void performRequestBatch(CVSRequestBatch batch,
                                boolean bSendImmediately)
                         throws java.io.IOException,
                                CVSException
Performs a sequential list of requests using only one connection to a server. If the requests have different repository locations then they will be performed in the order they are defined with one connection to each server required. If bSendImmediately is true then the batch will be sent immediately regardless of whether this client is in batch mode or not. After performing the batch you can examine the batch and see which requests completed successfully and which had problems.


notifyRequestsOfUnsuccessfulConnection

private void notifyRequestsOfUnsuccessfulConnection(java.util.List requests)

performRequestBatch

public void performRequestBatch(CVSRequestBatch batch)
                         throws java.io.IOException,
                                CVSException

enterBatchMode

public void enterBatchMode()
Puts this client in batch mode. When in batch mode the client won't actually perform any requests until the sendBatch method is called. This is transparent to any threads that have asked this client to perform requests and they will simply wait until the batch is sent before continuing.


exitBatchMode

public void exitBatchMode()
Exits batch mode. If this is called before sendBatch has been called the the current batch of requests will not be performed.


isInBatchMode

public boolean isInBatchMode()
Checks if this client is in batch mode.


getBatch

public CVSRequestBatch getBatch()
Gets the request batch that will be sent when sendBatch is called.


sendBatch

public void sendBatch()
               throws CVSException,
                      java.io.IOException
Sends the current batch of requests that have built up since enterBatchMode was called and exits batch mode. If the client is not in batch mode then this will do nothing.


abortRequest

public void abortRequest(RequestAbortedException e)
Aborts the request(s) currently being performed.


abortRequest

public void abortRequest()

getAbortException

CVSException getAbortException()

getResourceString

private java.lang.String getResourceString(java.lang.String key)

getCurrentDirectory

java.io.File getCurrentDirectory()

getRepositoryLocation

RepositoryLocation getRepositoryLocation()

getRelativePath

java.lang.String getRelativePath(java.io.File file)
Gets the relative path from this request's working directory to the supplied file.


getRelativePath

java.lang.String getRelativePath(FileEntry file)
Gets a relative path to the supplied file entry from this request's working directory.


getRelativePath

java.lang.String getRelativePath(WorkingDirectory workingDirectory)
Gets a relative path to the supplied working directory from this request's working directory.


getFileFromRelativePath

java.io.File getFileFromRelativePath(java.lang.String sRelativePath)
Gets a file from a relative path received from the server. The file is relative to the current directory specified in the request object that this is the response to.


sendText

void sendText(java.lang.String sText)
        throws java.io.IOException
Sends the supplied text to the server. The text should be in ASCII text as this is all that is supported in the CVS protocol. This is generally used to send a command to the server.


sendLine

void sendLine(java.lang.String sText)
        throws java.io.IOException,
               CVSException
Sends the supplied text followed by a new line to the server.


sendDirectory

void sendDirectory(java.io.File directory,
                   java.lang.String sRepositoryPath)
             throws java.io.IOException,
                    CVSException
Sends a "Directory" command to the server.


sendDirectory

void sendDirectory(WorkingDirectory workingDirectory)
             throws java.io.IOException,
                    CVSException
Sends a "Directory" command to the server.


sendCurrentDirectory

void sendCurrentDirectory()
                    throws CVSException,
                           java.io.IOException

sendStaticDirectory

void sendStaticDirectory()
                   throws java.io.IOException,
                          CVSException

sendSticky

void sendSticky(java.lang.String sTagSpec)
          throws java.io.IOException,
                 CVSException

sendCheckinProg

void sendCheckinProg(java.lang.String sProg)
               throws java.io.IOException,
                      CVSException

sendUpdateProg

void sendUpdateProg(java.lang.String sProg)
              throws java.io.IOException,
                     CVSException

sendEntry

void sendEntry(FileEntry entry)
         throws java.io.IOException,
                CVSException
Sends an "Entry" command to the server.


sendModified

void sendModified(java.io.File file,
                  boolean isBinary)
            throws java.io.IOException,
                   CVSException
Sends a "Modified" command to the server. This tells the server the contents of a file we have on the client.


sendBinaryFile

private void sendBinaryFile(java.io.File file)
                     throws java.io.IOException,
                            CVSException
Sends the contents of a binary file to the server. The contents are not modified in any way.


sendTextFile

private void sendTextFile(java.io.File file)
                   throws java.io.IOException,
                          CVSException
Sends the contents of a text file to the server. The difference between this method and sendBinaryFile is that this will convert any \r\n or just \r to \n (the unix line terminator).


isBinaryCharacter

private boolean isBinaryCharacter(int n)

sendIsModified

void sendIsModified(java.lang.String sName)
              throws java.io.IOException,
                     CVSException
Sends an "Is-modified" command to the server.


sendArgument

void sendArgument(java.lang.String sArgument)
            throws java.io.IOException,
                   CVSException

sendUnchanged

void sendUnchanged(java.lang.String sName)
             throws java.io.IOException,
                    CVSException

sendQuestionable

void sendQuestionable(java.lang.String sName)
                throws java.io.IOException,
                       CVSException

sendArgument

void sendArgument(java.io.File file)
            throws java.io.IOException,
                   CVSException

sendArgument

void sendArgument(FileEntry file)
            throws java.io.IOException,
                   CVSException

sendArgument

void sendArgument(WorkingDirectory workingDirectory)
            throws java.io.IOException,
                   CVSException

sendKopt

void sendKopt(KeywordSubstitutionMode mode)
        throws java.io.IOException,
               CVSException

sendWatchActions

void sendWatchActions(WatchActions actions)
                throws java.io.IOException,
                       CVSException

sendDateOption

void sendDateOption(java.util.Date date)
              throws java.io.IOException,
                     CVSException

sendGlobalOption

void sendGlobalOption(java.lang.String sOption)
                throws java.io.IOException,
                       CVSException

sendNotify

private void sendNotify(java.io.File file,
                        boolean edit)
                 throws java.io.IOException,
                        CVSException

sendEditNotify

void sendEditNotify(java.io.File file)
              throws java.io.IOException,
                     CVSException

sendUneditNotify

void sendUneditNotify(java.io.File file)
                throws java.io.IOException,
                       CVSException

sendFileDetails

void sendFileDetails(FileEntry entry)
               throws java.io.IOException,
                      CVSException
Sends the details of a file to the server. This is an accumulation of a Directory, Entry and Modified (or Unchanged) command.


sendFileDetails

void sendFileDetails(java.io.File file,
                     KeywordSubstitutionMode mode)
               throws java.io.IOException,
                      CVSException

sendFileDetails

void sendFileDetails(java.io.File file)
               throws java.io.IOException,
                      CVSException

sendDirectoryDetails

void sendDirectoryDetails(WorkingDirectory workingDir,
                          boolean bRecursive,
                          FileEntryFilter fileEntryFilter)
                    throws java.io.IOException,
                           CVSException
Sends the details of an entire working directory to the server.


sendDirectoryDetails

void sendDirectoryDetails(WorkingDirectory workingDir,
                          boolean bRecursive)
                    throws java.io.IOException,
                           CVSException

sendDirectoryDetails

void sendDirectoryDetails(WorkingDirectory workingDir)
                    throws java.io.IOException,
                           CVSException

sendDirectoryDetails

void sendDirectoryDetails(java.io.File directory,
                          boolean bRecursive,
                          FileEntryFilter fileEntryFilter)
                    throws java.io.IOException,
                           CVSException

sendDirectoryDetails

void sendDirectoryDetails(java.io.File directory,
                          boolean bRecursive)
                    throws java.io.IOException,
                           CVSException

sendDirectoryDetails

void sendDirectoryDetails(java.io.File directory)
                    throws java.io.IOException,
                           CVSException

sendOptions

void sendOptions(Options options)
           throws java.io.IOException,
                  CVSException
Sends some options to the server.


performSubRequest

CVSResponse performSubRequest(CVSRequest request)
                        throws java.io.IOException,
                               CVSException
Performs the supplied request without trying to open a connection to the server. It assumes the client has already opened a connection to the server.


expandModules

ExpandModulesResponse expandModules(java.lang.String[] modules)
                              throws java.io.IOException,
                                     CVSException

validRequests

ValidRequestsResponse validRequests()
                              throws java.io.IOException,
                                     CVSException

getWrapperRCSOptions

GetWrapperRCSOptionsResponse getWrapperRCSOptions()
                                            throws java.io.IOException,
                                                   CVSException

flush

void flush()
     throws java.io.IOException
Flushes the output stream to the server.


receiveLine

java.lang.String receiveLine()
                       throws java.io.IOException
Receive a line of text from the server.


receiveBinaryFile

private void receiveBinaryFile(java.io.OutputStream out)
                        throws java.io.IOException,
                               CVSException
Receives a file transmission and outputs it to out.


receiveBinaryFile

void receiveBinaryFile(java.io.File fileToSaveAs)
                 throws java.io.IOException,
                        CVSException

receiveTextFile

private void receiveTextFile(java.io.File file,
                             java.io.Writer out)
                      throws java.io.IOException,
                             CVSException
Receives the contents of a text file and writes them to out. This is a helper function for the receiveTextFile(File) method and should not be called anywhere else - hence private. null can be provided to skip over the file contents.


receiveTextFile

void receiveTextFile(java.io.File fileToSaveAs)
               throws java.io.IOException,
                      CVSException
Receives a text file from the server. The lines will be terminated with the platform's line separator. If the user has configured a text file formatters for this file then the formatter will be run to process the file (for example, for indentation style). If there are any problems then an exception will be thrown. If the file existed then it is unlikely it was changed as this method will receive the file contents to a temporary file, the origional file is moved out of the way and this file is moved in to replace it. Should something go wrong during this process the origional file is moved back.


openConnection

private void openConnection(RepositoryLocation location)
                     throws CVSException,
                            java.io.IOException
Establish a connection with the server for the supplied repository location. If a connection already exists and it can be used for this repository then this method will not do anything. Otherwise it will ask the connection manager to make a new connection to the repository.


closeConnection

private void closeConnection()

fireSentText

protected void fireSentText(java.lang.String sText)

fireReceivedText

protected void fireReceivedText(java.lang.String sText)

fireStatusUpdate

protected void fireStatusUpdate(java.lang.String sText)

fireReceivedResponse

protected void fireReceivedResponse(CVSResponse response)

fireStartingRequests

protected void fireStartingRequests()

fireOpenedConnection

protected void fireOpenedConnection()

fireFinishedRequests

protected void fireFinishedRequests()

fireEnteredBatchMode

protected void fireEnteredBatchMode()

fireExitedBatchMode

protected void fireExitedBatchMode()

clearOptimisationState

private void clearOptimisationState()