Klasse MulticastReceiverImpl
java.lang.Object
org.jupnp.transport.impl.MulticastReceiverImpl
- Alle implementierten Schnittstellen:
Runnable,MulticastReceiver<MulticastReceiverConfigurationImpl>
public class MulticastReceiverImpl
extends Object
implements MulticastReceiver<MulticastReceiverConfigurationImpl>
Default implementation based on a UDP
MulticastSocket.
Thread-safety is guaranteed through synchronization of methods of this service and by the thread-safe underlying socket.
- Autor:
- Christian Bauer
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected final MulticastReceiverConfigurationImplprotected DatagramProcessorprotected InetSocketAddressprotected NetworkInterfaceprotected NetworkAddressFactoryprotected Routerprotected MulticastSocket -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidinit(NetworkInterface networkInterface, Router router, NetworkAddressFactory networkAddressFactory, DatagramProcessor datagramProcessor) Configures the service and starts any listening sockets.voidrun()voidstop()Stops the service, closes any listening sockets.
-
Felddetails
-
configuration
-
router
-
networkAddressFactory
-
datagramProcessor
-
multicastInterface
-
multicastAddress
-
socket
-
-
Konstruktordetails
-
MulticastReceiverImpl
-
-
Methodendetails
-
getConfiguration
- Angegeben von:
getConfigurationin SchnittstelleMulticastReceiver<MulticastReceiverConfigurationImpl>- Gibt zurück:
- This service's configuration.
-
init
public void init(NetworkInterface networkInterface, Router router, NetworkAddressFactory networkAddressFactory, DatagramProcessor datagramProcessor) throws InitializationException Beschreibung aus Schnittstelle kopiert:MulticastReceiverConfigures the service and starts any listening sockets.- Angegeben von:
initin SchnittstelleMulticastReceiver<MulticastReceiverConfigurationImpl>- Parameter:
networkInterface- The network interface on which to join the multicast group on.router- The router which handles receivedIncomingDatagramMessages.networkAddressFactory- The network address factory to use for local address lookup given a local interface and a remote address.datagramProcessor- Reads and writes datagrams.- Löst aus:
InitializationException- If the service could not be initialized or started.
-
stop
public void stop()Beschreibung aus Schnittstelle kopiert:MulticastReceiverStops the service, closes any listening sockets.- Angegeben von:
stopin SchnittstelleMulticastReceiver<MulticastReceiverConfigurationImpl>
-
run
-