public abstract class BaseGitCommand extends Object implements org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware, Runnable
Modifier and Type | Field and Description |
---|---|
protected String |
command |
protected FileSystemAuthorizer |
fileSystemAuthorizer |
protected String |
repositoryName |
protected JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> |
repositoryResolver |
static org.apache.sshd.common.AttributeStore.AttributeKey<FileSystemUser> |
SUBJECT_KEY |
Constructor and Description |
---|
BaseGitCommand(String command,
FileSystemAuthorizer fileSystemAuthorizer,
JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> repositoryResolver,
ExecutorService executorService) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
protected abstract void |
execute(FileSystemUser user,
org.eclipse.jgit.lib.Repository repository,
InputStream in,
OutputStream out,
OutputStream err,
JGitFileSystem fileSystem) |
protected abstract String |
getCommandName() |
FileSystemUser |
getUser() |
void |
run() |
void |
setErrorStream(OutputStream err) |
void |
setExitCallback(org.apache.sshd.server.ExitCallback callback) |
void |
setInputStream(InputStream in) |
void |
setOutputStream(OutputStream out) |
void |
setSession(org.apache.sshd.server.session.ServerSession session) |
void |
start(org.apache.sshd.server.Environment env) |
public static final org.apache.sshd.common.AttributeStore.AttributeKey<FileSystemUser> SUBJECT_KEY
protected final String command
protected final String repositoryName
protected final FileSystemAuthorizer fileSystemAuthorizer
protected final JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> repositoryResolver
public BaseGitCommand(String command, FileSystemAuthorizer fileSystemAuthorizer, JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> repositoryResolver, ExecutorService executorService)
protected abstract String getCommandName()
public void setInputStream(InputStream in)
setInputStream
in interface org.apache.sshd.server.Command
public void setOutputStream(OutputStream out)
setOutputStream
in interface org.apache.sshd.server.Command
public void setErrorStream(OutputStream err)
setErrorStream
in interface org.apache.sshd.server.Command
public void setExitCallback(org.apache.sshd.server.ExitCallback callback)
setExitCallback
in interface org.apache.sshd.server.Command
public void start(org.apache.sshd.server.Environment env) throws IOException
start
in interface org.apache.sshd.server.CommandLifecycle
IOException
protected abstract void execute(FileSystemUser user, org.eclipse.jgit.lib.Repository repository, InputStream in, OutputStream out, OutputStream err, JGitFileSystem fileSystem)
public void destroy()
destroy
in interface org.apache.sshd.server.CommandLifecycle
public FileSystemUser getUser()
public void setSession(org.apache.sshd.server.session.ServerSession session)
setSession
in interface org.apache.sshd.server.SessionAware
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.