Class UDPDiscoveryReceiver
java.lang.Object
org.apache.commons.jcs3.utils.discovery.UDPDiscoveryReceiver
- All Implemented Interfaces:
Runnable
,IShutdownObserver
Receives UDP Discovery messages.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Deprecated.No longer used -
Constructor Summary
ConstructorsConstructorDescriptionUDPDiscoveryReceiver
(UDPDiscoveryService service, String multicastInterfaceString, String multicastAddressString, int multicastPort) Constructor for the UDPDiscoveryReceiver object.UDPDiscoveryReceiver
(UDPDiscoveryService service, String multicastInterfaceString, InetAddress multicastAddress, int multicastPort) Constructor for the UDPDiscoveryReceiver object. -
Method Summary
Modifier and TypeMethodDescriptionint
getCnt()
void
run()
Main processing method for the UDPDiscoveryReceiver objectvoid
setCnt
(int cnt) protected void
setSerializer
(IElementSerializer serializer) For testingvoid
shutdown()
Shuts down the socket.Deprecated.no longer used
-
Constructor Details
-
UDPDiscoveryReceiver
public UDPDiscoveryReceiver(UDPDiscoveryService service, String multicastInterfaceString, String multicastAddressString, int multicastPort) throws IOException Constructor for the UDPDiscoveryReceiver object.We determine our own host using InetAddress
- Parameters:
service
-multicastInterfaceString
-multicastAddressString
-multicastPort
-- Throws:
IOException
-
UDPDiscoveryReceiver
public UDPDiscoveryReceiver(UDPDiscoveryService service, String multicastInterfaceString, InetAddress multicastAddress, int multicastPort) throws IOException Constructor for the UDPDiscoveryReceiver object.- Parameters:
service
-multicastInterfaceString
-multicastAddress
-multicastPort
-- Throws:
IOException
- Since:
- 3.1
-
-
Method Details
-
waitForMessage
Deprecated.no longer usedWait for multicast message- Returns:
- the object message
- Throws:
IOException
-
run
Main processing method for the UDPDiscoveryReceiver object -
setCnt
- Parameters:
cnt
- The cnt to set.
-
getCnt
- Returns:
- Returns the cnt.
-
setSerializer
For testing- Parameters:
serializer
- the serializer to set- Since:
- 3.1
-
shutdown
Shuts down the socket.- Specified by:
shutdown
in interfaceIShutdownObserver
-