Package org.tmatesoft.svn.core.wc
Interface ISVNEventHandler
-
- All Superinterfaces:
ISVNCanceller
- All Known Subinterfaces:
ISVNAdminEventHandler
- All Known Implementing Classes:
JavaHLEventHandler
,SVNAdminBasicClient
,SVNAdminClient
,SVNAdminDumpCommand
,SVNAdminEventAdapter
,SVNAdminListTransactionsCommand
,SVNAdminLoadCommand
,SVNAdminPackCommand
,SVNAdminRecoverCommand
,SVNAdminRemoveTransactionsCommand
,SVNAdminUpgradeCommand
,SVNAdminVerifyCommand
,SVNBasicDelegate
,SVNChangelistClient16
,SVNCommitClient16
,SVNCopyClient16
,SVNCopyDriver
,SVNDiffClient16
,SVNDumpFilterExcludeCommand
,SVNDumpFilterIncludeCommand
,SVNEventAdapter
,SvnLocalOperationRunner
,SVNLogClient16
,SVNLogClient17
,SVNLookClient
,SVNMergeDriver
,SVNMoveClient16
,SvnNgAbstractUpdate
,SvnNgAdd
,SvnNgCanonicalizeUrls
,SvnNgCat
,SvnNgCheckout
,SvnNgCleanup
,SvnNgCommit
,SvnNgDiff
,SvnNgDiffSummarize
,SvnNgDowngrade
,SvnNgExport
,SvnNgGetChangelistPaths
,SvnNgGetInfo
,SvnNgGetMergeInfo
,SvnNgGetProperties
,SvnNgGetStatus
,SvnNgGetStatusSummary
,SvnNgLogMergeInfo
,SvnNgMarkReplaced
,SvnNgMerge
,SvnNgMergePegged
,SvnNgMergeReintegrate
,SvnNgOperationRunner
,SvnNgPatch
,SvnNgRelocate
,SvnNgRemove
,SvnNgReposToReposCopy
,SvnNgReposToWcCopy
,SvnNgResolve
,SvnNgRevert
,SvnNgSetChangelist
,SvnNgSetLock
,SvnNgSetProperty
,SvnNgSuggestMergeSources
,SvnNgSwitch
,SvnNgUnlock
,SvnNgUpdate
,SvnNgUpgrade
,SvnNgWcToReposCopy
,SvnNgWcToWcCopy
,SVNNotifyPrinter
,SvnOldAdd
,SvnOldAnnotate
,SvnOldCanonicalizeUrls
,SvnOldCat
,SvnOldCheckout
,SvnOldCleanup
,SvnOldCommit
,SvnOldCopy
,SvnOldDiff
,SvnOldExport
,SvnOldGetChangelistPaths
,SvnOldGetInfo
,SvnOldGetMergeInfo
,SvnOldGetProperties
,SvnOldGetStatus
,SvnOldGetStatusSummary
,SvnOldImport
,SvnOldList
,SvnOldLogMergeInfo
,SvnOldMarkReplaced
,SvnOldMerge
,SvnOldRelocate
,SvnOldRemoteCopy
,SvnOldRemove
,SvnOldResolve
,SvnOldRevert
,SvnOldRunner
,SvnOldSetChangelist
,SvnOldSetLock
,SvnOldSetProperty
,SvnOldSuggestMergeSources
,SvnOldSwitch
,SvnOldUnlock
,SvnOldUpdate
,SvnOldUpgrade
,SvnOperationRunner
,SvnRemoteAnnotate
,SvnRemoteCat
,SvnRemoteDiff
,SvnRemoteExport
,SvnRemoteGetInfo
,SvnRemoteGetProperties
,SvnRemoteGetRevisionProperties
,SvnRemoteList
,SvnRemoteLog
,SvnRemoteOperationRunner
,SvnRemoteRemoteDelete
,SvnRemoteRemoteMkDir
,SvnRemoteSetLock
,SvnRemoteSetPropertyImpl
,SvnRemoteSetRevisionProperty
,SvnRemoteUnlock
,SvnRepositoryCatImpl
,SvnRepositoryCopyRevisionPropertiesImpl
,SvnRepositoryCreateImpl
,SvnRepositoryDumpImpl
,SvnRepositoryFilterImpl
,SvnRepositoryGetAuthorImpl
,SvnRepositoryGetChangedDirectoriesImpl
,SvnRepositoryGetChangedImpl
,SvnRepositoryGetDateImpl
,SvnRepositoryGetDiffImpl
,SvnRepositoryGetFileSizeImpl
,SvnRepositoryGetHistoryImpl
,SvnRepositoryGetInfoImpl
,SvnRepositoryGetLockImpl
,SvnRepositoryGetLogImpl
,SvnRepositoryGetPropertiesImpl
,SvnRepositoryGetPropertyImpl
,SvnRepositoryGetRevisionPropertiesImpl
,SvnRepositoryGetRevisionPropertyImpl
,SvnRepositoryGetTreeImpl
,SvnRepositoryGetUUIDImpl
,SvnRepositoryGetYoungestImpl
,SvnRepositoryHotCopyImpl
,SvnRepositoryInitializeImpl
,SvnRepositoryListLocksImpl
,SvnRepositoryListTransactionsImpl
,SvnRepositoryLoadImpl
,SvnRepositoryOperationRunner
,SvnRepositoryPackImpl
,SvnRepositoryRecoverImpl
,SvnRepositoryRemoveLocksImpl
,SvnRepositoryRemoveTransactionsImpl
,SVNRepositoryReplicator
,SvnRepositorySetUUIDImpl
,SvnRepositorySynchronizeImpl
,SvnRepositorySyncInfoImpl
,SvnRepositoryUpgradeImpl
,SvnRepositoryVerifyImpl
,SVNStatusClient16
,SVNSyncCopyRevPropsCommand
,SVNSyncInitializeCommand
,SVNSyncSynchronizeCommand
,SVNUpdateClient16
,SVNWCAccess
,SVNWCClient16
public interface ISVNEventHandler extends ISVNCanceller
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){ //handle event here } public void checkCancelled() throws SVNCancelException { //handle cancel of the operation - throw 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.
-
-
Field Summary
Fields Modifier and Type Field Description static double
UNKNOWN
Constant that is currently the value of theprogress
parameter (inhandleEvnt()
)-
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleEvent(SVNEvent event, double progress)
Handles the current event.-
Methods inherited from interface org.tmatesoft.svn.core.ISVNCanceller
checkCancelled
-
-
-
-
Field Detail
-
UNKNOWN
static final double UNKNOWN
Constant that is currently the value of theprogress
parameter (inhandleEvnt()
)- See Also:
- Constant Field Values
-
-
Method Detail
-
handleEvent
void handleEvent(SVNEvent event, double progress) throws SVNException
Handles the current event.Generally all operations represented by do*() methods of SVN*Client objects are followed by generating a sequence of events that are passed to the registered ISVNEventHandler object for custom processing. For example, during an update operation each local item being modified is signaled about by dispatching a specific for this item SVNEvent object to this method where this event can be scrutinized and handled in a desired way.
- Parameters:
event
- the current event that keeps detailed information on the type of action occured and other attributes like path, status, etc.progress
- currently reserved for future use; now it's value is always set toUNKNOWN
- Throws:
SVNException
-
-