org.eclipse.jgit.events

## Class RepositoryEvent<T extends RepositoryListener>

- java.lang.Object
- - org.eclipse.jgit.events.RepositoryEvent<T>

Type Parameters:
  `T` - type of listener this event dispatches to.

Direct Known Subclasses:
  BeforeDfsPackIndexLoadedEvent, ConfigChangedEvent, DfsPacksChangedEvent, IndexChangedEvent, RefsChangedEvent

    public abstract class RepositoryEvent<T extends RepositoryListener>
    extends Object

Describes a modification made to a repository.

### Constructor Summary

Constructors
Constructor and Description
`RepositoryEvent()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract void` `dispatch(T listener)` Dispatch this event to the given listener.
`abstract Class<T>` `getListenerType()`
`Repository` `getRepository()`
`void` `setRepository(Repository r)` Set the repository this event occurred on.
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### RepositoryEvent

    public RepositoryEvent()

### Method Detail

#### setRepository

    public void setRepository(Repository r)

Set the repository this event occurred on.

This method should only be invoked once on each event object, and is automatically set by `Repository.fireEvent(RepositoryEvent)`.

Parameters:
  `r` - the repository.

#### getRepository

    public Repository getRepository()

Returns:
  the repository that was changed.

#### getListenerType

    public abstract Class<T> getListenerType()

Returns:
  type of listener this event dispatches to.

#### dispatch

    public abstract void dispatch(T listener)

Dispatch this event to the given listener.

Parameters:
  `listener` - listener that wants this event.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`