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
Fields inherited from interface org.eclipse.jgit.transport.ProtocolV2Hook
DEFAULT
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProtocolV2Hook
newChain
(List<? extends ProtocolV2Hook> hooks) Create a new hook chaining the given hooks together.void
Handle capabilities requestvoid
onFetch
(FetchV2Request req) Handle fetch requestvoid
onLsRefs
(LsRefsV2Request req) Handle ls-refs requestvoid
Handle object-info request
-
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
Description copied from interface:ProtocolV2Hook
Handle capabilities request- Specified by:
onCapabilities
in interfaceProtocolV2Hook
- Parameters:
req
- the capabilities request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-
onLsRefs
Description copied from interface:ProtocolV2Hook
Handle ls-refs request- Specified by:
onLsRefs
in interfaceProtocolV2Hook
- Parameters:
req
- the ls-refs request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-
onFetch
Description copied from interface:ProtocolV2Hook
Handle fetch request- Specified by:
onFetch
in interfaceProtocolV2Hook
- Parameters:
req
- the fetch request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-
onObjectInfo
Description copied from interface:ProtocolV2Hook
Handle object-info request- Specified by:
onObjectInfo
in interfaceProtocolV2Hook
- Parameters:
req
- the object-info request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-