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 CredentialsProvider
Configured credentials providerprotected int
Configured transport timeoutprotected TransportConfigCallback
Configured callback for transport configurationFields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TransportCommand
(Repository repo) Constructor for TransportCommand. -
Method Summary
Modifier and TypeMethodDescriptionprotected C
configure
(TransportCommand childCommand) Configure a child command with the current configuration set inthis
commandprotected C
Configure transport with credentials provider, timeout, and config callbackprotected final C
self()
Return this command cast toC
setCredentialsProvider
(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
- aRepository
object.
-
-
Method Details
-
setCredentialsProvider
Set thecredentialsProvider
.- Parameters:
credentialsProvider
- theCredentialsProvider
to 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:
this
cast toC
-
configure
Configure transport with credentials provider, timeout, and config callback- Parameters:
transport
- aTransport
object.- Returns:
this
-
configure
Configure a child command with the current configuration set inthis
command- Parameters:
childCommand
- aTransportCommand
object.- Returns:
this
-