org.crsh.term.sshd.scp
Class SCPCommand
java.lang.Object
org.crsh.term.sshd.AbstractCommand
org.crsh.term.sshd.scp.SCPCommand
- All Implemented Interfaces:
- java.lang.Runnable, org.apache.sshd.server.Command, org.apache.sshd.server.SessionAware
- Direct Known Subclasses:
- SinkCommand, SourceCommand
public abstract class SCPCommand
- extends AbstractCommand
- implements java.lang.Runnable
Three internal options in SCP:
-f (from) indicates source mode
-t (to) indicates sink mode
-d indicates that the target is expected to be a directory
- Version:
- $Revision$
- Author:
- Julien Viet
|
Field Summary |
protected static int |
ERROR
. |
protected org.slf4j.Logger |
log
. |
protected static int |
OK
. |
|
Constructor Summary |
protected |
SCPCommand(java.lang.String target)
|
|
Method Summary |
protected void |
ack()
|
void |
destroy()
|
protected abstract void |
execute(javax.jcr.Session session,
java.lang.String path)
|
protected void |
readAck()
|
protected java.lang.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 org.slf4j.Logger log
- .
OK
protected static final int OK
- .
- See Also:
- Constant Field Values
ERROR
protected static final int ERROR
- .
- See Also:
- Constant Field Values
SCPCommand
protected SCPCommand(java.lang.String target)
ack
protected final void ack()
throws java.io.IOException
- Throws:
java.io.IOException
readAck
protected final void readAck()
throws java.io.IOException
- Throws:
java.io.IOException
readLine
protected final java.lang.String readLine()
throws java.io.IOException
- Throws:
java.io.IOException
start
public final void start(org.apache.sshd.server.Environment env)
throws java.io.IOException
- Specified by:
start in interface org.apache.sshd.server.Command
- Throws:
java.io.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 java.lang.Runnable
execute
protected abstract void execute(javax.jcr.Session session,
java.lang.String path)
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2010 eXo Platform SAS. All Rights Reserved.