org.springframework.yarn.integration.support
Class DefaultPortExposingTcpSocketSupport

java.lang.Object
  extended by org.springframework.yarn.integration.support.DefaultPortExposingTcpSocketSupport
All Implemented Interfaces:
TcpSocketSupport, PortExposingTcpSocketSupport

public class DefaultPortExposingTcpSocketSupport
extends Object
implements PortExposingTcpSocketSupport

Implementation of TcpSocketSupport which extends its base functionality by catching socket information, like listen address and port.

Author:
Janne Valkealahti

Constructor Summary
DefaultPortExposingTcpSocketSupport()
           
 
Method Summary
 String getServerSocketAddress()
          Gets the binded server socket address.
 int getServerSocketPort()
          Gets the binded server socket port.
 void postProcessServerSocket(ServerSocket serverSocket)
           
 void postProcessSocket(Socket socket)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPortExposingTcpSocketSupport

public DefaultPortExposingTcpSocketSupport()
Method Detail

postProcessServerSocket

public void postProcessServerSocket(ServerSocket serverSocket)
Specified by:
postProcessServerSocket in interface TcpSocketSupport

postProcessSocket

public void postProcessSocket(Socket socket)
Specified by:
postProcessSocket in interface TcpSocketSupport

getServerSocketPort

public int getServerSocketPort()
Description copied from interface: PortExposingTcpSocketSupport
Gets the binded server socket port.

Specified by:
getServerSocketPort in interface PortExposingTcpSocketSupport
Returns:
the server socket port

getServerSocketAddress

public String getServerSocketAddress()
Description copied from interface: PortExposingTcpSocketSupport
Gets the binded server socket address.

Specified by:
getServerSocketAddress in interface PortExposingTcpSocketSupport
Returns:
the server socket address