public class PreReceiveHookChain extends java.lang.Object implements PreReceiveHook
PreReceiveHook that delegates to a list of
other hooks.
Hooks are run in the order passed to the constructor.
| Modifier and Type | Field and Description |
|---|---|
private int |
count |
private PreReceiveHook[] |
hooks |
NULL| Modifier | Constructor and Description |
|---|---|
private |
PreReceiveHookChain(PreReceiveHook[] hooks,
int count) |
| Modifier and Type | Method and Description |
|---|---|
static PreReceiveHook |
newChain(java.util.List<? extends PreReceiveHook> hooks)
Create a new hook chaining the given hooks together.
|
void |
onPreReceive(ReceivePack rp,
java.util.Collection<ReceiveCommand> commands)
Invoked just before commands are executed.
|
private final PreReceiveHook[] hooks
private final int count
private PreReceiveHookChain(PreReceiveHook[] hooks, int count)
public static PreReceiveHook newChain(java.util.List<? extends PreReceiveHook> hooks)
hooks - hooks to execute, in order.public void onPreReceive(ReceivePack rp, java.util.Collection<ReceiveCommand> commands)
See the class description for how this method can impact execution.
onPreReceive in interface PreReceiveHookrp - the process handling the current receive. Hooks may obtain
details about the destination repository through this handle.commands - unmodifiable set of valid commands still pending execution.
May be the empty set.