|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.auxiliary.lateral.socket.tcp.discovery.UDPDiscoverySender
public class UDPDiscoverySender
This is a generic sender for the UDPDiscovery process.
| Constructor Summary | |
|---|---|
UDPDiscoverySender(java.lang.String host,
int port)
Constructor for the UDPDiscoverySender object This sender can be used to send multiple messages. |
|
| Method Summary | |
|---|---|
void |
destroy()
Closes the socket connection. |
void |
finalize()
Just being careful about closing the socket. |
void |
passiveBroadcast(java.lang.String host,
int port,
java.util.ArrayList cacheNames)
This sends a message braodcasting our that the host and port is available for connections. |
protected void |
passiveBroadcast(java.lang.String host,
int port,
java.util.ArrayList cacheNames,
long listenerId)
This allows you to set the sender id. |
void |
requestBroadcast()
Ask other to broadcast their info the the multicast address. |
void |
send(UDPDiscoveryMessage message)
Send messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UDPDiscoverySender(java.lang.String host,
int port)
throws java.io.IOException
This sender can be used to send multiple messages.
When you are done sending, you should destroy the socket sender.
host - port -
java.io.IOException| Method Detail |
|---|
public void destroy()
public void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public void send(UDPDiscoveryMessage message)
throws java.io.IOException
message -
java.io.IOException
public void requestBroadcast()
throws java.io.IOException
java.io.IOException
public void passiveBroadcast(java.lang.String host,
int port,
java.util.ArrayList cacheNames)
throws java.io.IOException
It uses the vmid as the requesterDI
host - port - cacheNames -
java.io.IOException
protected void passiveBroadcast(java.lang.String host,
int port,
java.util.ArrayList cacheNames,
long listenerId)
throws java.io.IOException
host - port - cacheNames - listenerId -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||