Class AbstractGitCommand
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.command.AbstractCommandSupport
org.apache.sshd.server.command.AbstractFileSystemCommand
org.apache.sshd.git.AbstractGitCommand
- All Implemented Interfaces:
Runnable, org.apache.sshd.common.file.FileSystemAware, org.apache.sshd.common.session.SessionContextHolder, org.apache.sshd.common.session.SessionHolder<org.apache.sshd.server.session.ServerSession>, org.apache.sshd.common.util.threads.ExecutorServiceCarrier, GitLocationResolverCarrier, org.apache.sshd.server.command.Command, org.apache.sshd.server.command.CommandDirectErrorStreamAware, org.apache.sshd.server.command.CommandDirectInputStreamAware, org.apache.sshd.server.command.CommandDirectOutputStreamAware, org.apache.sshd.server.command.CommandDirectStreamsAware, org.apache.sshd.server.command.CommandLifecycle, org.apache.sshd.server.session.ServerSessionAware, org.apache.sshd.server.session.ServerSessionHolder
- Direct Known Subclasses:
GitPackCommand, GitPgmCommand
public abstract class AbstractGitCommand
extends org.apache.sshd.server.command.AbstractFileSystemCommand
implements GitLocationResolverCarrier
Provides basic support for GIT command implementations
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intprotected final GitLocationResolverstatic final intFields inherited from class org.apache.sshd.server.command.AbstractFileSystemCommand
fileSystemFields inherited from class org.apache.sshd.server.command.AbstractCommandSupport
cbCalled, cmdRunner, executorServiceFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractGitCommand(GitLocationResolver rootDirResolver, String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService) -
Method Summary
Modifier and TypeMethodDescriptionparseDelimitedString(String value, String delim, boolean trim) Parses delimited string and returns an array containing the tokens.voidvoidtoString()Methods inherited from class org.apache.sshd.server.command.AbstractFileSystemCommand
destroy, getFileSystem, setFileSystemMethods inherited from class org.apache.sshd.server.command.AbstractCommandSupport
getCommand, getEnvironment, getErrorStream, getExecutorService, getExitCallback, getInputStream, getOutputStream, getServerSession, getSession, getStartedCommandFuture, onExit, onExit, setExitCallback, setInputStream, setSession, startMethods 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.file.FileSystemAware
setFileSystemFactoryMethods inherited from interface org.apache.sshd.common.session.SessionHolder
getSessionContext
-
Field Details
-
CHAR
public static final int CHAR- See Also:
-
DELIMITER
public static final int DELIMITER- See Also:
-
STARTQUOTE
public static final int STARTQUOTE- See Also:
-
ENDQUOTE
public static final int ENDQUOTE- See Also:
-
rootDirResolver
-
-
Constructor Details
-
AbstractGitCommand
protected AbstractGitCommand(GitLocationResolver rootDirResolver, String command, org.apache.sshd.common.util.threads.CloseableExecutorService executorService)
-
-
Method Details
-
getGitLocationResolver
- Specified by:
getGitLocationResolverin interfaceGitLocationResolverCarrier
-
setOutputStream
- Specified by:
setOutputStreamin interfaceorg.apache.sshd.server.command.CommandDirectOutputStreamAware- Overrides:
setOutputStreamin classorg.apache.sshd.server.command.AbstractCommandSupport
-
setErrorStream
- Specified by:
setErrorStreamin interfaceorg.apache.sshd.server.command.CommandDirectErrorStreamAware- Overrides:
setErrorStreamin classorg.apache.sshd.server.command.AbstractCommandSupport
-
toString
- Overrides:
toStringin classorg.apache.sshd.server.command.AbstractCommandSupport
-
parseDelimitedString
Parses delimited string and returns an array containing the tokens. This parser obeys quotes, so the delimiter character will be ignored if it is inside of a quote. This method assumes that the quote character is not included in the set of delimiter characters.- Parameters:
value- the delimited string to parse.delim- the characters delimiting the tokens.trim-trueif the strings are trimmed before being added to the list- Returns:
- a list of string or an empty list if there are none.
-