|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.utils.discovery.UDPDiscoverySender
public class UDPDiscoverySender
This is a generic sender for the UDPDiscovery process.
Constructor Summary | |
---|---|
UDPDiscoverySender(String host,
int port)
Constructor for the UDPDiscoverySender object |
Method Summary | |
---|---|
void |
destroy()
Closes the socket connection. |
void |
finalize()
Just being careful about closing the socket. |
void |
passiveBroadcast(String host,
int port,
ArrayList cacheNames)
This sends a message broadcasting out that the host and port is available for connections. |
protected void |
passiveBroadcast(String host,
int port,
ArrayList cacheNames,
long listenerId)
This allows you to set the sender id. |
void |
removeBroadcast(String host,
int port,
ArrayList cacheNames)
This sends a message broadcasting our that the host and port is no longer available. |
protected void |
removeBroadcast(String host,
int port,
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(String host, int port) throws IOException
This sender can be used to send multiple messages.
When you are done sending, you should destroy the socket sender.
host
- port
-
IOException
Method Detail |
---|
public void destroy()
public void finalize() throws Throwable
finalize
in class Object
Throwable
public void send(UDPDiscoveryMessage message) throws IOException
message
-
IOException
public void requestBroadcast() throws IOException
IOException
public void passiveBroadcast(String host, int port, ArrayList cacheNames) throws IOException
It uses the vmid as the requesterDI
host
- port
- cacheNames
-
IOException
protected void passiveBroadcast(String host, int port, ArrayList cacheNames, long listenerId) throws IOException
host
- port
- cacheNames
- names of the cache regionslistenerId
-
IOException
public void removeBroadcast(String host, int port, ArrayList cacheNames) throws IOException
It uses the vmid as the requesterID
host
- hostport
- portcacheNames
- names of the cache regions
IOException
- on errorprotected void removeBroadcast(String host, int port, ArrayList cacheNames, long listenerId) throws IOException
host
- hostport
- portcacheNames
- names of the cache regionslistenerId
- listener ID
IOException
- on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |