Class RemoteFactory

java.lang.Object
org.apache.subversion.javahl.remote.RemoteFactory

public class RemoteFactory
extends Object
Factory class for creating ISVNRemote instances.
Since:
1.9
  • Constructor Details

  • Method Details

    • setUsername

      public void setUsername​(String username)
      Sets the username used for authentication.
      Parameters:
      username - The username; Set to the null to clear it.
      Throws:
      IllegalArgumentException - If username is empty.
      See Also:
      #password(String)
    • setPassword

      public void setPassword​(String password)
      Sets the password used for authentication.
      Parameters:
      password - The passwordp Set null to clear it.
      Throws:
      IllegalArgumentException - If password is empty.
      See Also:
      #username(String)
    • setPrompt

      public void setPrompt​(AuthnCallback prompt)
      Register callback interface to supply username and password on demand. This callback can also be used to provide theequivalent of the --no-auth-cache and --non-interactive arguments accepted by the command-line client.
      Parameters:
      prompt - the callback interface
    • setPrompt

      public void setPrompt​(UserPasswordCallback prompt)
      Register callback interface to supply username and password on demand. This callback can also be used to provide theequivalent of the --no-auth-cache and --non-interactive arguments accepted by the command-line client.
      Parameters:
      prompt - the callback interface
    • setProgressCallback

      public void setProgressCallback​(ProgressCallback progress)
      Set the progress callback for new sessions.
      Parameters:
      progress - The progress callback.
    • setConfigDirectory

      public void setConfigDirectory​(String configDirectory)
      Set directory for the configuration information.
    • setConfigEventHandler

      public void setConfigEventHandler​(ConfigEvent configHandler)
      Set an event handler that will be called every time the configuration is loaded by the ISVNRemote objects created by this factory.
    • setTunnelAgent

      public void setTunnelAgent​(TunnelAgent tunnelAgent)
      Set callbacks for ra_svn tunnel handling.
    • openRemoteSession

      public ISVNRemote openRemoteSession​(String url) throws ClientException, SubversionException
      Open a persistent session to a repository.

      Note: The URL can point to a subtree of the repository.

      Note: The session object inherits the progress callback, configuration directory and authentication info.

      Parameters:
      url - The initial session root URL.
      Throws:
      RetryOpenSession - If the session URL was redirected
      SubversionException - If an URL redirect cycle was detected
      ClientException
    • openRemoteSession

      public ISVNRemote openRemoteSession​(String url, int retryAttempts) throws ClientException, SubversionException
      Open a persistent session to a repository.

      Note: The URL can point to a subtree of the repository.

      Note: The session object inherits the progress callback, configuration directory and authentication info.

      Parameters:
      url - The initial session root URL.
      retryAttempts - The number of times to retry the operation if the given URL is redirected.
      Throws:
      IllegalArgumentException - If retryAttempts is not positive
      RetryOpenSession - If the session URL was redirected
      SubversionException - If an URL redirect cycle was detected
      ClientException
    • openRemoteSession

      public ISVNRemote openRemoteSession​(String url, String reposUUID) throws ClientException, SubversionException
      Open a persistent session to a repository.

      Note: The URL can point to a subtree of the repository.

      Note: If the UUID does not match the repository, this function fails.

      Note: The session object inherits the progress callback, configuration directory and authentication info.

      Parameters:
      url - The initial session root URL.
      reposUUID - The expected repository UUID; may not be null..
      Throws:
      IllegalArgumentException - If reposUUID is null.
      RetryOpenSession - If the session URL was redirected
      SubversionException - If an URL redirect cycle was detected
      ClientException
    • openRemoteSession

      public ISVNRemote openRemoteSession​(String url, String reposUUID, int retryAttempts) throws ClientException, SubversionException
      Open a persistent session to a repository.

      Note: The URL can point to a subtree of the repository.

      Note: If the UUID does not match the repository, this function fails.

      Note: The session object inherits the progress callback, configuration directory and authentication info.

      Parameters:
      url - The initial session root URL.
      reposUUID - The expected repository UUID; may not be null..
      retryAttempts - The number of times to retry the operation if the given URL is redirected.
      Throws:
      IllegalArgumentException - If reposUUID is null or retryAttempts is not positive
      RetryOpenSession - If the session URL was redirected
      SubversionException - If an URL redirect cycle was detected
      ClientException