com.maverick.ssh
Interface SshTunnel

All Superinterfaces:
SshChannel, SshIO, SshTransport

public interface SshTunnel
extends SshChannel, SshTransport

Interface defining the contract for SSH forwarding channels.

Forwarding channels can either be local or remote. Local forwarding transfers data from the local computer to the remote side where it is delivered to the specified host. Remote forwarding is when the remote computer forwards data to the local side.

Author:
Lee David Painter

Method Summary
 java.lang.String getListeningAddress()
          The source ip address of the connection that is being forwarded.
 int getListeningPort()
          The source port of the connection being forwarded.
 java.lang.String getOriginatingHost()
          The host that made the initial connection to the listening address.
 int getOriginatingPort()
          The port of the initial connection.
 int getPort()
          The port to which the data is being forwarded.
 SshTransport getTransport()
          The connection being forwarded (local forwarding) or the destination of the forwarding (remote forwarding).
 boolean isLocal()
          Determines the type of forwarding channel.
 boolean isX11()
          Determine if this channel is an X11 forwarding channel.
 
Methods inherited from interface com.maverick.ssh.SshChannel
addChannelEventListener, getChannelId, isClosed, setAutoConsumeInput
 
Methods inherited from interface com.maverick.ssh.SshIO
close, getInputStream, getOutputStream
 
Methods inherited from interface com.maverick.ssh.SshTransport
duplicate, getHost
 

Method Detail

getPort

public int getPort()
The port to which the data is being forwarded.

Specified by:
getPort in interface SshTransport
Returns:

getListeningAddress

public java.lang.String getListeningAddress()
The source ip address of the connection that is being forwarded.

Returns:

getListeningPort

public int getListeningPort()
The source port of the connection being forwarded.

Returns:

getOriginatingHost

public java.lang.String getOriginatingHost()
The host that made the initial connection to the listening address.

Returns:

getOriginatingPort

public int getOriginatingPort()
The port of the initial connection.

Returns:

isLocal

public boolean isLocal()
Determines the type of forwarding channel.

Returns:
true if the forwarding is local, otherwise false for remote forwarding.

isX11

public boolean isX11()
Determine if this channel is an X11 forwarding channel.

Returns:

getTransport

public SshTransport getTransport()
The connection being forwarded (local forwarding) or the destination of the forwarding (remote forwarding).

Returns:


Copyright © 2003 3SP LTD. All Rights Reserved.