Package org.eclipse.jgit.transport
Class AdvertiseRefsHookChain
java.lang.Object
org.eclipse.jgit.transport.AdvertiseRefsHookChain
- All Implemented Interfaces:
AdvertiseRefsHook
AdvertiseRefsHook
that delegates to a list
of other hooks.
Hooks are run in the order passed to the constructor. A hook may inspect or
modify the results of the previous hooks in the chain by calling
UploadPack.getAdvertisedRefs()
, or
ReceivePack.getAdvertisedRefs()
or
ReceivePack.getAdvertisedObjects()
.
-
Field Summary
FieldsFields inherited from interface org.eclipse.jgit.transport.AdvertiseRefsHook
DEFAULT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AdvertiseRefsHookChain
(AdvertiseRefsHook[] hooks, int count) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Advertise refs for receive-pack.void
Advertise refs for upload-pack.static AdvertiseRefsHook
newChain
(List<? extends AdvertiseRefsHook> hooks) Create a new hook chaining the given hooks together.
-
Field Details
-
hooks
-
count
private final int count
-
-
Constructor Details
-
AdvertiseRefsHookChain
-
-
Method Details
-
newChain
Create a new hook chaining the given hooks together.- Parameters:
hooks
- hooks to execute, in order.- Returns:
- a new hook chain of the given hooks.
-
advertiseRefs
Advertise refs for receive-pack.- Specified by:
advertiseRefs
in interfaceAdvertiseRefsHook
- Parameters:
rp
- instance on which to callReceivePack.setAdvertisedRefs(java.util.Map,java.util.Set)
if necessary.- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user.IOException
-
advertiseRefs
Advertise refs for upload-pack.- Specified by:
advertiseRefs
in interfaceAdvertiseRefsHook
- Parameters:
rp
- instance on which to callUploadPack.setAdvertisedRefs(java.util.Map)
if necessary.- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user.
-