org.eclipse.jgit.internal.storage.dfs

## Class BeforeDfsPackIndexLoadedEvent

- java.lang.Object
- - org.eclipse.jgit.events.RepositoryEvent<BeforeDfsPackIndexLoadedListener>
  - - org.eclipse.jgit.internal.storage.dfs.BeforeDfsPackIndexLoadedEvent

    public class BeforeDfsPackIndexLoadedEvent
    extends RepositoryEvent<BeforeDfsPackIndexLoadedListener>

Describes the `DfsPackFile` just before its index is loaded. Currently, DfsPackFile directly dispatches the event on `Repository.getGlobalListenerList()`. Which means the call to `RepositoryEvent.getRepository()` will always return null.

### Constructor Summary

Constructors
Constructor and Description
`BeforeDfsPackIndexLoadedEvent(DfsPackFile pack)` A new event triggered before a PackFile index is loaded.

### Method Summary

Methods
`void` `dispatch(BeforeDfsPackIndexLoadedListener listener)` Dispatch this event to the given listener.
`Class<BeforeDfsPackIndexLoadedListener>` `getListenerType()`
`DfsPackFile` `getPackFile()`

### Methods inherited from class org.eclipse.jgit.events.RepositoryEvent

`getRepository, setRepository, toString`

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

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

### Constructor Detail

#### BeforeDfsPackIndexLoadedEvent

    public BeforeDfsPackIndexLoadedEvent(DfsPackFile pack)

A new event triggered before a PackFile index is loaded.

Parameters:
  `pack` - the pack

### Method Detail

#### getPackFile

    public DfsPackFile getPackFile()

Returns:
  the PackFile containing the index that will be loaded.

#### getListenerType

    public Class<BeforeDfsPackIndexLoadedListener> getListenerType()

Specified by:
  `getListenerType` in class `RepositoryEvent<BeforeDfsPackIndexLoadedListener>`
Returns:
  type of listener this event dispatches to.

#### dispatch

    public void dispatch(BeforeDfsPackIndexLoadedListener listener)

Description copied from class: `RepositoryEvent`
Dispatch this event to the given listener.

Specified by:
  `dispatch` in class `RepositoryEvent<BeforeDfsPackIndexLoadedListener>`
Parameters:
  `listener` - listener that wants this event.