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 org.uberfire.java.nio.security.FileSystemAuthorizer |
fileSystemAuthorizer |
protected String |
repositoryName |
protected JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> |
repositoryResolver |
static org.apache.sshd.common.Session.AttributeKey<org.uberfire.java.nio.security.FileSystemUser> |
SUBJECT_KEY |
| Constructor and Description |
|---|
BaseGitCommand(String command,
org.uberfire.java.nio.security.FileSystemAuthorizer fileSystemAuthorizer,
JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> repositoryResolver) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected abstract void |
execute(org.uberfire.java.nio.security.FileSystemUser user,
org.eclipse.jgit.lib.Repository repository,
InputStream in,
OutputStream out,
OutputStream err,
JGitFileSystem fileSystem) |
protected abstract String |
getCommandName() |
org.uberfire.java.nio.security.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.Session.AttributeKey<org.uberfire.java.nio.security.FileSystemUser> SUBJECT_KEY
protected final String command
protected final String repositoryName
protected final org.uberfire.java.nio.security.FileSystemAuthorizer fileSystemAuthorizer
protected final JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> repositoryResolver
public BaseGitCommand(String command, org.uberfire.java.nio.security.FileSystemAuthorizer fileSystemAuthorizer, JGitFileSystemProvider.RepositoryResolverImpl<BaseGitCommand> repositoryResolver)
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.CommandIOExceptionprotected abstract void execute(org.uberfire.java.nio.security.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.Commandpublic org.uberfire.java.nio.security.FileSystemUser getUser()
public void setSession(org.apache.sshd.server.session.ServerSession session)
setSession in interface org.apache.sshd.server.SessionAwareCopyright © 2012–2016 JBoss by Red Hat. All rights reserved.