|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
C
- The type of the service's configuration.public interface MulticastReceiver<C extends MulticastReceiverConfiguration>
Service for receiving multicast UDP datagrams, one per bound network interface.
This services typically listens on a socket for UDP datagrams, the socket has joined the configured multicast group.
This listening loop is started with the run()
method,
this service is Runnable
. Any received datagram is then converted into an
IncomingDatagramMessage
and
handled by the
Router.received(org.fourthline.cling.model.message.IncomingDatagramMessage)
method. This conversion is the job of the DatagramProcessor
.
An implementation has to be thread-safe.
Method Summary | |
---|---|
C |
getConfiguration()
|
void |
init(NetworkInterface networkInterface,
Router router,
NetworkAddressFactory networkAddressFactory,
DatagramProcessor datagramProcessor)
Configures the service and starts any listening sockets. |
void |
stop()
Stops the service, closes any listening sockets. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Method Detail |
---|
void init(NetworkInterface networkInterface, Router router, NetworkAddressFactory networkAddressFactory, DatagramProcessor datagramProcessor) throws InitializationException
networkInterface
- The network interface on which to join the multicast group on.router
- The router which handles received IncomingDatagramMessage
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.
InitializationException
- If the service could not be initialized or started.void stop()
C getConfiguration()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |