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 MulticastReceiverConfigurationImpl
protected DatagramProcessor
protected InetSocketAddress
protected NetworkInterface
protected NetworkAddressFactory
protected Router
protected MulticastSocket
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
init
(NetworkInterface networkInterface, Router router, NetworkAddressFactory networkAddressFactory, DatagramProcessor datagramProcessor) Configures the service and starts any listening sockets.void
run()
void
stop()
Stops the service, closes any listening sockets.
-
Felddetails
-
configuration
-
router
-
networkAddressFactory
-
datagramProcessor
-
multicastInterface
-
multicastAddress
-
socket
-
-
Konstruktordetails
-
MulticastReceiverImpl
-
-
Methodendetails
-
getConfiguration
- Angegeben von:
getConfiguration
in 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:MulticastReceiver
Configures the service and starts any listening sockets.- Angegeben von:
init
in SchnittstelleMulticastReceiver<MulticastReceiverConfigurationImpl>
- Parameter:
networkInterface
- The network interface on which to join the multicast group on.router
- The router which handles receivedIncomingDatagramMessage
s.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:MulticastReceiver
Stops the service, closes any listening sockets.- Angegeben von:
stop
in SchnittstelleMulticastReceiver<MulticastReceiverConfigurationImpl>
-
run
-