org.eclipse.jgit.transport
Class AdvertiseRefsHookChain

java.lang.Object
  extended by org.eclipse.jgit.transport.AdvertiseRefsHookChain
All Implemented Interfaces:
AdvertiseRefsHook

public class AdvertiseRefsHookChain
extends 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().


Field Summary
 
Fields inherited from interface org.eclipse.jgit.transport.AdvertiseRefsHook
DEFAULT
 
Method Summary
 void advertiseRefs(BaseReceivePack rp)
          Advertise refs for receive-pack.
 void advertiseRefs(UploadPack rp)
          Advertise refs for upload-pack.
static AdvertiseRefsHook newChain(List<? extends AdvertiseRefsHook> hooks)
          Create a new hook chaining the given hooks together.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newChain

public static AdvertiseRefsHook newChain(List<? extends AdvertiseRefsHook> hooks)
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

public void advertiseRefs(BaseReceivePack rp)
                   throws ServiceMayNotContinueException
Description copied from interface: AdvertiseRefsHook
Advertise refs for receive-pack.

Specified by:
advertiseRefs in interface AdvertiseRefsHook
Parameters:
rp - instance on which to call BaseReceivePack.setAdvertisedRefs(java.util.Map,java.util.Set) if necessary.
Throws:
ServiceMayNotContinueException - abort; the message will be sent to the user.

advertiseRefs

public void advertiseRefs(UploadPack rp)
                   throws ServiceMayNotContinueException
Description copied from interface: AdvertiseRefsHook
Advertise refs for upload-pack.

Specified by:
advertiseRefs in interface AdvertiseRefsHook
Parameters:
rp - instance on which to call UploadPack.setAdvertisedRefs(java.util.Map) if necessary.
Throws:
ServiceMayNotContinueException - abort; the message will be sent to the user.


Copyright © 2013. All Rights Reserved.