The ISVNEventHandler interface should be implemented in
order to be further provided to an SVN*Client
object as a handler of a sequence of events generated by
SVN*Client's do*() methods.
This is a way how a custom event handler can be registered:
import org.tmatesoft.svn.core.wc.ISVNOptions;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
import org.tmatesoft.svn.core.wc.SVNClientManager;
import org.tmatesoft.svn.core.wc.ISVNEventHandler;
...
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
String authName = "myName";
String authPassword = "myPassword";
SVNClientManager clientManager = SVNClientManager.newInstance(options, authName, authPassword);
clientManager.getCommitClient().setEventHandler(new ISVNEventHandler(){
public void handleEvent(SVNEvent event, double progress){
}
public void checkCancelled() throws SVNCancelException {
}
});
or like this:
...
import org.tmatesoft.svn.core.wc.SVNCommitClient;
...
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
SVNCommitClient commitClient = new SVNCommitClient(null, options);
commitClient.setEventHandler(new ISVNEventHandler(){
...
});
All calls to handleEvent() and checkCancelled() methods
are synchronous - that is the caller is blocked till a method
finishes.
version: 1.1.1 author: TMate Software Ltd. See Also: SVNEvent See Also: Examples |