The ISVNSession interface provides some extra handling operations over
SVNRepository objects.
For remote accessing a repository (via svn:// and
http:// ) SVNRepository drivers open socket connections to
write and read data from. Session objects (implementing ISVNSession) may
enable an SVNRepository object to use a single socket connection during the
whole runtime, or, as an alternative, to use a new socket connection per each
repository access operation (this slows the speed of operation execution since
the operation needs some extra time for opening and closing a socket).
Also ISVNSession allows to cache and retrieve commit messages during
runtime.
How to set a session object for an SVNRepository driver:
import org.tmatesoft.svn.core.io.ISVNSession;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.SVNURL;
...
ISVNSession session;
...
SVNURL url = SVNURL.parseURIEncoded("svn://host/path/to/repos");
try{
SVNRepository repository = SVNRepositoryFactory.create(url, session);
...
}catch(SVNException svne){
...
}
version: 1.1.1 author: TMate Software Ltd. See Also: SVNRepository See Also: SVNRepositoryFactory |