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 String |
repositoryName |
protected org.eclipse.jgit.transport.resolver.RepositoryResolver |
repositoryResolver |
static org.apache.sshd.common.AttributeStore.AttributeKey<org.jboss.errai.security.shared.api.identity.User> |
SUBJECT_KEY |
| Constructor and Description |
|---|
BaseGitCommand(String command,
JGitFileSystemProvider.RepositoryResolverImpl repositoryResolver,
ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected abstract void |
execute(org.eclipse.jgit.lib.Repository repository,
InputStream in,
OutputStream out,
OutputStream err) |
protected abstract String |
getCommandName() |
org.jboss.errai.security.shared.api.identity.User |
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<org.jboss.errai.security.shared.api.identity.User> SUBJECT_KEY
protected final String command
protected final String repositoryName
protected final org.eclipse.jgit.transport.resolver.RepositoryResolver repositoryResolver
public BaseGitCommand(String command, JGitFileSystemProvider.RepositoryResolverImpl 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(org.eclipse.jgit.lib.Repository repository,
InputStream in,
OutputStream out,
OutputStream err)
public void destroy()
destroy in interface org.apache.sshd.server.CommandLifecyclepublic org.jboss.errai.security.shared.api.identity.User getUser()
public void setSession(org.apache.sshd.server.session.ServerSession session)
setSession in interface org.apache.sshd.server.SessionAwareCopyright © 2012–2020 JBoss by Red Hat. All rights reserved.