public interface SessionFactory
Session objects from a common
configuration. Also supports creation of other SessionFactory instances that
are initialized from the same configuration and can be modified as necessary.| Modifier and Type | Interface and Description |
|---|---|
static class |
SessionFactory.SessionFactoryBuilder |
| Modifier and Type | Field and Description |
|---|---|
static int |
SSH_PORT |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getHostname()
Returns the hostname that sessions built by this factory will connect to.
|
int |
getPort()
Returns the port that sessions built by this factory will connect to.
|
com.jcraft.jsch.Proxy |
getProxy()
Returns the proxy that sessions built by this factory will connect
through, if any.
|
com.jcraft.jsch.UserInfo |
getUserInfo()
Returns the userInfo that sessions built by this factory will connect
with.
|
java.lang.String |
getUsername()
Returns the username that sessions built by this factory will connect
with.
|
com.jcraft.jsch.Session |
newSession()
Returns a new session using the configured properties.
|
SessionFactory.SessionFactoryBuilder |
newSessionFactoryBuilder()
Returns a builder for another session factory pre-initialized with the
configuration for this session factory.
|
static final int SSH_PORT
java.lang.String getHostname()
int getPort()
com.jcraft.jsch.Proxy getProxy()
null will be
returned.java.lang.String getUsername()
com.jcraft.jsch.UserInfo getUserInfo()
com.jcraft.jsch.Session newSession()
throws com.jcraft.jsch.JSchException
com.jcraft.jsch.JSchException - If username or hostname are invalidJSch.getSession(String, String, int)SessionFactory.SessionFactoryBuilder newSessionFactoryBuilder()
Copyright © 2018 pastdev.com. All Rights Reserved.