C# Class NGit.Transport.UploadPack

Implements the server side of a fetch connection, transmitting objects.
Implements the server side of a fetch connection, transmitting objects.
Afficher le fichier Open project: red-gate/ngit Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

GetAdvertiseRefsHook() public méthode

public GetAdvertiseRefsHook ( ) : NGit.Transport.AdvertiseRefsHook
Résultat NGit.Transport.AdvertiseRefsHook

GetAdvertisedRefs() public méthode

Get refs which were advertised to the client.
Get refs which were advertised to the client.
public GetAdvertisedRefs ( ) : Ref>.IDictionary
Résultat Ref>.IDictionary

GetLogger() public méthode

public GetLogger ( ) : NGit.Transport.UploadPackLogger
Résultat NGit.Transport.UploadPackLogger

GetPackStatistics() public méthode

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
Résultat PackWriter.Statistics

GetPreUploadHook() public méthode

public GetPreUploadHook ( ) : PreUploadHook
Résultat PreUploadHook

GetRefFilter() public méthode

public GetRefFilter ( ) : NGit.Transport.RefFilter
Résultat NGit.Transport.RefFilter

GetRepository() public méthode

public GetRepository ( ) : Repository
Résultat Repository

GetRequestPolicy() public méthode

public GetRequestPolicy ( ) : UploadPack.RequestPolicy
Résultat UploadPack.RequestPolicy

GetRevWalk() public méthode

public GetRevWalk ( ) : RevWalk
Résultat RevWalk

GetTimeout() public méthode

public GetTimeout ( ) : int
Résultat int

IsBiDirectionalPipe() public méthode

public IsBiDirectionalPipe ( ) : bool
Résultat bool

IsSideBand() public méthode

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
Résultat bool

SendAdvertisedRefs() public méthode

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.
Résultat void

SetAdvertiseRefsHook() public méthode

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.
Résultat void

SetAdvertisedRefs() public méthode

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. ///
Résultat void

SetBiDirectionalPipe() public méthode

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. ///
Résultat void

SetLogger() public méthode

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.
Résultat void

SetPackConfig() public méthode

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. ///
Résultat void

SetPreUploadHook() public méthode

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.
Résultat void

SetRefFilter() public méthode

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.
Résultat void

SetRequestPolicy() public méthode

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. ///
Résultat void

SetTimeout() public méthode

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. ///
Résultat void

Upload() public méthode

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. ///
Résultat void

UploadPack() public méthode

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.
Résultat System