Top Description Fields Constructors Methods
org.eclipse.jgit.transport

public Class AdvertiseRefsHookChain

extends Object
implements AdvertiseRefsHook
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.AdvertiseRefsHook
Imports
java.io.IOException, java.util.List

org.eclipse.jgit.transport.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 org.eclipse.jgit.transport.UploadPack#getAdvertisedRefs(), or org.eclipse.jgit.transport.ReceivePack#getAdvertisedRefs() or org.eclipse.jgit.transport.ReceivePack#getAdvertisedObjects().

Field Summary

Modifier and TypeField and Description
private final int
private final AdvertiseRefsHook[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
public void
public static AdvertiseRefsHook

Returns:

a new hook chain of the given hooks.
newChain
(List<? extends AdvertiseRefsHook>
hooks to execute, in order.
hooks
)

Create a new hook chaining the given hooks together.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private final int count
hooksback to summary
private final AdvertiseRefsHook[] hooks

Constructor Detail

AdvertiseRefsHookChainback to summary
private AdvertiseRefsHookChain(AdvertiseRefsHook[] hooks, int count)

Method Detail

advertiseRefsback to summary
public void advertiseRefs(ReceivePack rp) throws IOException

Implements org.eclipse.jgit.transport.AdvertiseRefsHook.advertiseRefs.

Doc from org.eclipse.jgit.transport.AdvertiseRefsHook.advertiseRefs.

Advertise refs for receive-pack.

Parameters
rp:ReceivePack

instance on which to call org.eclipse.jgit.transport.ReceivePack#setAdvertisedRefs(java.util.Map, java.util.Set) if necessary.

Annotations
@Override
Exceptions
IOException:
if an IO error occurred
advertiseRefsback to summary
public void advertiseRefs(UploadPack rp) throws ServiceMayNotContinueException

Implements org.eclipse.jgit.transport.AdvertiseRefsHook.advertiseRefs.

Doc from org.eclipse.jgit.transport.AdvertiseRefsHook.advertiseRefs.

Advertise refs for upload-pack.

Parameters
rp:UploadPack

instance on which to call org.eclipse.jgit.transport.UploadPack#setAdvertisedRefs(java.util.Map) if necessary.

Annotations
@Override
Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user.
newChainback to summary
public static AdvertiseRefsHook newChain(List<? extends AdvertiseRefsHook> hooks)

Create a new hook chaining the given hooks together.

Parameters
hooks:List<? extends AdvertiseRefsHook>

hooks to execute, in order.

Returns:AdvertiseRefsHook

a new hook chain of the given hooks.