Top Description Fields Constructors Methods
org.eclipse.jgit.transport

public Class PreReceiveHookChain

extends Object
implements PreReceiveHook
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.PreReceiveHook
Imports
java.util.Collection, .List

org.eclipse.jgit.transport.PreReceiveHook that delegates to a list of other hooks.

Hooks are run in the order passed to the constructor.

Field Summary

Modifier and TypeField and Description
private final int
private final PreReceiveHook[]

Constructor Summary

AccessConstructor and Description
private
PreReceiveHookChain(PreReceiveHook[] hooks, int count)

Method Summary

Modifier and TypeMethod and Description
public static PreReceiveHook

Returns:

a new hook chain of the given hooks.
newChain
(List<? extends PreReceiveHook>
hooks to execute, in order.
hooks
)

Create a new hook chaining the given hooks together.

public void
onPreReceive(ReceivePack
the process handling the current receive. Hooks may obtain details about the destination repository through this handle.
rp
,
Collection<ReceiveCommand>
unmodifiable set of valid commands still pending execution. May be the empty set.
commands
)

Implements org.eclipse.jgit.transport.PreReceiveHook.onPreReceive.

Invoked just before commands are executed.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private final int count
hooksback to summary
private final PreReceiveHook[] hooks

Constructor Detail

PreReceiveHookChainback to summary
private PreReceiveHookChain(PreReceiveHook[] hooks, int count)

Method Detail

newChainback to summary
public static PreReceiveHook newChain(List<? extends PreReceiveHook> hooks)

Create a new hook chaining the given hooks together.

Parameters
hooks:List<? extends PreReceiveHook>

hooks to execute, in order.

Returns:PreReceiveHook

a new hook chain of the given hooks.

onPreReceiveback to summary
public void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands)

Implements org.eclipse.jgit.transport.PreReceiveHook.onPreReceive.

Doc from org.eclipse.jgit.transport.PreReceiveHook.onPreReceive.

Invoked just before commands are executed.

See the class description for how this method can impact execution.

Parameters
rp:ReceivePack

the process handling the current receive. Hooks may obtain details about the destination repository through this handle.

commands:Collection<ReceiveCommand>

unmodifiable set of valid commands still pending execution. May be the empty set.

Annotations
@Override