Package com.google.gerrit.common
Interface EventDispatcher
-
- All Known Implementing Classes:
EventBroker
public interface EventDispatcher
Interface for posting (dispatching) Events
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
postEvent(Branch.NameKey branchName, RefEvent event)
Post a stream event that is related to a branchvoid
postEvent(Change change, ChangeEvent event)
Post a stream event that is related to a changevoid
postEvent(Project.NameKey projectName, ProjectEvent event)
Post a stream event that is related to a project.void
postEvent(Event event)
Post a stream event generically.
-
-
-
Method Detail
-
postEvent
void postEvent(Change change, ChangeEvent event) throws com.google.gwtorm.server.OrmException, PermissionBackendException
Post a stream event that is related to a change- Parameters:
change
- The change that the event is related toevent
- The event to post- Throws:
com.google.gwtorm.server.OrmException
- on failure to post the event due to DB errorPermissionBackendException
- on failure of permission checks
-
postEvent
void postEvent(Branch.NameKey branchName, RefEvent event) throws PermissionBackendException
Post a stream event that is related to a branch- Parameters:
branchName
- The branch that the event is related toevent
- The event to post- Throws:
PermissionBackendException
- on failure of permission checks
-
postEvent
void postEvent(Project.NameKey projectName, ProjectEvent event)
Post a stream event that is related to a project.- Parameters:
projectName
- The project that the event is related to.event
- The event to post.
-
postEvent
void postEvent(Event event) throws com.google.gwtorm.server.OrmException, PermissionBackendException
Post a stream event generically.If you are creating a RefEvent or ChangeEvent from scratch, it is more efficient to use the specific postEvent methods for those use cases.
- Parameters:
event
- The event to post.- Throws:
com.google.gwtorm.server.OrmException
- on failure to post the event due to DB errorPermissionBackendException
- on failure of permission checks
-
-