com.openshift.internal.client.ssh
Class ApplicationPortForwarding
java.lang.Object
  
com.openshift.internal.client.ssh.ApplicationPortForwarding
- All Implemented Interfaces: 
 - IApplicationPortForwarding
 
public class ApplicationPortForwarding
- extends Object
- implements IApplicationPortForwarding
  
- Author:
 
  - Xavier Coulon
 
 
 
 
ApplicationPortForwarding
public ApplicationPortForwarding(IApplication application,
                                 String name,
                                 String remoteAddress,
                                 int remotePort)
start
public void start(com.jcraft.jsch.Session session)
           throws OpenShiftSSHOperationException
- Description copied from interface: 
IApplicationPortForwarding 
- Start the binding, ie, open a SSH tunnel between local address:port and remote address:port.
- Specified by:
 start in interface IApplicationPortForwarding
 
- Throws:
 OpenShiftSSHOperationException
 
 
stop
public void stop(com.jcraft.jsch.Session session)
          throws OpenShiftSSHOperationException
- Description copied from interface: 
IApplicationPortForwarding 
- Stop the SSH tunnel.
- Specified by:
 stop in interface IApplicationPortForwarding
 
- Throws:
 OpenShiftSSHOperationException
 
 
isStarted
public boolean isStarted(com.jcraft.jsch.Session session)
                  throws OpenShiftSSHOperationException
- Specified by:
 isStarted in interface IApplicationPortForwarding
 
- Returns:
 - true if the SSH tunnel is open, false otherwise.
 - Throws:
 OpenShiftSSHOperationException
 
getApplication
protected final IApplication getApplication()
 
 
getName
public final String getName()
- Specified by:
 getName in interface IApplicationPortForwarding
 
- Returns:
 - the name
 
 
getLocalAddress
public final String getLocalAddress()
- Specified by:
 getLocalAddress in interface IApplicationPortForwarding
 
- Returns:
 - the localAddress
 
 
setLocalAddress
public final void setLocalAddress(String localAddress)
- Specified by:
 setLocalAddress in interface IApplicationPortForwarding
 
- Parameters:
 localAddress - the localAddress to set
 
getLocalPort
public final int getLocalPort()
- Specified by:
 getLocalPort in interface IApplicationPortForwarding
 
- Returns:
 - the localPort
 
 
setLocalPort
public final void setLocalPort(int localPort)
- Specified by:
 setLocalPort in interface IApplicationPortForwarding
 
- Parameters:
 localPort - the localPort to set
 
getRemoteAddress
public final String getRemoteAddress()
- Specified by:
 getRemoteAddress in interface IApplicationPortForwarding
 
- Returns:
 - the remoteIp
 
 
getRemotePort
public final int getRemotePort()
- Specified by:
 getRemotePort in interface IApplicationPortForwarding
 
- Returns:
 - the remotePort
 
 
toString
public String toString()
- Overrides:
 toString in class Object
 
 
Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.