org.jgroups.protocols

Class TUNNEL

Implemented Interfaces:
Runnable

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

Field Summary

Fields inherited from class org.jgroups.stack.Protocol

down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, up_handler, up_prot, up_queue, up_thread, up_thread_prio

Constructor Summary

TUNNEL()

Method Summary

void
down(Event evt)
Caller by the layer above this layer.
String
getName()
void
handleIncomingMessage(Message msg)
void
run()
boolean
setProperties(Properties props)
Setup the Protocol instance acording to the configuration string
void
start()
void
stop()
String
toString()

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, passDown, passUp, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setUpProtocol, start, startDownHandler, startUpHandler, stop, stopInternal, up

Constructor Details

TUNNEL

public TUNNEL()

Method Details

down

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


getName

public String getName()
Overrides:
getName in interface Protocol


handleIncomingMessage

public void handleIncomingMessage(Message msg)


run

public void run()


setProperties

public boolean setProperties(Properties props)
Setup the Protocol instance acording to the configuration string
Overrides:
setProperties in interface Protocol


start

public void start()
            throws Exception
Overrides:
start in interface Protocol


stop

public void stop()
Overrides:
stop in interface Protocol


toString

public String toString()


Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.