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.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(org.eclipse.jgit.lib.Repository repository, InputStream in, OutputStream out, OutputStream err)
public void destroy()
destroy
in interface org.apache.sshd.server.CommandLifecycle
public 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.SessionAware
Copyright © 2012–2019 JBoss by Red Hat. All rights reserved.