Interface JschServices

All Known Implementing Classes:
ServerChannel

public interface JschServices
Services for executing network I/O with managed sockets.
 
Property Description Type Default
jsch.«name».connect.timeout Maximum time to wait for a remote connection (milliseconds) Integer 0 (forever)
jsch.«name».identity.file Path to file with private key used for identification String none
jsch.«name».identity.password Encoded password used to access the identity file String none
jsch.«name».proxy.host Name or IP address of the proxy server String none
jsch.«name».proxy.port Port number of the proxy server Integer none
jsch.«name».proxy.user User name needed for authentication to the proxy String none
jsch.«name».proxy.password Password needed for authentication to the proxy String none
jsch.«name».remote.host Name or IP address of remote SSH-2 host String required
jsch.«name».remote.port Port number of remote SSH-2 host Integer required
jsch.«name».remote.user User name used for remote login String none
jsch.«name».remote.password Encoded password used for remote login String none
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    Allocates a connected Jsch (Java Secure Channel) session from the default pool and then executes the supplied executor.
    <T> T
    executeJsch(JschExecutor<T> executor, String execName)
    Allocates a connected Jsch (Java Secure Channel) session from the default pool and then executes the supplied executor.
    <T> T
    executeJsch(String poolName, JschExecutor<T> executor)
    Allocates a connected Jsch (Java Secure Channel) session from the specified pool and then executes the supplied executor.
    <T> T
    executeJsch(String poolName, JschExecutor<T> executor, String execName)
    Allocates a connected Jsch (Java Secure Channel) session from the specified pool and then executes the supplied executor.
  • Method Details

    • executeJsch

      <T> T executeJsch(JschExecutor<T> executor) throws Exception
      Allocates a connected Jsch (Java Secure Channel) session from the default pool and then executes the supplied executor.

      This convenience method produces the same result as the following invocation:

      executeJsch("default", executor, null);
      Type Parameters:
      T - the type of the value returned by the executor.
      Parameters:
      executor - the Jsch executor to be executed.
      Returns:
      the value returned by the executor.
      Throws:
      NullPointerException - if executor is null.
      Exception - if another error occurs.
    • executeJsch

      <T> T executeJsch(JschExecutor<T> executor, String execName) throws Exception
      Allocates a connected Jsch (Java Secure Channel) session from the default pool and then executes the supplied executor.

      This convenience method produces the same result as the following invocation:

      executeJsch("default", executor, tag);
      Type Parameters:
      T - the type of the value returned by the executor.
      Parameters:
      executor - the Jsch executor to be executed.
      execName - name of the executor (can be null).
      Returns:
      the value returned by the executor.
      Throws:
      NullPointerException - if executor is null.
      Exception - if another error occurs.
    • executeJsch

      <T> T executeJsch(String poolName, JschExecutor<T> executor) throws Exception
      Allocates a connected Jsch (Java Secure Channel) session from the specified pool and then executes the supplied executor.

      This convenience method produces the same result as the following invocation:

      executeJsch(poolName, executor, null);
      Type Parameters:
      T - the type of the value returned by the executor.
      Parameters:
      poolName - the name of the Jsch (Java Secure Channel) pool.
      executor - the Jsch executor to be executed.
      Returns:
      the value returned by the executor.
      Throws:
      NullPointerException - if an argument is null.
      Exception - if another error occurs.
    • executeJsch

      <T> T executeJsch(String poolName, JschExecutor<T> executor, String execName) throws Exception
      Allocates a connected Jsch (Java Secure Channel) session from the specified pool and then executes the supplied executor. If the Jsch executor throws an exception, the Jsch session is closed and not returned to the pool.
      Type Parameters:
      T - the type of the value returned by the executor.
      Parameters:
      poolName - the name of the Jsch (Java Secure Channel) pool.
      executor - the Jsch executor to be executed.
      execName - name of the executor (can be null).
      Returns:
      the value returned by the executor.
      Throws:
      NullPointerException - if an argument is null.
      Exception - if another error occurs.