Logo Search packages:      
Sourcecode: libjgroups-java version File versions

org::jgroups::protocols::TUNNEL Class Reference

Inheritance diagram for org::jgroups::protocols::TUNNEL:

org::jgroups::protocols::TP org::jgroups::stack::Protocol

List of all members.

Detailed Description

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.

Bela Ban

Definition at line 41 of file TUNNEL.java.

Public Member Functions

void destroy ()
Object down (Event evt)
boolean downThreadEnabled ()
Map< String, Object > dumpStats ()
void enableStats (boolean flag)
String getBindAddress ()
int getBindPort ()
boolean getBindToAllInterfaces ()
String getChannelName ()
Executor getDefaultThreadPool ()
ThreadFactory getDefaultThreadPoolThreadFactory ()
Protocol getDownProtocol ()
long getIncomingKeepAliveTime ()
int getIncomingMaxPoolSize ()
int getIncomingMaxQueueSize ()
long getIncomingMessages ()
int getIncomingMinPoolSize ()
int getIncomingPoolSize ()
int getIncomingQueueSize ()
String getInfo ()
Address getLocalAddress ()
int getMaxBundleSize ()
long getMaxBundleTimeout ()
String getName ()
long getNumBytesReceived ()
long getNumBytesSent ()
long getNumMessagesReceived ()
long getNumMessagesSent ()
long getOOBKeepAliveTime ()
int getOOBMaxPoolSize ()
int getOOBMaxQueueSize ()
long getOOBMessages ()
int getOOBMinPoolSize ()
int getOOBPoolSize ()
int getOOBQueueSize ()
Executor getOOBThreadPool ()
ThreadFactory getOOBThreadPoolThreadFactory ()
Properties getProperties ()
ProtocolStack getProtocolStack ()
java.util.List getReceiveInterfaces ()
java.util.List getSendInterfaces ()
String getSingletonName ()
ThreadFactory getThreadFactory ()
String getThreadNamingPattern ()
TimeScheduler getTimer ()
ThreadFactory getTimerThreadFactory ()
Protocol getUpProtocol ()
ConcurrentMap< String, ProtocolgetUpProtocols ()
Object handleDownEvent (Event evt)
void init () throws Exception
boolean isDefaulThreadPoolEnabled ()
boolean isDiscardIncompatiblePackets ()
boolean isEnable_unicast_bundling ()
boolean isEnableBundling ()
boolean isLoopback ()
boolean isOOBThreadPoolEnabled ()
boolean isReceiveOnAllInterfaces ()
boolean isSendOnAllInterfaces ()
boolean isUseIncomingPacketHandler ()
void postUnmarshalling (Message msg, Address dest, Address src, boolean multicast)
void postUnmarshallingList (Message msg, Address dest, boolean multicast)
String printStats ()
Vector< Integer > providedDownServices ()
Vector< Integer > providedUpServices ()
Vector< Integer > requiredDownServices ()
Vector< Integer > requiredUpServices ()
void resetStats ()
void sendToAllMembers (byte[] data, int offset, int length) throws Exception
void sendToSingleMember (Address dest, byte[] data, int offset, int length) throws Exception
void sendUpLocalAddressEvent ()
void setBindAddress (String bind_addr) throws UnknownHostException
void setBindPort (int port)
void setBindToAllInterfaces (boolean flag)
void setDefaultThreadPool (Executor thread_pool)
void setDefaultThreadPoolThreadFactory (ThreadFactory factory)
void setDiscardIncompatiblePackets (boolean flag)
void setDownProtocol (Protocol down_prot)
void setEnable_unicast_bundling (boolean enable_unicast_bundling)
void setEnableBundling (boolean flag)
void setIncomingKeepAliveTime (long time)
void setIncomingMaxPoolSize (int size)
void setIncomingMinPoolSize (int size)
void setLoopback (boolean b)
void setMaxBundleSize (int size)
void setMaxBundleTimeout (long timeout)
void setOOBKeepAliveTime (long time)
void setOOBMaxPoolSize (int size)
void setOOBMinPoolSize (int size)
void setOOBThreadPool (Executor oob_thread_pool)
void setOOBThreadPoolThreadFactory (ThreadFactory factory)
boolean setProperties (Properties props)
boolean setPropertiesInternal (Properties props)
void setProtocolStack (ProtocolStack stack)
void setThreadFactory (ThreadFactory factory)
void setTimerThreadFactory (ThreadFactory factory)
void setUpProtocol (Protocol up_prot)
void start () throws Exception
boolean statsEnabled ()
void stop ()
String toString ()
Object up (Event evt)
boolean upThreadEnabled ()

Protected Member Functions

TP getTransport ()
void handleConfigEvent (Map< String, Object > map)
void handleConnect () throws Exception
void handleDisconnect ()
void passToAllUpProtocols (Event evt)
final void receive (Address dest, Address sender, byte[] data, int offset, int length)
void setThreadNames ()
void unsetThreadNames ()

Static Protected Member Functions

static ExecutorService createThreadPool (int min_threads, int max_threads, long keep_alive_time, String rejection_policy, BlockingQueue< Runnable > queue, final ThreadFactory factory)

Protected Attributes

InetAddress bind_addr = null
String channel_name = null
boolean discard_incompatible_packets = false
Protocol down_prot = null
ThreadFactory global_thread_factory = null
Address local_addr = null
final Log log = LogFactory.getLog(this.getClass())
final HashSet< Addressmembers = new HashSet<Address>(11)
boolean persistent_ports = false
String persistent_ports_file = null
PortsManager pm = null
long pm_expiry_time = 30000L
final Properties props = new Properties()
ProtocolStack stack = null
boolean stats = true
String thread_naming_pattern = "cl"
TimeScheduler timer = null
ThreadFactory timer_thread_factory
Protocol up_prot = null
View view = null

Package Functions

void teardownTunnel ()

Static Package Functions

 [static initializer]

Package Attributes

byte[] additional_data = null
int bind_port = 0
int connect_count = 0
ThreadFactory default_thread_factory = null
String diagnostics_addr = ""
int diagnostics_port = 7500
final DataInputStream dis = new DataInputStream(in_stream)
boolean enable_bundling = false
boolean enable_diagnostics = true
boolean enable_unicast_bundling = true
TpHeader header
final ExposedByteArrayInputStream in_stream = new ExposedByteArrayInputStream(new byte[]{'0'})
IncomingMessageHandler incoming_msg_handler
Queue incoming_msg_queue = null
IncomingPacketHandler incoming_packet_handler = null
Queue incoming_packet_queue = null
int init_count = 0
boolean loopback = false
int max_bundle_size = 65535
long max_bundle_timeout = 20
final String name = getName()
long num_bytes_received = 0
long num_bytes_sent = 0
long num_incoming_msgs_received = 0
long num_msgs_received = 0
long num_msgs_sent = 0
long num_oob_msgs_received = 0
int num_timer_threads = 4
ThreadFactory oob_thread_factory = null
Executor oob_thread_pool
boolean oob_thread_pool_enabled = true
long oob_thread_pool_keep_alive_time = 30000
int oob_thread_pool_max_threads = 10
int oob_thread_pool_min_threads = 2
BlockingQueue< Runnable > oob_thread_pool_queue = null
boolean oob_thread_pool_queue_enabled = true
int oob_thread_pool_queue_max_size = 500
String oob_thread_pool_rejection_policy = "Run"
ThreadGroup pool_thread_group = new ThreadGroup(Util.getGlobalThreadGroup(), "Thread Pools")
int port_range = 1
List< NetworkInterface > receive_interfaces = null
boolean receive_on_all_interfaces = false
long reconnect_interval = 5000
List< NetworkInterface > send_interfaces = null
boolean send_on_all_interfaces = false
String singleton_name = null
Executor thread_pool
boolean thread_pool_enabled = true
long thread_pool_keep_alive_time = 30000
int thread_pool_max_threads = 10
int thread_pool_min_threads = 2
BlockingQueue< Runnable > thread_pool_queue = null
boolean thread_pool_queue_enabled = true
int thread_pool_queue_max_size = 500
String thread_pool_rejection_policy = "Run"
boolean use_concurrent_stack = true
boolean use_incoming_packet_handler = true
boolean use_local_host = false

Static Package Attributes

static NumberFormat f
static final byte LIST = 1
static final byte MULTICAST = 2
static final byte OOB = 4

Private Member Functions

void startReconnecting ()
void stopReconnecting ()

Private Attributes

volatile boolean intentionallyTornDown = false
Future<?> reconnectorFuture = null
final Lock reconnectorLock = new ReentrantLock()
String router_host = null
int router_port = 0
RouterStub stub


class  StubConnectionListener
class  TunnelReceiver

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index