|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.microsoft.tfs.core.clients.versioncontrol.events.VersionControlEventEngine
public final class VersionControlEventEngine
Coordinates listeners and fires events for VersionControlClient
.
Events are processed synchronously: fire*() methods only return after each registered event handler processes the event completely.
This class is thread-safe. fire*() methods do not invoke event
listener methods inside a synchronized block. This is done to prevent any
implementation of an event listener from calling back into this event engine
(through some other VersionControlClient
method which would fire an
event). That might cause deadlock, and is avoided by not locking when
invoking listeners. An effect of this behavior is that an event listener
could be invoked a short time after it was removed by another thread.
Some core methods create new threads to perform work, and events may be fired
by these new threads. To help callers determine which call into core created
these events, each event is accompanied by an EventSource
object
which identifies the original thread.
Event handlers that throw any Throwable
will have the error logged by
the VersionControlEventEngine
and the next handler will be invoked
normally. These errors will not be rethrown by the fire* methods.
Constructor Summary | |
---|---|
VersionControlEventEngine()
|
Method Summary | |
---|---|
void |
addBeforeCheckinListener(BeforeCheckinListener listener)
Add a listener for the event fired before a pending change is checked in. |
void |
addBeforeShelveListener(BeforeShelveListener listener)
Add a listener for the event fired before a pending change is shelved. |
void |
addBranchCommittedListener(BranchCommittedListener listener)
Adds a listener for the event fired when branches are committed. |
void |
addBranchObjectUpdatedListener(BranchObjectUpdatedListener listener)
Adds a listener for the event fired when a branch object is created or modified. |
void |
addChangesetReconciledListener(ChangesetReconciledListener listener)
Add a listener for the event fired when pending changes are reconciled with a checked-in changeset. |
void |
addCheckinListener(CheckinListener listener)
Add a listener for the event fired when a checkin has completed successfully. |
void |
addConflictListener(ConflictListener listener)
Add a listener for the event fired when a conflict is discovered. |
void |
addConflictResolvedListener(ConflictResolvedListener listener)
Add a listener for the event fired when a conflict is resolved. |
void |
addDestroyListener(DestroyListener listener)
Adds a listener for the event fired when an item is destroyed. |
void |
addFolderContentChangedListener(FolderContentChangedListener listener)
Add a listener for the event fired when server folder content is changed without pending changes. |
void |
addGetCompletedListener(GetCompletedListener listener)
Add a listener for the event fired when a get operation completes. |
void |
addGetListener(GetListener listener)
Add a listener for the event fired when a file is retrieved. |
void |
addLocalWorkspaceScanListener(LocalWorkspaceScanListener listener)
Add a listener for the event fired when a change was detected by a local workspace scanner. |
void |
addMergingListener(MergingListener listener)
Add a listener for the event fired when a file is being merged. |
void |
addNewPendingChangeListener(NewPendingChangeListener listener)
Add a listener for the event fired when a change is pended. |
void |
addNonFatalErrorListener(NonFatalErrorListener listener)
Add a listener for the event fired when a non-fatal error is encountered. |
void |
addOperationCompletedListener(OperationCompletedListener listener)
Add a listener for the event fired when a client operation is completed. |
void |
addOperationStartedListener(OperationStartedListener listener)
Add a listener for the event fired when a client operation is started. |
void |
addPendingChangeCandidatesChangedListener(PendingChangeCandidatesChangedListener listener)
Add a listener for the event fired when a pending change candidates list changes. |
void |
addPendingChangesChangedListener(PendingChangesChangedListener listener)
Add a listener for the event fired when the pending changes list changes. |
void |
addScannerModifiedFilesListener(ScannerModifiedFilesListener listener)
Adds a listener for the event fired when the LocalWorkspaceScanner modifies on-disk file information during a
scan. |
void |
addShelveListener(ShelveListener listener)
Add a listener for the event fired when a shelve operation has completed. |
void |
addUndonePendingChangeListener(UndonePendingChangeListener listener)
Add a listener for the event fired when a pending change is undone. |
void |
addWorkspaceCacheFileReloadedListener(WorkspaceCacheFileReloadedListener listener)
Add a listener for the event fired when the Workstation 's
workspace cache is reloaded. |
void |
addWorkspaceCreatedListener(WorkspaceCreatedListener listener)
Add a listener for the event fired when a workspace is created. |
void |
addWorkspaceDeletedListener(WorkspaceDeletedListener listener)
Add a listener for the event fired when a workspace is deleted. |
void |
addWorkspaceUpdatedListener(WorkspaceUpdatedListener listener)
Add a listener for the event fired when a workspace is updated (meaning the workspace data or the working folder mappings are modified.) |
void |
addWorkstationNonFatalErrorListener(WorkstationNonFatalErrorListener listener)
Add a listener for the event fired when a non-fatal error is encountered processing the workstation's cache files. |
void |
clear()
Removes all listeners. |
void |
fireBeforeCheckinPendingChange(PendingChangeEvent event)
Fire an event before a pending change is checked in. |
void |
fireBeforeShelvePendingChange(PendingChangeEvent event)
Fire an event before a pending change is shelved. |
void |
fireBranchCommitted(BranchCommittedEvent event)
Fire an event after a branch has been committed. |
void |
fireBranchObjectUpdated(BranchObjectUpdatedEvent event)
Fire an event after a branch object has been created or modified. |
void |
fireChangesetReconciledEvent(ChangesetReconciledEvent event)
|
void |
fireCheckin(CheckinEvent event)
Fire an event after a checkin has succeeded. |
void |
fireConflict(ConflictEvent event)
Fires an event that signals a conflict was detected. |
void |
fireConflictResolved(ConflictResolvedEvent event)
Fires an event that signals a conflict has been resolved. |
void |
fireDestroyEvent(DestroyEvent event)
|
void |
fireFolderContentChangedEvent(FolderContentChangedEvent event)
|
void |
fireGet(GetEvent event)
Fire an event when a file is retrieved from the server. |
void |
fireGetCompletedEvent(WorkspaceEvent event)
|
void |
fireLocalWorkspaceScanEvent(WorkspaceEvent event)
|
void |
fireMerging(MergingEvent event)
Fires an event that signals a file is being merged. |
void |
fireNewPendingChange(PendingChangeEvent event)
Fire an event when a new change is pended. |
void |
fireNonFatalError(NonFatalErrorEvent event)
|
void |
fireOperationCompleted(OperationCompletedEvent event)
This "fire" method requires the caller construct its own event, because OperationCompletedEvent is abstract and we must use derived classes. |
void |
fireOperationStarted(OperationStartedEvent event)
This "fire" method requires the caller construct its own event, because OperationCompletedEvent is abstract and we must use derived classes. |
void |
firePendingChangeCandidatesChangedEvent(WorkspaceEvent event)
|
void |
firePendingChangesChangedEvent(WorkspaceEvent event)
|
void |
fireScannerModifiedFile(ScannerModifiedFilesEvent event)
|
void |
fireShelve(ShelveEvent event)
Fire an event after a shelve operation has succeeded. |
void |
fireUndonePendingChange(PendingChangeEvent event)
Fire an event when a pending change is undone. |
void |
fireWorkspaceCacheFileReloaded(WorkspaceCacheFileReloadedEvent event)
|
void |
fireWorkspaceCreated(WorkspaceEvent event)
Fire an event when a workspace is created. |
void |
fireWorkspaceDeleted(WorkspaceEvent event)
Fire an event when a workspace is deleted. |
void |
fireWorkspaceUpdated(WorkspaceUpdatedEvent event)
Fire an event when a workspace is updated. |
void |
fireWorkstationNonFatalError(WorkstationNonFatalErrorEvent event)
|
void |
removeBeforeCheckinListener(BeforeCheckinListener listener)
Remove a listener for the event fired before a pending change is checked in. |
void |
removeBeforeShelveListener(BeforeShelveListener listener)
Remove a listener for the event fired before a pending change is shelved. |
void |
removeBranchCommittedListener(BranchCommittedListener listener)
Adds a listener for the event fired when branches are committed. |
void |
removeBranchObjectUpdatedListener(BranchObjectUpdatedListener listener)
Removes a listener for the event fired when a branch object is created or modified. |
void |
removeChangesetReconciledListener(ChangesetReconciledListener listener)
Remove a listener for the event fired when pending changes are reconciled with a checked-in changeset. |
void |
removeCheckinListener(CheckinListener listener)
Remove a listener for the event when a checkin has completed successfully. |
void |
removeConflictListener(ConflictListener listener)
Remove a listener for the event fired when a conflict is discovered. |
void |
removeConflictResolvedListener(ConflictResolvedListener listener)
Remove a listener for the event fired when a conflict is resolved. |
void |
removeDestroyListener(DestroyListener listener)
Removes a listener for the event fired when an item is destroyed. |
void |
removeFolderContentChangedListener(FolderContentChangedListener listener)
Remove a listener for the event fired when server folder content is changed without pending changes. |
void |
removeGetCompletedListener(GetCompletedListener listener)
Remove a listener for the event fired when a get operation completes. |
void |
removeGetListener(GetListener listener)
Remove a listener for the event fired when a file is retrieved. |
void |
removeLocalWorkspaceScanListener(LocalWorkspaceScanListener listener)
Removes a listener for the event fired when a change was detected by a local workspace scanner. |
void |
removeMergingListener(MergingListener listener)
Remove a listener for the event fired when a file is being merged. |
void |
removeNewPendingChangeListener(NewPendingChangeListener listener)
Remove a listener for the event fired when a change is pended. |
void |
removeNonFatalErrorListener(NonFatalErrorListener listener)
Remove a listener for the event fired when a non-fatal error is encountered. |
void |
removeOperationCompletedListener(OperationCompletedListener listener)
Remove a listener for the event fired when a client operation is completed. |
void |
removeOperationStartedListener(OperationStartedListener listener)
Remove a listener for the event fired when a client operation is started. |
void |
removePendingChangeCandidatesChangedListener(PendingChangeCandidatesChangedListener listener)
Remove a listener for the event fired when a pending change candidates list changes. |
void |
removePendingChangesChangedListener(PendingChangesChangedListener listener)
Remove a listener for the event fired when a workspace is created. |
void |
removeScannerModifiedFilesListener(ScannerModifiedFilesListener listener)
Removes a listener for the event fired when the LocalWorkspaceScanner modifies on-disk file information during a
scan. |
void |
removeShelveListener(ShelveListener listener)
Remove a listener for the event when a cshelve operation has completed. |
void |
removeUndonePendingChangeListener(UndonePendingChangeListener listener)
Remove a listener for the event fired when a pending change is undone. |
void |
removeWorkspaceCacheFileReloadedListener(WorkspaceCacheFileReloadedListener listener)
Remove a listener for the event fired when the Workstation 's
workspace cache is reloaded. |
void |
removeWorkspaceCreatedListener(WorkspaceCreatedListener listener)
Remove a listener for the event fired when a workspace is created. |
void |
removeWorkspaceDeletedListener(WorkspaceDeletedListener listener)
Remove a listener for the event fired when a workspace is removed. |
void |
removeWorkspaceUpdatedListener(WorkspaceUpdatedListener listener)
Remove a listener for the event fired when a workspace is updated (meaning the workspace data or the working folder mappings are modified.) |
void |
removeWorkstationNonFatalErrorListener(WorkstationNonFatalErrorListener listener)
Remove a listener for the event fired when a non-fatal error is encountered processing the workstation's cache files. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionControlEventEngine()
Method Detail |
---|
public void fireWorkspaceCreated(WorkspaceEvent event)
public void fireWorkspaceUpdated(WorkspaceUpdatedEvent event)
public void fireWorkspaceDeleted(WorkspaceEvent event)
public void fireNonFatalError(NonFatalErrorEvent event)
public void fireWorkstationNonFatalError(WorkstationNonFatalErrorEvent event)
public void fireGet(GetEvent event)
public void fireNewPendingChange(PendingChangeEvent event)
public void fireUndonePendingChange(PendingChangeEvent event)
public void fireBeforeCheckinPendingChange(PendingChangeEvent event)
public void fireBeforeShelvePendingChange(PendingChangeEvent event)
public void fireBranchCommitted(BranchCommittedEvent event)
public void fireBranchObjectUpdated(BranchObjectUpdatedEvent event)
public void fireScannerModifiedFile(ScannerModifiedFilesEvent event)
public void fireCheckin(CheckinEvent event)
public void fireShelve(ShelveEvent event)
public void fireConflict(ConflictEvent event)
public void fireConflictResolved(ConflictResolvedEvent event)
public void fireOperationStarted(OperationStartedEvent event)
public void fireOperationCompleted(OperationCompletedEvent event)
public void fireMerging(MergingEvent event)
public void fireDestroyEvent(DestroyEvent event)
public void firePendingChangesChangedEvent(WorkspaceEvent event)
public void firePendingChangeCandidatesChangedEvent(WorkspaceEvent event)
public void fireGetCompletedEvent(WorkspaceEvent event)
public void fireFolderContentChangedEvent(FolderContentChangedEvent event)
public void fireChangesetReconciledEvent(ChangesetReconciledEvent event)
public void fireWorkspaceCacheFileReloaded(WorkspaceCacheFileReloadedEvent event)
public void fireLocalWorkspaceScanEvent(WorkspaceEvent event)
public void addWorkspaceCreatedListener(WorkspaceCreatedListener listener)
listener
- the listener to add (must not be null
)public void removeWorkspaceCreatedListener(WorkspaceCreatedListener listener)
listener
- the listener to remove (must not be null
)public void addWorkspaceUpdatedListener(WorkspaceUpdatedListener listener)
listener
- the listener to add (must not be null
)public void removeWorkspaceUpdatedListener(WorkspaceUpdatedListener listener)
listener
- the listener to remove (must not be null
)public void addWorkspaceDeletedListener(WorkspaceDeletedListener listener)
listener
- the listener to add (must not be null
)public void removeWorkspaceDeletedListener(WorkspaceDeletedListener listener)
listener
- the listener to remove (must not be null
)public void addNonFatalErrorListener(NonFatalErrorListener listener)
listener
- the listener to add (must not be null
)public void removeNonFatalErrorListener(NonFatalErrorListener listener)
listener
- the listener to remove (must not be null
)public void addWorkstationNonFatalErrorListener(WorkstationNonFatalErrorListener listener)
listener
- the listener to add (must not be null
)public void removeWorkstationNonFatalErrorListener(WorkstationNonFatalErrorListener listener)
listener
- the listener to remove (must not be null
)public void addGetListener(GetListener listener)
listener
- the listener to add (must not be null
)public void removeGetListener(GetListener listener)
listener
- the listener to remove (must not be null
)public void addNewPendingChangeListener(NewPendingChangeListener listener)
listener
- the listener to add (must not be null
)public void removeNewPendingChangeListener(NewPendingChangeListener listener)
listener
- the listener to remove (must not be null
)public void addUndonePendingChangeListener(UndonePendingChangeListener listener)
listener
- the listener to add (must not be null
)public void removeUndonePendingChangeListener(UndonePendingChangeListener listener)
listener
- the listener to remove (must not be null
)public void addBeforeCheckinListener(BeforeCheckinListener listener)
listener
- the listener to add (must not be null
)public void removeBeforeCheckinListener(BeforeCheckinListener listener)
listener
- the listener to remove (must not be null
)public void addBeforeShelveListener(BeforeShelveListener listener)
listener
- the listener to add (must not be null
)public void removeBeforeShelveListener(BeforeShelveListener listener)
listener
- the listener to remove (must not be null
)public void addCheckinListener(CheckinListener listener)
listener
- the listener to add (must not be null
)public void removeCheckinListener(CheckinListener listener)
listener
- the listener to remove (must not be null
)public void addShelveListener(ShelveListener listener)
listener
- the listener to add (must not be null
)public void removeShelveListener(ShelveListener listener)
listener
- the listener to remove (must not be null
)public void addOperationStartedListener(OperationStartedListener listener)
listener
- the listener to add (must not be null
)public void removeOperationStartedListener(OperationStartedListener listener)
listener
- the listener to remove (must not be null
)public void addOperationCompletedListener(OperationCompletedListener listener)
listener
- the listener to add (must not be null
)public void removeOperationCompletedListener(OperationCompletedListener listener)
listener
- the listener to remove (must not be null
)public void addConflictListener(ConflictListener listener)
listener
- the listener to add (must not be null
)public void removeConflictListener(ConflictListener listener)
listener
- the listener to remove (must not be null
)public void addConflictResolvedListener(ConflictResolvedListener listener)
listener
- the listener to add (must not be null
)public void removeConflictResolvedListener(ConflictResolvedListener listener)
listener
- the listener to remove (must not be null
)public void addMergingListener(MergingListener listener)
listener
- the listener to add (must not be null
)public void removeMergingListener(MergingListener listener)
listener
- the listener to remove (must not be null
)public void addDestroyListener(DestroyListener listener)
listener
- the listener to add (must not be null
)public void removeDestroyListener(DestroyListener listener)
listener
- the listener to remove (must not be null
)public void addBranchCommittedListener(BranchCommittedListener listener)
listener
- the listener to add (must not be null
)public void removeBranchCommittedListener(BranchCommittedListener listener)
listener
- the listener to remove (must not be null
)public void addBranchObjectUpdatedListener(BranchObjectUpdatedListener listener)
listener
- the listener to add (must not be null
)public void removeBranchObjectUpdatedListener(BranchObjectUpdatedListener listener)
listener
- the listener to remove (must not be null
)public void addScannerModifiedFilesListener(ScannerModifiedFilesListener listener)
LocalWorkspaceScanner
modifies on-disk file information during a
scan.
listener
- athe listener to add (must not be null
)public void removeScannerModifiedFilesListener(ScannerModifiedFilesListener listener)
LocalWorkspaceScanner
modifies on-disk file information during a
scan.
listener
- the listener to remove (must not be null
)public void addPendingChangesChangedListener(PendingChangesChangedListener listener)
listener
- the listener to add (must not be null
)public void removePendingChangesChangedListener(PendingChangesChangedListener listener)
listener
- the listener to remove (must not be null
)public void addPendingChangeCandidatesChangedListener(PendingChangeCandidatesChangedListener listener)
listener
- the listener to add (must not be null
)public void removePendingChangeCandidatesChangedListener(PendingChangeCandidatesChangedListener listener)
listener
- the listener to remove (must not be null
)public void addGetCompletedListener(GetCompletedListener listener)
listener
- the listener to add (must not be null
)public void removeGetCompletedListener(GetCompletedListener listener)
listener
- the listener to remove (must not be null
)public void addFolderContentChangedListener(FolderContentChangedListener listener)
listener
- the listener to add (must not be null
)public void removeFolderContentChangedListener(FolderContentChangedListener listener)
listener
- the listener to remove (must not be null
)public void addChangesetReconciledListener(ChangesetReconciledListener listener)
listener
- the listener to add (must not be null
)public void removeChangesetReconciledListener(ChangesetReconciledListener listener)
listener
- the listener to remove (must not be null
)public void addWorkspaceCacheFileReloadedListener(WorkspaceCacheFileReloadedListener listener)
Workstation
's
workspace cache is reloaded.
listener
- the listener to add (must not be null
)public void removeWorkspaceCacheFileReloadedListener(WorkspaceCacheFileReloadedListener listener)
Workstation
's
workspace cache is reloaded.
listener
- the listener to remove (must not be null
)public void addLocalWorkspaceScanListener(LocalWorkspaceScanListener listener)
listener
- the listener to add (must not be null
)public void removeLocalWorkspaceScanListener(LocalWorkspaceScanListener listener)
listener
- the listener to remove (must not be null
)public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |