public class AdvertiseRefsHookChain extends java.lang.Object implements 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
BaseReceivePack.getAdvertisedRefs() or
BaseReceivePack.getAdvertisedObjects().
| Modifier and Type | Field and Description |
|---|---|
private int |
count |
private AdvertiseRefsHook[] |
hooks |
DEFAULT| Modifier | Constructor and Description |
|---|---|
private |
AdvertiseRefsHookChain(AdvertiseRefsHook[] hooks,
int count) |
| Modifier and Type | Method and Description |
|---|---|
void |
advertiseRefs(BaseReceivePack rp)
Advertise refs for receive-pack.
|
void |
advertiseRefs(UploadPack rp)
Advertise refs for upload-pack.
|
static AdvertiseRefsHook |
newChain(java.util.List<? extends AdvertiseRefsHook> hooks)
Create a new hook chaining the given hooks together.
|
private final AdvertiseRefsHook[] hooks
private final int count
private AdvertiseRefsHookChain(AdvertiseRefsHook[] hooks, int count)
public static AdvertiseRefsHook newChain(java.util.List<? extends AdvertiseRefsHook> hooks)
hooks - hooks to execute, in order.public void advertiseRefs(BaseReceivePack rp) throws ServiceMayNotContinueException
advertiseRefs in interface AdvertiseRefsHookrp - instance on which to call
BaseReceivePack.setAdvertisedRefs(java.util.Map,java.util.Set)
if necessary.ServiceMayNotContinueException - abort; the message will be sent to the user.public void advertiseRefs(UploadPack rp) throws ServiceMayNotContinueException
advertiseRefs in interface AdvertiseRefsHookrp - instance on which to call
UploadPack.setAdvertisedRefs(java.util.Map)
if necessary.ServiceMayNotContinueException - abort; the message will be sent to the user.