org.crsh.jcr
Class SCPCommand
java.lang.Object
org.crsh.ssh.term.AbstractCommand
org.crsh.jcr.SCPCommand
- All Implemented Interfaces:
- Runnable, org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware
- Direct Known Subclasses:
- SinkCommand, SourceCommand
-
public abstract class SCPCommand
- extends AbstractCommand
-
- implements Runnable
-
Field Summary |
private org.apache.sshd.server.Environment |
env
. |
protected static int |
ERROR
. |
protected Logger |
log
. |
protected static int |
OK
. |
private String |
target
. |
private Thread |
thread
. |
Constructor Summary |
protected |
SCPCommand(String target)
|
Method Summary |
protected void |
ack()
|
void |
destroy()
|
private void |
execute()
|
protected abstract void |
execute(javax.jcr.Session session, String path)
|
(package private) InputStream |
read(int length)
Read from the input stream an exact amount of bytes. |
protected void |
readAck()
|
protected String |
readLine()
|
void |
run()
|
void |
start(org.apache.sshd.server.Environment env)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final Logger log
-
.
OK
protected static final int OK
-
.
- See Also:
- Constant Field Values
ERROR
protected static final int ERROR
-
.
- See Also:
- Constant Field Values
thread
private Thread thread
-
.
env
private org.apache.sshd.server.Environment env
-
.
target
private final String target
-
.
SCPCommand
protected SCPCommand(String target)
read
final InputStream read(int length)
throws IOException
-
Read from the input stream an exact amount of bytes.
-
-
- Parameters:
length
- the expected data length to read
- Returns:
- an input stream for reading
- Throws:
IOException
- any io exception
ack
protected final void ack()
throws IOException
-
-
- Throws:
IOException
readAck
protected final void readAck()
throws IOException
-
-
- Throws:
IOException
readLine
protected final String readLine()
throws IOException
-
-
- Throws:
IOException
start
public final void start(org.apache.sshd.server.Environment env)
throws IOException
-
- Specified by:
start
in interface org.apache.sshd.server.Command
-
- Throws:
IOException
destroy
public final void destroy()
-
- Specified by:
destroy
in interface org.apache.sshd.server.Command
-
run
public final void run()
-
- Specified by:
run
in interface Runnable
-
execute
private void execute()
throws Exception
-
-
- Throws:
Exception
execute
protected abstract void execute(javax.jcr.Session session,
String path)
throws Exception
-
-
- Throws:
Exception
Copyright © 2014 eXo Platform SAS. All Rights Reserved.