public class MockSshServer extends Object implements org.apache.sshd.common.Factory<org.apache.sshd.server.Command>, org.apache.sshd.server.CommandFactory
| Modifier and Type | Field and Description |
|---|---|
static String |
PASSWORD |
protected org.apache.sshd.server.SshServer |
sshServer |
static String |
USERNAME |
| Modifier | Constructor and Description |
|---|---|
|
MockSshServer(int port) |
protected |
MockSshServer(int port,
boolean shouldStartServices) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.sshd.server.Command |
create() |
org.apache.sshd.server.Command |
createCommand(String command) |
MockSshServer |
enableShell() |
protected org.apache.sshd.server.SshServer |
initSshServer(int port) |
SshResponderBuilder |
respondTo(org.hamcrest.Matcher matcher) |
SshResponderBuilder |
respondTo(String input) |
void |
start() |
void |
stop() |
public static final String USERNAME
public static final String PASSWORD
protected final org.apache.sshd.server.SshServer sshServer
public MockSshServer(int port)
throws IOException
IOExceptionprotected MockSshServer(int port,
boolean shouldStartServices)
throws IOException
IOExceptionpublic SshResponderBuilder respondTo(org.hamcrest.Matcher matcher)
public SshResponderBuilder respondTo(String input)
public MockSshServer enableShell()
public void start()
throws IOException
IOExceptionpublic void stop()
throws IOException
IOExceptionprotected org.apache.sshd.server.SshServer initSshServer(int port)
public org.apache.sshd.server.Command create()
create in interface org.apache.sshd.common.Factory<org.apache.sshd.server.Command>public org.apache.sshd.server.Command createCommand(String command)
createCommand in interface org.apache.sshd.server.CommandFactoryCopyright © 2016. All rights reserved.