ch.elca.el4j.services.tcpforwarder
Class Link

java.lang.Object
  extended by ch.elca.el4j.services.tcpforwarder.Link

public class Link
extends Object

This class represents an established, forwarding connection.

Author:
Martin Zeltner (MZE)
File-location:
Link
Last check-in date:
2009-08-04 15:17:52 +0200 (Di, 04. Aug 2009) by swismer for revision 3880

Field Summary
protected  Socket m_listenSocket
          The listen/input socket.
protected  UnidirectionalForwarderThread m_requestForwarderThread
          Is the request forwarder thread (listenSocket -> targetSocket).
protected  UnidirectionalForwarderThread m_responseForwarderThread
          Is the response forwarder thread (targetSocket -> listenSocket).
protected  Socket m_targetSocket
          The target/output socket.
protected  TcpForwarder m_tcpForwarder
          The control interface keeping track of this.
 
Constructor Summary
Link(TcpForwarder tcpForwarder, Socket listenSocket, Socket targetSocket)
          Establishes a forwarding link between listenSocket and targetSocket.
 
Method Summary
protected  void cut()
          Immediately aborts this.
protected  void done()
          Called by workers to tell this that they are done.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_tcpForwarder

protected final TcpForwarder m_tcpForwarder
The control interface keeping track of this.


m_listenSocket

protected final Socket m_listenSocket
The listen/input socket.


m_targetSocket

protected final Socket m_targetSocket
The target/output socket.


m_requestForwarderThread

protected final UnidirectionalForwarderThread m_requestForwarderThread
Is the request forwarder thread (listenSocket -> targetSocket).


m_responseForwarderThread

protected final UnidirectionalForwarderThread m_responseForwarderThread
Is the response forwarder thread (targetSocket -> listenSocket).

Constructor Detail

Link

public Link(TcpForwarder tcpForwarder,
            Socket listenSocket,
            Socket targetSocket)
Establishes a forwarding link between listenSocket and targetSocket.

Parameters:
tcpForwarder - The control interface keeping track of this.
listenSocket - Is the listen socket.
targetSocket - Is the target socket.
Method Detail

cut

protected void cut()
Immediately aborts this.


done

protected void done()
Called by workers to tell this that they are done.


toString

public String toString()

Overrides:
toString in class Object


Copyright © 2005-2011 ELCA. All Rights Reserved.