org.tmatesoft.svn.core.wc
public class SVNClientManager extends Object implements ISVNRepositoryPool
When you don't have special needs to create, keep and manage separate SVN*Client objects by yourself, you should use SVNClientManager that takes care of all that work for you. These are some of advantages of using SVNClientManager:
//1.default options and authentication drivers to use SVNClientManager clientManager = SVNClientManager.newInstance(); ... //2.provided options and default authentication drivers to use ISVNOptions myOptions; ... SVNClientManager clientManager = SVNClientManager.newInstance(myOptions); ... //3.provided options and authentication drivers to use ISVNOptions myOptions; ISVNAuthenticationManager myAuthManager; ... SVNClientManager clientManager = SVNClientManager.newInstance(myOptions, myAuthManager); ... //4.provided options driver and user's credentials to make //a default authentication driver use them ISVNOptions myOptions; ... SVNClientManager clientManager = SVNClientManager.newInstance(myOptions, "name", "passw");
get
method:
SVNClientManager clientManager; ... //an update client will be created only at that moment when you //first call this method for getting your update client, but if you //have already called it once before, then the method will return //that update client object instantiated in previous... so, it's //quite cheap, you see.. SVNUpdateClient updateClient = clientManager.getUpdateClient();
import org.tmatesoft.svn.core.wc.ISVNEventHandler; ... ISVNEventHandler commonEventHandler; SVNClientManager clientManager = SVNClientManager.newInstance(); ... //will be used by all SVN*Client objects //obtained from your client manager clientManager.setEventHandler(commonEventHandler);
Version: 1.1.1
See Also: ISVNEventHandler Examples
Method Summary | |
---|---|
SVNRepository | createRepository(SVNURL url, boolean mayReuse)
Creates a low-level SVN protocol driver to directly work with
a repository.
|
void | dispose() |
SVNAdminClient | getAdminClient()
Returns an instance of the SVNAdminClient class.
|
SVNCommitClient | getCommitClient()
Returns an instance of the SVNCommitClient class.
|
SVNCopyClient | getCopyClient()
Returns an instance of the SVNCopyClient class.
|
ISVNDebugLog | getDebugLog()
Returns the debug logger currently in use.
|
SVNDiffClient | getDiffClient()
Returns an instance of the SVNDiffClient class.
|
SVNLogClient | getLogClient()
Returns an instance of the SVNLogClient class.
|
SVNLookClient | getLookClient()
Returns an instance of the SVNLookClient class.
|
SVNMoveClient | getMoveClient()
Returns an instance of the SVNMoveClient class.
|
ISVNOptions | getOptions()
Returns the run-time configuration options driver
which kept by this object.
|
SVNStatusClient | getStatusClient()
Returns an instance of the SVNStatusClient class.
|
SVNUpdateClient | getUpdateClient()
Returns an instance of the SVNUpdateClient class.
|
SVNWCClient | getWCClient()
Returns an instance of the SVNWCClient class.
|
static SVNClientManager | newInstance()
Creates a new instance of this class using default ISVNOptions
and ISVNAuthenticationManager drivers.
|
static SVNClientManager | newInstance(ISVNOptions options)
Creates a new instance of this class using the provided ISVNOptions
and default ISVNAuthenticationManager drivers.
|
static SVNClientManager | newInstance(ISVNOptions options, ISVNAuthenticationManager authManager)
Creates a new instance of this class using the provided ISVNOptions
and ISVNAuthenticationManager drivers.
|
static SVNClientManager | newInstance(ISVNOptions options, ISVNRepositoryPool repositoryPool)
Creates a new instance of this class using the provided
config driver and creator of of SVNRepository objects.
|
static SVNClientManager | newInstance(ISVNOptions options, String userName, String password)
Creates a new instance of this class using the provided ISVNOptions
driver and user's credentials to make a default implementation of
ISVNAuthenticationManager use them.
|
void | setAuthenticationManager(ISVNAuthenticationManager authManager) |
void | setCanceller(ISVNCanceller canceller) |
void | setDebugLog(ISVNDebugLog log)
Sets a logger to write debug log information to. |
void | setEventHandler(ISVNEventHandler handler)
Sets an event handler to all SVN*Client objects
created and kept by this SVNClientManager.
|
void | setOptions(ISVNOptions options) |
void | shutdownConnections(boolean shutdownAll) |
The driver created will be set a default ISVNAuthenticationManager manager.
Used by SVN*Client objects (managed by this SVNClientManager) to access a repository when needed.
Parameters: url a repository location to establish a connection with (will be the root directory for the working session) mayReuse if true then tries first tries to find a reusable driver or creates a new reusable one
Returns: a low-level API driver for direct interacting with a repository
Throws: SVNException
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNAdminClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNCommitClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNCopyClient instance
If no debug logger has been specified by the time this call occurs,
a default one (returned by org.tmatesoft.svn.util.SVNDebugLog.getDefaultLog()
)
will be created and used.
Returns: a debug logger
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNDiffClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNLogClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNLookClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNMoveClient instance
Returns: a run-time options driver
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNStatusClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNUpdateClient instance
If it's the first time this method is being called the object is created, initialized and then returned. Further calls to this method will get the same object instantiated at that moment of the first call. SVNClientManager does not reinstantiate its SVN*Client objects.
Returns: an SVNWCClient instance
Returns: a new SVNClientManager instance
Parameters: options a config driver
Returns: a new SVNClientManager instance
Parameters: options a config driver authManager an authentication driver
Returns: a new SVNClientManager instance
Parameters: options a config driver repositoryPool a creator of SVNRepository objects
Returns: a new SVNClientManager instance
Parameters: options a config driver userName a user account name password a user password
Returns: a new SVNClientManager instance
Parameters: log a debug logger
The provided event handler will be set only to only those objects
that have been already created (SVN*Client objects are
instantiated by an SVNClientManager at the moment of the
first call to a get*Client()
method). So, the handler
won't be set for those ones that have never been requested. However
as they are first requested (and thus created) the handler will be
set to them, too, since SVNClientManager is still keeping the handler.
Parameters: handler an event handler