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.Commandpublic void setOutputStream(OutputStream out)
setOutputStream in interface org.apache.sshd.server.Commandpublic void setErrorStream(OutputStream err)
setErrorStream in interface org.apache.sshd.server.Commandpublic void setExitCallback(org.apache.sshd.server.ExitCallback callback)
setExitCallback in interface org.apache.sshd.server.Commandpublic void start(org.apache.sshd.server.Environment env)
throws IOException
start in interface org.apache.sshd.server.CommandLifecycleIOExceptionprotected 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.CommandLifecyclepublic FileSystemUser getUser()
public void setSession(org.apache.sshd.server.session.ServerSession session)
setSession in interface org.apache.sshd.server.SessionAwareCopyright © 2012–2019 JBoss by Red Hat. All rights reserved.