Class RemoteFactory
public class RemoteFactory extends Object
- Since:
- 1.9
-
Constructor Summary
Constructors Constructor Description RemoteFactory()
Default constructor.RemoteFactory(String configDirectory, String username, String password, AuthnCallback prompt, ProgressCallback progress, ConfigEvent configHandler, TunnelAgent tunnelAgent)
Initializing constructor.RemoteFactory(String configDirectory, String username, String password, UserPasswordCallback prompt, ProgressCallback progress, ConfigEvent configHandler, TunnelAgent tunnelAgent)
Initializing constructor. -
Method Summary
Modifier and Type Method Description ISVNRemote
openRemoteSession(String url)
Open a persistent session to a repository.ISVNRemote
openRemoteSession(String url, int retryAttempts)
Open a persistent session to a repository.ISVNRemote
openRemoteSession(String url, String reposUUID)
Open a persistent session to a repository.ISVNRemote
openRemoteSession(String url, String reposUUID, int retryAttempts)
Open a persistent session to a repository.void
setConfigDirectory(String configDirectory)
Set directory for the configuration information.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.void
setPassword(String password)
Sets the password used for authentication.void
setProgressCallback(ProgressCallback progress)
Set the progress callback for new sessions.void
setPrompt(AuthnCallback prompt)
Register callback interface to supply username and password on demand.void
setPrompt(UserPasswordCallback prompt)
Register callback interface to supply username and password on demand.void
setTunnelAgent(TunnelAgent tunnelAgent)
Set callbacks for ra_svn tunnel handling.void
setUsername(String username)
Sets the username used for authentication.
-
Constructor Details
-
RemoteFactory
public RemoteFactory()Default constructor. -
RemoteFactory
public RemoteFactory(String configDirectory, String username, String password, AuthnCallback prompt, ProgressCallback progress, ConfigEvent configHandler, TunnelAgent tunnelAgent)Initializing constructor. Any or all of its arguments may be null. -
RemoteFactory
public RemoteFactory(String configDirectory, String username, String password, UserPasswordCallback prompt, ProgressCallback progress, ConfigEvent configHandler, TunnelAgent tunnelAgent)Initializing constructor. Any or all of its arguments may be null.
-
-
Method Details
-
setUsername
Sets the username used for authentication.- Parameters:
username
- The username; Set to thenull
to clear it.- Throws:
IllegalArgumentException
- Ifusername
is empty.- See Also:
#password(String)
-
setPassword
Sets the password used for authentication.- Parameters:
password
- The passwordp Setnull
to clear it.- Throws:
IllegalArgumentException
- Ifpassword
is empty.- See Also:
#username(String)
-
setPrompt
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
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
Set the progress callback for new sessions.- Parameters:
progress
- The progress callback.
-
setConfigDirectory
Set directory for the configuration information. -
setConfigEventHandler
Set an event handler that will be called every time the configuration is loaded by the ISVNRemote objects created by this factory. -
setTunnelAgent
Set callbacks for ra_svn tunnel handling. -
openRemoteSession
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 redirectedSubversionException
- If an URL redirect cycle was detectedClientException
-
openRemoteSession
public ISVNRemote openRemoteSession(String url, int retryAttempts) throws ClientException, SubversionExceptionOpen 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
- IfretryAttempts
is not positiveRetryOpenSession
- If the session URL was redirectedSubversionException
- If an URL redirect cycle was detectedClientException
-
openRemoteSession
public ISVNRemote openRemoteSession(String url, String reposUUID) throws ClientException, SubversionExceptionOpen 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
- IfreposUUID
is null.RetryOpenSession
- If the session URL was redirectedSubversionException
- If an URL redirect cycle was detectedClientException
-
openRemoteSession
public ISVNRemote openRemoteSession(String url, String reposUUID, int retryAttempts) throws ClientException, SubversionExceptionOpen 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
- IfreposUUID
is null orretryAttempts
is not positiveRetryOpenSession
- If the session URL was redirectedSubversionException
- If an URL redirect cycle was detectedClientException
-