OpenShift Java Client 2.5.0.Final

com.openshift.internal.client.ssh
Class ApplicationPortForwarding

java.lang.Object
  extended by com.openshift.internal.client.ssh.ApplicationPortForwarding
All Implemented Interfaces:
IApplicationPortForwarding

public class ApplicationPortForwarding
extends Object
implements IApplicationPortForwarding

Author:
Xavier Coulon

Constructor Summary
ApplicationPortForwarding(IApplication application, String name, String remoteAddress, int remotePort)
           
 
Method Summary
protected  IApplication getApplication()
           
 String getLocalAddress()
           
 int getLocalPort()
           
 String getName()
           
 String getRemoteAddress()
           
 int getRemotePort()
           
 boolean isStarted(com.jcraft.jsch.Session session)
           
 void setLocalAddress(String localAddress)
           
 void setLocalPort(int localPort)
           
 void start(com.jcraft.jsch.Session session)
          Start the binding, ie, open a SSH tunnel between local address:port and remote address:port.
 void stop(com.jcraft.jsch.Session session)
          Stop the SSH tunnel.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationPortForwarding

public ApplicationPortForwarding(IApplication application,
                                 String name,
                                 String remoteAddress,
                                 int remotePort)
Method Detail

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

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.