C# Класс NGit.Transport.UploadPack

Implements the server side of a fetch connection, transmitting objects.
Implements the server side of a fetch connection, transmitting objects.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GetAdvertiseRefsHook ( ) : NGit.Transport.AdvertiseRefsHook
GetAdvertisedRefs ( ) : Ref>.IDictionary

Get refs which were advertised to the client.

Get refs which were advertised to the client.

GetLogger ( ) : NGit.Transport.UploadPackLogger
GetPackStatistics ( ) : PackWriter.Statistics

Get the PackWriter's statistics if a pack was sent to the client.

Get the PackWriter's statistics if a pack was sent to the client.

GetPreUploadHook ( ) : PreUploadHook
GetRefFilter ( ) : NGit.Transport.RefFilter
GetRepository ( ) : Repository
GetRequestPolicy ( ) : UploadPack.RequestPolicy
GetRevWalk ( ) : RevWalk
GetTimeout ( ) : int
IsBiDirectionalPipe ( ) : bool
IsSideBand ( ) : bool

Check whether the client expects a side-band stream.

Check whether the client expects a side-band stream.

SendAdvertisedRefs ( NGit.Transport.RefAdvertiser adv ) : void

Generate an advertisement of available refs and capabilities.

Generate an advertisement of available refs and capabilities.

SetAdvertiseRefsHook ( NGit.Transport.AdvertiseRefsHook advertiseRefsHook ) : void

Set the hook used while advertising the refs to the client.

Set the hook used while advertising the refs to the client.

If the AdvertiseRefsHook chooses to call SetAdvertisedRefs(System.Collections.Generic.IDictionary<K, V>) , only refs set by this hook and selected by the RefFilter will be shown to the client.

SetAdvertisedRefs ( Ref>.IDictionary allRefs ) : void

Set the refs advertised by this UploadPack.

Set the refs advertised by this UploadPack.

Intended to be called from a PreUploadHook .

SetBiDirectionalPipe ( bool twoWay ) : void
SetLogger ( NGit.Transport.UploadPackLogger logger ) : void

Set the logger.

Set the logger.

SetPackConfig ( NGit.Storage.Pack.PackConfig pc ) : void

Set the configuration used by the pack generator.

Set the configuration used by the pack generator.

SetPreUploadHook ( PreUploadHook hook ) : void

Set the hook that controls how this instance will behave.

Set the hook that controls how this instance will behave.

SetRefFilter ( NGit.Transport.RefFilter refFilter ) : void

Set the filter used while advertising the refs to the client.

Set the filter used while advertising the refs to the client.

Only refs allowed by this filter will be sent to the client. The filter is run against the refs specified by the AdvertiseRefsHook (if applicable).

SetRequestPolicy ( UploadPack policy ) : void
SetTimeout ( int seconds ) : void

Set the timeout before willing to abort an IO call.

Set the timeout before willing to abort an IO call.

Upload ( InputStream input, OutputStream output, OutputStream messages ) : void

Execute the upload task on the socket.

Execute the upload task on the socket.

UploadPack ( Repository copyFrom ) : System

Create a new pack upload for an open repository.

Create a new pack upload for an open repository.

Приватные методы

Метод Описание
AddCommonBase ( NGit.Revwalk.RevObject o ) : void
CheckNotAdvertisedWants ( ICollection notAdvertisedWants ) : void
GetAdvertisedOrDefaultRefs ( ) : Ref>.IDictionary
Negotiate ( ) : bool
OkToGiveUp ( ) : bool
OkToGiveUpImp ( ) : bool
ProcessHaveLines ( IList peerHas, NGit.ObjectId last ) : NGit.ObjectId
ProcessShallow ( ) : void
RecvWants ( ) : void
ReportErrorDuringNegotiate ( string msg ) : void
ReportInternalServerErrorOverSideband ( Exception error ) : bool
SendPack ( ) : void
SendPack ( bool sideband ) : void
Service ( ) : void
WantSatisfied ( NGit.Revwalk.RevObject want ) : bool

Описание методов

GetAdvertiseRefsHook() публичный Метод

public GetAdvertiseRefsHook ( ) : NGit.Transport.AdvertiseRefsHook
Результат NGit.Transport.AdvertiseRefsHook

GetAdvertisedRefs() публичный Метод

Get refs which were advertised to the client.
Get refs which were advertised to the client.
public GetAdvertisedRefs ( ) : Ref>.IDictionary
Результат Ref>.IDictionary

GetLogger() публичный Метод

public GetLogger ( ) : NGit.Transport.UploadPackLogger
Результат NGit.Transport.UploadPackLogger

GetPackStatistics() публичный Метод

Get the PackWriter's statistics if a pack was sent to the client.
Get the PackWriter's statistics if a pack was sent to the client.
public GetPackStatistics ( ) : PackWriter.Statistics
Результат PackWriter.Statistics

GetPreUploadHook() публичный Метод

public GetPreUploadHook ( ) : PreUploadHook
Результат PreUploadHook

GetRefFilter() публичный Метод

public GetRefFilter ( ) : NGit.Transport.RefFilter
Результат NGit.Transport.RefFilter

GetRepository() публичный Метод

public GetRepository ( ) : Repository
Результат Repository

GetRequestPolicy() публичный Метод

public GetRequestPolicy ( ) : UploadPack.RequestPolicy
Результат UploadPack.RequestPolicy

GetRevWalk() публичный Метод

public GetRevWalk ( ) : RevWalk
Результат RevWalk

GetTimeout() публичный Метод

public GetTimeout ( ) : int
Результат int

IsBiDirectionalPipe() публичный Метод

public IsBiDirectionalPipe ( ) : bool
Результат bool

IsSideBand() публичный Метод

Check whether the client expects a side-band stream.
Check whether the client expects a side-band stream.
/// if the client's request has not yet been read from the wire, so /// we do not know if they expect side-band. Note that the client /// may have already written the request, it just has not been /// read. ///
public IsSideBand ( ) : bool
Результат bool

SendAdvertisedRefs() публичный Метод

Generate an advertisement of available refs and capabilities.
Generate an advertisement of available refs and capabilities.
the formatter failed to write an advertisement. /// the hook denied advertisement.
public SendAdvertisedRefs ( NGit.Transport.RefAdvertiser adv ) : void
adv NGit.Transport.RefAdvertiser the advertisement formatter.
Результат void

SetAdvertiseRefsHook() публичный Метод

Set the hook used while advertising the refs to the client.
Set the hook used while advertising the refs to the client.

If the AdvertiseRefsHook chooses to call SetAdvertisedRefs(System.Collections.Generic.IDictionary<K, V>) , only refs set by this hook and selected by the RefFilter will be shown to the client.

public SetAdvertiseRefsHook ( NGit.Transport.AdvertiseRefsHook advertiseRefsHook ) : void
advertiseRefsHook NGit.Transport.AdvertiseRefsHook the hook; may be null to show all refs.
Результат void

SetAdvertisedRefs() публичный Метод

Set the refs advertised by this UploadPack.
Set the refs advertised by this UploadPack.

Intended to be called from a PreUploadHook .

public SetAdvertisedRefs ( Ref>.IDictionary allRefs ) : void
allRefs Ref>.IDictionary /// explicit set of references to claim as advertised by this /// UploadPack instance. This overrides any references that /// may exist in the source repository. The map is passed /// to the configured /// GetRefFilter() /// . If null, assumes /// all refs were advertised. ///
Результат void

SetBiDirectionalPipe() публичный Метод

public SetBiDirectionalPipe ( bool twoWay ) : void
twoWay bool /// if true, this class will assume the socket is a fully /// bidirectional pipe between the two peers and takes advantage /// of that by first transmitting the known refs, then waiting to /// read commands. If false, this class assumes it must read the /// commands before writing output and does not perform the /// initial advertising. ///
Результат void

SetLogger() публичный Метод

Set the logger.
Set the logger.
public SetLogger ( NGit.Transport.UploadPackLogger logger ) : void
logger NGit.Transport.UploadPackLogger the logger instance. If null, no logging occurs.
Результат void

SetPackConfig() публичный Метод

Set the configuration used by the pack generator.
Set the configuration used by the pack generator.
public SetPackConfig ( NGit.Storage.Pack.PackConfig pc ) : void
pc NGit.Storage.Pack.PackConfig /// configuration controlling packing parameters. If null the /// source repository's settings will be used. ///
Результат void

SetPreUploadHook() публичный Метод

Set the hook that controls how this instance will behave.
Set the hook that controls how this instance will behave.
public SetPreUploadHook ( PreUploadHook hook ) : void
hook PreUploadHook the hook; if null no special actions are taken.
Результат void

SetRefFilter() публичный Метод

Set the filter used while advertising the refs to the client.
Set the filter used while advertising the refs to the client.

Only refs allowed by this filter will be sent to the client. The filter is run against the refs specified by the AdvertiseRefsHook (if applicable).

public SetRefFilter ( NGit.Transport.RefFilter refFilter ) : void
refFilter NGit.Transport.RefFilter the filter; may be null to show all refs.
Результат void

SetRequestPolicy() публичный Метод

public SetRequestPolicy ( UploadPack policy ) : void
policy UploadPack /// the policy used to enforce validation of a client's want list. /// By default the policy is /// RequestPolicy.ADVERTISED /// , /// which is the Git default requiring clients to only ask for an /// object that a reference directly points to. This may be relaxed /// to /// RequestPolicy.REACHABLE_COMMIT /// when callers /// have /// SetBiDirectionalPipe(bool) /// set to false. ///
Результат void

SetTimeout() публичный Метод

Set the timeout before willing to abort an IO call.
Set the timeout before willing to abort an IO call.
public SetTimeout ( int seconds ) : void
seconds int /// number of seconds to wait (with no data transfer occurring) /// before aborting an IO read or write operation with the /// connected client. ///
Результат void

Upload() публичный Метод

Execute the upload task on the socket.
Execute the upload task on the socket.
System.IO.IOException
public Upload ( InputStream input, OutputStream output, OutputStream messages ) : void
input Sharpen.InputStream /// raw input to read client commands from. Caller must ensure the /// input is buffered, otherwise read performance may suffer. ///
output Sharpen.OutputStream /// response back to the Git network client, to write the pack /// data onto. Caller must ensure the output is buffered, /// otherwise write performance may suffer. ///
messages Sharpen.OutputStream /// secondary "notice" channel to send additional messages out /// through. When run over SSH this should be tied back to the /// standard error channel of the command execution. For most /// other network connections this should be null. ///
Результат void

UploadPack() публичный Метод

Create a new pack upload for an open repository.
Create a new pack upload for an open repository.
public UploadPack ( Repository copyFrom ) : System
copyFrom Repository the source repository.
Результат System