Top Description Constructors Methods
org.eclipse.jgit.transport

public abstract Class AbstractAdvertiseRefsHook

extends Object
implements AdvertiseRefsHook
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.transport.AdvertiseRefsHook
Imports
java.io.IOException, java.util.Map, .Set, org.eclipse.jgit.lib.ObjectId, .Ref, .Repository, org.eclipse.jgit.revwalk.RevWalk

Implementation of org.eclipse.jgit.transport.AdvertiseRefsHook that advertises the same refs for upload-pack and receive-pack.
Since
2.0

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
protected Set<ObjectId>
getAdvertisedHaves(Repository
repository instance.
repository
,
RevWalk
open rev walk on the repository.
revWalk
)

Get the additional haves to advertise.

protected abstract Map<String, Ref>

Returns:

set of refs to advertise.
getAdvertisedRefs
(Repository
repository instance.
repository
,
RevWalk
open rev walk on the repository.
revWalk
)

Get the refs to advertise.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractAdvertiseRefsHookback to summary
public AbstractAdvertiseRefsHook()

Method Detail

advertiseRefsback to summary
public void advertiseRefs(UploadPack uploadPack) throws ServiceMayNotContinueException

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

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

Advertise refs for upload-pack.

Parameters
uploadPack: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.
advertiseRefsback to summary
public void advertiseRefs(ReceivePack receivePack) throws IOException

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

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

Advertise refs for receive-pack.

Parameters
receivePack: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
getAdvertisedHavesback to summary
protected Set<ObjectId> getAdvertisedHaves(Repository repository, RevWalk revWalk) throws ServiceMayNotContinueException

Get the additional haves to advertise.

Parameters
repository:Repository

repository instance.

revWalk:RevWalk

open rev walk on the repository.

Returns:Set<ObjectId>

set of additional haves; see org.eclipse.jgit.transport.ReceivePack#getAdvertisedObjects().

Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user.
getAdvertisedRefsback to summary
protected abstract Map<String, Ref> getAdvertisedRefs(Repository repository, RevWalk revWalk) throws ServiceMayNotContinueException

Get the refs to advertise.

Parameters
repository:Repository

repository instance.

revWalk:RevWalk

open rev walk on the repository.

Returns:Map<String, Ref>

set of refs to advertise.

Exceptions
ServiceMayNotContinueException:
abort; the message will be sent to the user.