Package org.eclipse.jgit.api
Class TransportCommand<C extends GitCommand,T>
java.lang.Object
org.eclipse.jgit.api.GitCommand<T>
org.eclipse.jgit.api.TransportCommand<C,T>
- Type Parameters:
C-T-
- All Implemented Interfaces:
Callable<T>
- Direct Known Subclasses:
CloneCommand,FetchCommand,LsRemoteCommand,PullCommand,PushCommand,SubmoduleAddCommand,SubmoduleUpdateCommand
Base class for commands that use a
Transport during execution.
This class provides standard configuration of a transport for options such as
a CredentialsProvider, a timeout, and a
TransportConfigCallback.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CredentialsProviderConfigured credentials providerprotected intConfigured transport timeoutprotected TransportConfigCallbackConfigured callback for transport configurationFields inherited from class org.eclipse.jgit.api.GitCommand
repo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransportCommand(Repository repo) Constructor for TransportCommand. -
Method Summary
Modifier and TypeMethodDescriptionprotected Cconfigure(TransportCommand childCommand) Configure a child command with the current configuration set inthiscommandprotected CConfigure transport with credentials provider, timeout, and config callbackprotected final Cself()Return this command cast toCsetCredentialsProvider(CredentialsProvider credentialsProvider) Set thecredentialsProvider.setTimeout(int timeout) Settimeout.setTransportConfigCallback(TransportConfigCallback transportConfigCallback) Set theTransportConfigCallback.Methods inherited from class org.eclipse.jgit.api.GitCommand
call, checkCallable, getRepository, setCallable
-
Field Details
-
credentialsProvider
Configured credentials provider -
timeout
protected int timeoutConfigured transport timeout -
transportConfigCallback
Configured callback for transport configuration
-
-
Constructor Details
-
TransportCommand
Constructor for TransportCommand.
- Parameters:
repo- aRepositoryobject.
-
-
Method Details
-
setCredentialsProvider
Set thecredentialsProvider.- Parameters:
credentialsProvider- theCredentialsProviderto use- Returns:
this
-
setTimeout
Settimeout.- Parameters:
timeout- the timeout (in seconds) used for the transport step- Returns:
this
-
setTransportConfigCallback
Set theTransportConfigCallback. -
self
Return this command cast toC- Returns:
thiscast toC
-
configure
Configure transport with credentials provider, timeout, and config callback- Parameters:
transport- aTransportobject.- Returns:
this
-
configure
Configure a child command with the current configuration set inthiscommand- Parameters:
childCommand- aTransportCommandobject.- Returns:
this
-