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

public Class ProtocolV2HookChain

extends Object
implements ProtocolV2Hook
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.ProtocolV2Hook
Imports
java.util.Collections, .List, java.util.stream.Collectors

org.eclipse.jgit.transport.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

Modifier and TypeField and Description
private final List<? extends ProtocolV2Hook>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ProtocolV2Hook

Returns:

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

Create a new hook chaining the given hooks together.

public void
onCapabilities(CapabilitiesV2Request
the capabilities request
req
)

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onCapabilities.

Handle capabilities request

public void
onFetch(FetchV2Request
the fetch request
req
)

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onFetch.

Handle fetch request

public void
onLsRefs(LsRefsV2Request
the ls-refs request
req
)

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onLsRefs.

Handle ls-refs request

public void
onObjectInfo(ObjectInfoRequest
the object-info request
req
)

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onObjectInfo.

Handle object-info request

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hooksback to summary
private final List<? extends ProtocolV2Hook> hooks

Constructor Detail

ProtocolV2HookChainback to summary
private ProtocolV2HookChain(List<? extends ProtocolV2Hook> hooks)

Method Detail

newChainback to summary
public static ProtocolV2Hook newChain(List<? extends ProtocolV2Hook> hooks)

Create a new hook chaining the given hooks together.

Parameters
hooks:List<? extends ProtocolV2Hook>

hooks to execute, in order.

Returns:ProtocolV2Hook

a new hook chain of the given hooks.

onCapabilitiesback to summary
public void onCapabilities(CapabilitiesV2Request req) throws ServiceMayNotContinueException

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onCapabilities.

Doc from org.eclipse.jgit.transport.ProtocolV2Hook.onCapabilities.

Handle capabilities request

Parameters
req:CapabilitiesV2Request

the capabilities request

Annotations
@Override
Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user
onFetchback to summary
public void onFetch(FetchV2Request req) throws ServiceMayNotContinueException

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onFetch.

Doc from org.eclipse.jgit.transport.ProtocolV2Hook.onFetch.

Handle fetch request

Parameters
req:FetchV2Request

the fetch request

Annotations
@Override
Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user
onLsRefsback to summary
public void onLsRefs(LsRefsV2Request req) throws ServiceMayNotContinueException

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onLsRefs.

Doc from org.eclipse.jgit.transport.ProtocolV2Hook.onLsRefs.

Handle ls-refs request

Parameters
req:LsRefsV2Request

the ls-refs request

Annotations
@Override
Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user
onObjectInfoback to summary
public void onObjectInfo(ObjectInfoRequest req) throws ServiceMayNotContinueException

Overrides default org.eclipse.jgit.transport.ProtocolV2Hook.onObjectInfo.

Doc from org.eclipse.jgit.transport.ProtocolV2Hook.onObjectInfo.

Handle object-info request

Parameters
req:ObjectInfoRequest

the object-info request

Annotations
@Override
Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user