public class ReceivePack extends BaseReceivePack
BaseReceivePack.FirstLine, BaseReceivePack.ReceiveConfig| Constructor and Description | 
|---|
ReceivePack(Repository into)
Create a new pack receive for an open repository. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
enableCapabilities()
Enable capabilities based on a previously read capabilities line. 
 | 
protected String | 
getLockMessageProcessName()  | 
PostReceiveHook | 
getPostReceiveHook()  | 
PreReceiveHook | 
getPreReceiveHook()  | 
List<String> | 
getPushOptions()
Gets an unmodifiable view of the option strings associated with the push. 
 | 
void | 
receive(InputStream input,
       OutputStream output,
       OutputStream messages)
Execute the receive task on the socket. 
 | 
void | 
setEchoCommandFailures(boolean echo)  | 
void | 
setPostReceiveHook(PostReceiveHook h)
Set the hook which is invoked after commands are executed. 
 | 
void | 
setPreReceiveHook(PreReceiveHook h)
Set the hook which is invoked prior to commands being executed. 
 | 
void | 
setPushOptions(List<String> options)
Set the push options supplied by the client. 
 | 
anyRejects, close, executeCommands, failPendingCommands, filterCommands, getAdvertisedObjects, getAdvertisedOrDefaultRefs, getAdvertisedRefs, getAdvertiseRefsHook, getAllCommands, getClientShallowCommits, getMessageOutputStream, getPackSize, getPeerUserAgent, getPushCertificate, getReceivedPackStatistics, getRefFilter, getRefLogIdent, getRepository, getRevWalk, getTimeout, hasCommands, hasError, init, isAllowBranchDeletes, isAllowCreates, isAllowDeletes, isAllowNonFastForwards, isAllowPushOptions, isAllowQuiet, isAtomic, isBiDirectionalPipe, isCapabilityEnabled, isCheckReceivedObjects, isCheckReferencedObjectsAreReachable, isExpectDataAfterPackFooter, isQuiet, isSideBand, needPack, receivePackAndCheckConnectivity, recvCommands, release, sendAdvertisedRefs, sendError, sendMessage, sendStatusReport, setAdvertisedRefs, setAdvertiseRefsHook, setAllowBranchDeletes, setAllowCreates, setAllowDeletes, setAllowNonFastForwards, setAllowPushOptions, setAllowQuiet, setAtomic, setBiDirectionalPipe, setCheckReceivedObjects, setCheckReferencedObjectsAreReachable, setExpectDataAfterPackFooter, setMaxObjectSizeLimit, setMaxPackSizeLimit, setObjectChecker, setPushCertificate, setRefFilter, setRefLogIdent, setSignedPushConfig, setTimeout, unlockPack, validateCommandspublic ReceivePack(Repository into)
into - the destination repository.@Nullable public List<String> getPushOptions()
public void setPushOptions(@Nullable List<String> options)
 Should only be called if reconstructing an instance without going through
 the normal BaseReceivePack.recvCommands() flow.
options - the list of options supplied by the client. The
            ReceivePack instance takes ownership of this list.
            Callers are encouraged to first create a copy if the list may
            be modified later.public PreReceiveHook getPreReceiveHook()
public void setPreReceiveHook(PreReceiveHook h)
 Only valid commands (those which have no obvious errors according to the
 received input and this instance's configuration) are passed into the
 hook. The hook may mark a command with a result of any value other than
 ReceiveCommand.Result.NOT_ATTEMPTED to block its execution.
 
The hook may be called with an empty command collection if the current set is completely invalid.
h - the hook instance; may be null to disable the hook.public PostReceiveHook getPostReceiveHook()
public void setPostReceiveHook(PostReceiveHook h)
 Only successful commands (type is ReceiveCommand.Result.OK) are passed into the
 hook. The hook may be called with an empty command collection if the
 current set all resulted in an error.
h - the hook instance; may be null to disable the hook.public void setEchoCommandFailures(boolean echo)
echo - if true this class will report command failures as warning
            messages before sending the command results. This is usually
            not necessary, but may help buggy Git clients that discard the
            errors when all branches fail.public void receive(InputStream input, OutputStream output, OutputStream messages) throws IOException
input - raw input to read client commands and pack data from. Caller
            must ensure the input is buffered, otherwise read performance
            may suffer.output - response back to the Git network client. Caller must ensure
            the output is buffered, otherwise write performance may
            suffer.messages - 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.IOExceptionprotected void enableCapabilities()
BaseReceivePackenableCapabilities in class BaseReceivePackprotected String getLockMessageProcessName()
getLockMessageProcessName in class BaseReceivePackCopyright © 2016 Eclipse JGit Project. All rights reserved.