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 ProtocolV2Hook
newChain
(List<? extends ProtocolV2Hook> hooks) Create a new hook chaining the given hooks together.void
void
onFetch
(FetchV2Request req) void
onLsRefs
(LsRefsV2Request req)
-
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:
onCapabilities
in interfaceProtocolV2Hook
- Parameters:
req
- the capabilities request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-
onLsRefs
- Specified by:
onLsRefs
in interfaceProtocolV2Hook
- Parameters:
req
- the ls-refs request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-
onFetch
- Specified by:
onFetch
in interfaceProtocolV2Hook
- Parameters:
req
- the fetch request- Throws:
ServiceMayNotContinueException
- abort; the message will be sent to the user
-