Top Description Fields Methods
org.eclipse.jgit.transport

public Interface PostReceiveHook

Known Direct Implementers
org.eclipse.jgit.transport.PostReceiveHookChain
Imports
java.util.Collection

Hook invoked by org.eclipse.jgit.transport.ReceivePack after all updates are executed.

The hook is called after all commands have been processed. Only commands with a status of org.eclipse.jgit.transport.ReceiveCommand.Result#OK are passed into the hook. To get all commands within the hook, see org.eclipse.jgit.transport.ReceivePack#getAllCommands().

Any post-receive hook implementation should not update the status of a command, as the command has already completed or failed, and the status has already been returned to the client.

Hooks should execute quickly, as they block the server and the client from completing the connection.

Field Summary

Modifier and TypeField and Description
public static final PostReceiveHook
NULL

A simple no-op hook.

Method Summary

Modifier and TypeMethod and Description
public void
onPostReceive(ReceivePack
the process handling the current receive. Hooks may obtain details about the destination repository through this handle.
rp
,
Collection<ReceiveCommand>
unmodifiable set of successfully completed commands. May be the empty set.
commands
)

Invoked after all commands are executed and status has been returned.

Field Detail

NULLback to summary
public static final PostReceiveHook NULL

A simple no-op hook.

Method Detail

onPostReceiveback to summary
public void onPostReceive(ReceivePack rp, Collection<ReceiveCommand> commands)

Invoked after all commands are executed and status has been returned.

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 successfully completed commands. May be the empty set.