org.jgroups.protocols

Class TUNNEL

public class TUNNEL extends Protocol implements Runnable

Replacement for UDP. Instead of sending packets via UDP, a TCP connection is opened to a Router (using the RouterStub client-side stub), the IP address/port of which was given using channel properties router_host and router_port. All outgoing traffic is sent via this TCP socket to the Router which distributes it to all connected TUNNELs in this group. Incoming traffic received from Router will simply be passed up the stack.

A TUNNEL layer can be used to penetrate a firewall, most firewalls allow creating TCP connections to the outside world, however, they do not permit outside hosts to initiate a TCP connection to a host inside the firewall. Therefore, the connection created by the inside host is reused by Router to send traffic from an outside host to a host inside the firewall.

Author: Bela Ban

Constructor Summary
TUNNEL()
Method Summary
voiddown(Event evt)
Caller by the layer above this layer.
StringgetName()
voidhandleIncomingMessage(Message msg)
voidinit()
voidrun()
booleansetProperties(Properties props)
Setup the Protocol instance acording to the configuration string
voidstart()
voidstartUpHandler()
This prevents the up-handler thread to be created, which essentially is superfluous: messages are received from the network rather than from a layer below.
voidstop()
StringtoString()

Constructor Detail

TUNNEL

public TUNNEL()

Method Detail

down

public void down(Event evt)
Caller by the layer above this layer. We just pass it on to the router.

getName

public String getName()

handleIncomingMessage

public void handleIncomingMessage(Message msg)

init

public void init()

run

public void run()

setProperties

public boolean setProperties(Properties props)
Setup the Protocol instance acording to the configuration string

start

public void start()

startUpHandler

public void startUpHandler()
This prevents the up-handler thread to be created, which essentially is superfluous: messages are received from the network rather than from a layer below. DON'T REMOVE !

stop

public void stop()

toString

public String toString()
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.