org.jgroups.protocols
Class AUTOCONF
public
class
AUTOCONF
extends Protocol
Senses the network configuration when it is initialized (in init()) and sends a CONFIG event up
and down the stack. The CONFIG event contains a hashmap, with strings as keys (e.g. "frag_size")
and Objects as values. Certain protocols can set some of their properties when receiving the CONFIG
event.
This protocol should be placed above the transport protocol (e.g. UDP). It is not needed for TCP.
Example: senses the network send and receive buffers, plus the max size of a message to be sent and
generates a CONFIG event containing "frag_size", "send_buf_size" and "receive_buf_size" keys.
Author: Bela Ban
Method Summary |
String | getName() |
void | init() |
static void | main(String[] args) |
int | senseMaxFragSize()
Tries to find out the max number of bytes in a DatagramPacket we can send by sending increasingly
larger packets, until there is an exception (e.g., java.io.IOException: message too long). |
static int | senseMaxFragSizeStatic() |
boolean | setProperties(Properties props)
Setup the Protocol instance acording to the configuration string |
void | start() |
void | startDownHandler()
Leave empty: no down_thread will be created, but the down_thread of the neighbor above us will be used |
void | startUpHandler()
Leave empty: no up_thread will be created, but the up_thread of the neighbor below us will be used |
public String getName()
public void init()
public static void main(String[] args)
public int senseMaxFragSize()
Tries to find out the max number of bytes in a DatagramPacket we can send by sending increasingly
larger packets, until there is an exception (e.g., java.io.IOException: message too long).
public static int senseMaxFragSizeStatic()
public boolean setProperties(Properties props)
Setup the Protocol instance acording to the configuration string
public void start()
public void startDownHandler()
Leave empty: no down_thread will be created, but the down_thread of the neighbor above us will be used
public void startUpHandler()
Leave empty: no up_thread will be created, but the up_thread of the neighbor below us will be used
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.