Class AbstractGitCommandFactory
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.command.AbstractDelegatingCommandFactory
org.apache.sshd.git.AbstractGitCommandFactory
- All Implemented Interfaces:
org.apache.sshd.common.util.threads.ExecutorServiceProvider, GitLocationResolverCarrier, org.apache.sshd.server.command.CommandFactory
- Direct Known Subclasses:
GitPackCommandFactory, GitPgmCommandFactory
public abstract class AbstractGitCommandFactory
extends org.apache.sshd.server.command.AbstractDelegatingCommandFactory
implements org.apache.sshd.common.util.threads.ExecutorServiceProvider, GitLocationResolverCarrier
Helper class for various Git command factories
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> private GitLocationResolverFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AbstractGitCommandcreateGitCommand(String command) protected org.apache.sshd.server.command.CommandcreateUnsupportedCommand(org.apache.sshd.server.channel.ChannelSession channel, String command) protected org.apache.sshd.server.command.CommandexecuteSupportedCommand(org.apache.sshd.server.channel.ChannelSession channel, String command) Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> booleanisSupportedCommand(org.apache.sshd.server.channel.ChannelSession channel, String command) protected org.apache.sshd.common.util.threads.CloseableExecutorServiceresolveExecutorService(String command) withDelegate(org.apache.sshd.server.command.CommandFactory delegate) withExecutorServiceProvider(Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> provider) withGitLocationResolver(GitLocationResolver rootDirResolver) Methods inherited from class org.apache.sshd.server.command.AbstractDelegatingCommandFactory
createCommand, getDelegateCommandFactory, setDelegateCommandFactory, toStringMethods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.util.threads.ExecutorServiceProvider
resolveExecutorService
-
Field Details
-
cmdPrefix
-
rootDirResolver
-
executorsProvider
private Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> executorsProvider
-
-
Constructor Details
-
AbstractGitCommandFactory
-
-
Method Details
-
getCommandPrefix
-
getExecutorServiceProvider
public Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> getExecutorServiceProvider()- Specified by:
getExecutorServiceProviderin interfaceorg.apache.sshd.common.util.threads.ExecutorServiceProvider
-
withExecutorServiceProvider
public AbstractGitCommandFactory withExecutorServiceProvider(Supplier<? extends org.apache.sshd.common.util.threads.CloseableExecutorService> provider) - Parameters:
provider- ASupplierofCloseableExecutorServiceto be used when starting a Git command execution. Ifnullthen a single-threaded ad-hoc service is used.- Returns:
- Self instance
-
getGitLocationResolver
- Specified by:
getGitLocationResolverin interfaceGitLocationResolverCarrier
-
withGitLocationResolver
-
withDelegate
public AbstractGitCommandFactory withDelegate(org.apache.sshd.server.command.CommandFactory delegate) -
isSupportedCommand
public boolean isSupportedCommand(org.apache.sshd.server.channel.ChannelSession channel, String command) - Specified by:
isSupportedCommandin classorg.apache.sshd.server.command.AbstractDelegatingCommandFactory
-
executeSupportedCommand
protected org.apache.sshd.server.command.Command executeSupportedCommand(org.apache.sshd.server.channel.ChannelSession channel, String command) - Specified by:
executeSupportedCommandin classorg.apache.sshd.server.command.AbstractDelegatingCommandFactory
-
createUnsupportedCommand
protected org.apache.sshd.server.command.Command createUnsupportedCommand(org.apache.sshd.server.channel.ChannelSession channel, String command) - Overrides:
createUnsupportedCommandin classorg.apache.sshd.server.command.AbstractDelegatingCommandFactory
-
resolveExecutorService
protected org.apache.sshd.common.util.threads.CloseableExecutorService resolveExecutorService(String command) -
createGitCommand
-