public class PostReceiveHookChain extends java.lang.Object implements PostReceiveHook
PostReceiveHook
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 PostReceiveHook[] |
hooks |
NULL
Modifier | Constructor and Description |
---|---|
private |
PostReceiveHookChain(PostReceiveHook[] hooks,
int count) |
Modifier and Type | Method and Description |
---|---|
static PostReceiveHook |
newChain(java.util.List<? extends PostReceiveHook> hooks)
Create a new hook chaining the given hooks together.
|
void |
onPostReceive(ReceivePack rp,
java.util.Collection<ReceiveCommand> commands)
Invoked after all commands are executed and status has been returned.
|
private final PostReceiveHook[] hooks
private final int count
private PostReceiveHookChain(PostReceiveHook[] hooks, int count)
public static PostReceiveHook newChain(java.util.List<? extends PostReceiveHook> hooks)
hooks
- hooks to execute, in order.public void onPostReceive(ReceivePack rp, java.util.Collection<ReceiveCommand> commands)
onPostReceive
in interface PostReceiveHook
rp
- the process handling the current receive. Hooks may obtain
details about the destination repository through this handle.commands
- unmodifiable set of successfully completed commands. May be
the empty set.