Package org.eclipse.jgit.transport
Class PostUploadHookChain
- java.lang.Object
-
- org.eclipse.jgit.transport.PostUploadHookChain
-
- All Implemented Interfaces:
PostUploadHook
public class PostUploadHookChain extends java.lang.Object implements PostUploadHook
PostUploadHook
that delegates to a list of other hooks.Hooks are run in the order passed to the constructor.
- Since:
- 4.1
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PostUploadHook>
hooks
-
Fields inherited from interface org.eclipse.jgit.transport.PostUploadHook
NULL
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PostUploadHookChain(java.util.List<PostUploadHook> hooks)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PostUploadHook
newChain(java.util.List<PostUploadHook> hooks)
Create a new hook chaining the given hooks together.void
onPostUpload(PackStatistics stats)
Notifies the hook that a pack has been sent.
-
-
-
Field Detail
-
hooks
private final java.util.List<PostUploadHook> hooks
-
-
Constructor Detail
-
PostUploadHookChain
private PostUploadHookChain(java.util.List<PostUploadHook> hooks)
-
-
Method Detail
-
newChain
public static PostUploadHook newChain(java.util.List<PostUploadHook> hooks)
Create a new hook chaining the given hooks together.- Parameters:
hooks
- hooks to execute, in order.- Returns:
- a new chain of the given hooks.
-
onPostUpload
public void onPostUpload(PackStatistics stats)
Notifies the hook that a pack has been sent.- Specified by:
onPostUpload
in interfacePostUploadHook
- Parameters:
stats
- the statistics gathered byPackWriter
for the uploaded pack
-
-