Interface IRemotePortForwardingService

  • All Superinterfaces:
    IRemoteConnection.Service

    public interface IRemotePortForwardingService
    extends IRemoteConnection.Service
    A connection service for setting up port forwarding between the host and the remote. This is a feature provided by SSH.
    Since:
    2.0
    • Method Detail

      • forwardLocalPort

        void forwardLocalPort​(int localPort,
                              String fwdAddress,
                              int fwdPort)
                       throws RemoteConnectionException
        Forward local port localPort to remote port fwdPort on remote machine fwdAddress. If this IRemoteConnection is not to fwdAddress, the port will be routed via the connection machine to fwdAddress.
        Parameters:
        localPort - local port to forward
        fwdAddress - address of remote machine
        fwdPort - remote port on remote machine
        Throws:
        RemoteConnectionException
      • forwardLocalPort

        int forwardLocalPort​(String fwdAddress,
                             int fwdPort,
                             org.eclipse.core.runtime.IProgressMonitor monitor)
                      throws RemoteConnectionException
        Forward a local port to remote port fwdPort on remote machine fwdAddress. The local port is chosen dynamically and returned by the method. If this IRemoteConnection is not to fwdAddress, the port will be routed via the connection machine to fwdAddress.
        Parameters:
        fwdAddress -
        fwdPort -
        monitor -
        Returns:
        local port number
        Throws:
        RemoteConnectionException
      • forwardRemotePort

        void forwardRemotePort​(int remotePort,
                               String fwdAddress,
                               int fwdPort)
                        throws RemoteConnectionException
        Forward remote port remotePort to port fwdPort on machine fwdAddress. When a connection is made to remotePort on the remote machine, it is forwarded via this IRemoteConnection to fwdPort on machine fwdAddress.
        Parameters:
        remotePort - remote port to forward
        fwdAddress - address of recipient machine
        fwdPort - port on recipient machine
        Throws:
        RemoteConnectionException
      • forwardRemotePort

        int forwardRemotePort​(String fwdAddress,
                              int fwdPort,
                              org.eclipse.core.runtime.IProgressMonitor monitor)
                       throws RemoteConnectionException
        Forward a remote port to port fwdPort on remote machine fwdAddress. The remote port is chosen dynamically and returned by the method. When a connection is made to this port on the remote machine, it is forwarded via this IRemoteConnection to fwdPort on machine fwdAddress. If fwdAddress is the empty string ("") then the fwdPort will be bound to any address on all interfaces. Note that this requires enabling the GatewayPort sshd option on some systems.
        Parameters:
        fwdAddress -
        fwdPort -
        monitor -
        Returns:
        remote port number
        Throws:
        RemoteConnectionException
      • removeLocalPortForwarding

        void removeLocalPortForwarding​(int port)
                                throws RemoteConnectionException
        Remove the local port forwarding associated with the given port.
        Parameters:
        port - forwarded port
        Throws:
        RemoteConnectionException
        Since:
        7.0
      • removeRemotePortForwarding

        void removeRemotePortForwarding​(int port)
                                 throws RemoteConnectionException
        Remove the remote port forwarding associated with the given port.
        Parameters:
        port - forwarded port
        Throws:
        RemoteConnectionException
        Since:
        7.0