Package org.eclipse.jgit.transport
Class ProtocolV2HookChain
java.lang.Object
org.eclipse.jgit.transport.ProtocolV2HookChain
- All Implemented Interfaces:
ProtocolV2Hook
ProtocolV2Hook that delegates to a list of
other hooks.
Hooks are run in the order passed to the constructor. If running a method on one hook throws an exception, execution of remaining hook methods is aborted.
- Since:
- 5.5
-
Field Summary
FieldsFields inherited from interface org.eclipse.jgit.transport.ProtocolV2Hook
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolV2HooknewChain(List<? extends ProtocolV2Hook> hooks) Create a new hook chaining the given hooks together.voidvoidonFetch(FetchV2Request req) voidonLsRefs(LsRefsV2Request req) void
-
Field Details
-
hooks
-
-
Constructor Details
-
ProtocolV2HookChain
-
-
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.
-
onCapabilities
- Specified by:
onCapabilitiesin interfaceProtocolV2Hook- Parameters:
req- the capabilities request- Throws:
ServiceMayNotContinueException- abort; the message will be sent to the user
-
onLsRefs
- Specified by:
onLsRefsin interfaceProtocolV2Hook- Parameters:
req- the ls-refs request- Throws:
ServiceMayNotContinueException- abort; the message will be sent to the user
-
onFetch
- Specified by:
onFetchin interfaceProtocolV2Hook- Parameters:
req- the fetch request- Throws:
ServiceMayNotContinueException- abort; the message will be sent to the user
-
onObjectInfo
- Specified by:
onObjectInfoin interfaceProtocolV2Hook- Parameters:
req- the object-info request- Throws:
ServiceMayNotContinueException- abort; the message will be sent to the user
-