| |
|
| java.lang.Object org.tmatesoft.svn.core.wc.SVNClientManager
SVNClientManager | public class SVNClientManager implements ISVNRepositoryPool(Code) | | The SVNClientManager class is used to manage SVN*Client
objects as well as for providing them to a user what makes the user's work
easier and his code - pretty clear and flexible.
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:
- If you instantiate an SVN*Client object by yourself
you need to provide a run-time configuration driver -
ISVNOptions -
as well as an authentication and network layers driver -
org.tmatesoft.svn.core.auth.ISVNAuthenticationManager . When
using an SVNClientManager you have multiple choices to provide
and use those drivers:
SVNClientManager clientManager = SVNClientManager.newInstance();
...
ISVNOptions myOptions;
...
SVNClientManager clientManager = SVNClientManager.newInstance(myOptions);
...
ISVNOptions myOptions;
ISVNAuthenticationManager myAuthManager;
...
SVNClientManager clientManager = SVNClientManager.newInstance(myOptions, myAuthManager);
...
ISVNOptions myOptions;
...
SVNClientManager
clientManager = SVNClientManager.newInstance(myOptions, "name", "passw");
Having instantiated an SVNClientManager in one of these ways, all
the SVN*Client objects it will provide you will share those
drivers, so you don't need to code much to provide the same drivers to each
SVN*Client instance by yourself.
- With SVNClientManager you don't need to create and keep your
SVN*Client objects by youself - SVNClientManager will
do all the work for you, so this will certainly bring down your efforts
on coding and your code will be clearer and more flexible. All you need is
to create an SVNClientManager instance.
- Actually every SVN*Client object is instantiated only at
the moment of the first call to an appropriate SVNClientManager's
get method:
SVNClientManager clientManager;
...
SVNUpdateClient updateClient = clientManager.getUpdateClient();
- You can provide a single event handler that will be used by all
SVN*Client objects provided by SVNClientManager:
import org.tmatesoft.svn.core.wc.ISVNEventHandler;
...
ISVNEventHandler commonEventHandler;
SVNClientManager clientManager = SVNClientManager.newInstance();
...
clientManager.setEventHandler(commonEventHandler);
-
version: 1.1.1 author: TMate Software Ltd. See Also: ISVNEventHandler See Also: Examples |
createRepository | public SVNRepository createRepository(SVNURL url, boolean mayReuse) throws SVNException(Code) | | Creates a low-level SVN protocol driver to directly work with
a repository.
The driver created will be set a default
org.tmatesoft.svn.core.auth.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 directoryfor the working session) Parameters: mayReuse - if true then triesfirst tries to find a reusable driver or creates a new reusable one a low-level API driver for direct interactingwith a repository throws: SVNException - |
dispose | public void dispose()(Code) | | |
getAdminClient | public SVNAdminClient getAdminClient()(Code) | | Returns an instance of the
org.tmatesoft.svn.core.wc.admin.SVNAdminClient class.
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.
an SVNAdminClient instance |
getCommitClient | public SVNCommitClient getCommitClient()(Code) | | Returns an instance of the
SVNCommitClient class.
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.
an SVNCommitClient instance |
getCopyClient | public SVNCopyClient getCopyClient()(Code) | | Returns an instance of the
SVNCopyClient class.
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.
an SVNCopyClient instance |
getDebugLog | public ISVNDebugLog getDebugLog()(Code) | | Returns the debug logger currently in use.
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.
a debug logger |
getDiffClient | public SVNDiffClient getDiffClient()(Code) | | Returns an instance of the
SVNDiffClient class.
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.
an SVNDiffClient instance |
getLogClient | public SVNLogClient getLogClient()(Code) | | Returns an instance of the
SVNLogClient class.
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.
an SVNLogClient instance |
getLookClient | public SVNLookClient getLookClient()(Code) | | Returns an instance of the
org.tmatesoft.svn.core.wc.admin.SVNLookClient class.
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.
an SVNLookClient instance |
getMoveClient | public SVNMoveClient getMoveClient()(Code) | | Returns an instance of the
SVNMoveClient class.
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.
an SVNMoveClient instance |
getOptions | public ISVNOptions getOptions()(Code) | | Returns the run-time configuration options driver
which kept by this object.
a run-time options driver |
getStatusClient | public SVNStatusClient getStatusClient()(Code) | | Returns an instance of the
SVNStatusClient class.
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.
an SVNStatusClient instance |
getUpdateClient | public SVNUpdateClient getUpdateClient()(Code) | | Returns an instance of the
SVNUpdateClient class.
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.
an SVNUpdateClient instance |
getWCClient | public SVNWCClient getWCClient()(Code) | | Returns an instance of the
SVNWCClient class.
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.
an SVNWCClient instance |
newInstance | public static SVNClientManager newInstance(ISVNOptions options)(Code) | | Creates a new instance of this class using the provided
ISVNOptions and default
org.tmatesoft.svn.core.auth.ISVNAuthenticationManager drivers.
That means this SVNClientManager will use the caller's configuration options
(which correspond to options found in the default SVN's config
file) and the default SVN's servers configuration and auth storage.
Parameters: options - a config driver a new SVNClientManager instance |
newInstance | public static SVNClientManager newInstance(ISVNOptions options, ISVNAuthenticationManager authManager)(Code) | | Creates a new instance of this class using the provided
ISVNOptions and
org.tmatesoft.svn.core.auth.ISVNAuthenticationManager drivers.
That means this SVNClientManager will use the caller's configuration options
(which correspond to options found in the default SVN's config
file) as well as authentication credentials and servers options (similar to
options found in the default SVN's servers).
Parameters: options - a config driver Parameters: authManager - an authentication driver a new SVNClientManager instance |
newInstance | public static SVNClientManager newInstance(ISVNOptions options, ISVNRepositoryPool repositoryPool)(Code) | | Creates a new instance of this class using the provided
config driver and creator of of SVNRepository objects.
Parameters: options - a config driver Parameters: repositoryPool - a creator of SVNRepository objects a new SVNClientManager instance |
newInstance | public static SVNClientManager newInstance(ISVNOptions options, String userName, String password)(Code) | | Creates a new instance of this class using the provided
ISVNOptions driver and user's credentials to make a default implementation of
org.tmatesoft.svn.core.auth.ISVNAuthenticationManager use them.
That means this SVNClientManager will use the caller's configuration options
(which correspond to options found in the default SVN's config
file), the default SVN's servers configuration and the caller's
credentials.
Parameters: options - a config driver Parameters: userName - a user account name Parameters: password - a user password a new SVNClientManager instance |
setDebugLog | public void setDebugLog(ISVNDebugLog log)(Code) | | Sets a logger to write debug log information to. Sets this same logger
object to all SVN*Client objects instantiated by this
moment.
Parameters: log - a debug logger |
setEventHandler | public void setEventHandler(ISVNEventHandler handler)(Code) | | Sets an event handler to all SVN*Client objects
created and kept by this SVNClientManager.
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 |
shutdownConnections | public void shutdownConnections(boolean shutdownAll)(Code) | | |
|
|
|