|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.protocols.UDP_NIO.ConnectorTable
public static class UDP_NIO.ConnectorTable
Manages a bunch of Connectors
Constructor Summary | |
---|---|
UDP_NIO.ConnectorTable(java.net.InetSocketAddress mcast_addr,
int receive_buffer_size,
int receive_sock_buf_size,
boolean ip_mcast,
org.jgroups.protocols.Receiver receiver)
|
Method Summary | |
---|---|
java.util.List |
getConnectorAddresses()
Returns a list of local addresses (one for each Connector) |
org.jgroups.protocols.Receiver |
getReceiver()
|
void |
listenOn(java.lang.String bind_interface,
int local_port,
int port_range,
int receive_buffer_size,
int receiver_sock_buf_size,
int send_sock_buf_size,
int ip_ttl,
org.jgroups.protocols.Receiver receiver)
Adds the given interface address to the list of interfaces on which the receiver mcast socket has to listen. |
void |
receive(java.net.DatagramPacket packet)
Called when data has been received on a socket. |
static void |
receivePacket(java.net.DatagramPacket packet,
java.net.DatagramSocket sock,
org.jgroups.protocols.Receiver receiver)
|
void |
run()
|
void |
send(java.net.DatagramPacket msg)
Sends a packet. |
void |
setReceiver(org.jgroups.protocols.Receiver receiver)
|
void |
start()
Get all interfaces, create one Connector per interface and call start() on it |
void |
stop()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UDP_NIO.ConnectorTable(java.net.InetSocketAddress mcast_addr, int receive_buffer_size, int receive_sock_buf_size, boolean ip_mcast, org.jgroups.protocols.Receiver receiver) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public org.jgroups.protocols.Receiver getReceiver()
public void setReceiver(org.jgroups.protocols.Receiver receiver)
public void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public void run()
run
in interface java.lang.Runnable
public java.util.List getConnectorAddresses()
public void send(java.net.DatagramPacket msg) throws java.lang.Exception
msg
-
java.lang.Exception
public void listenOn(java.lang.String bind_interface, int local_port, int port_range, int receive_buffer_size, int receiver_sock_buf_size, int send_sock_buf_size, int ip_ttl, org.jgroups.protocols.Receiver receiver) throws java.io.IOException
bind_interface
- local_port
- port_range
- receive_buffer_size
-
java.io.IOException
public void receive(java.net.DatagramPacket packet)
buf
must be processed on a separate thread, it needs to be copied.
This method might be called concurrently by multiple threads, so it has to be reentrant
public java.lang.String toString()
toString
in class java.lang.Object
public static void receivePacket(java.net.DatagramPacket packet, java.net.DatagramSocket sock, org.jgroups.protocols.Receiver receiver) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |