Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.transport.spi
Interface MulticastReceiver<C extends MulticastReceiverConfiguration>

Type Parameters:
  `C` - The type of the service's configuration.

All Superinterfaces:
  Runnable

All Known Implementing Classes:
  MulticastReceiverImpl

    public interface MulticastReceiver<C extends MulticastReceiverConfiguration>

extends Runnable

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.teleal.cling.model.message.IncomingDatagramMessage)` method. This conversion is the job of the `DatagramProcessor`.

An implementation has to be thread-safe.

Author:
  Christian Bauer

Method Summary
`C` | `getConfiguration()`
`void` | `init(NetworkInterface networkInterface, Router router, 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

### init

    void init(NetworkInterface networkInterface,
              Router router,
              DatagramProcessor datagramProcessor)
              throws InitializationException

  Configures the service and starts any listening sockets.

  Parameters:
    `networkInterface` - The network interface on which to join the multicast group on.
    `router` - The router which handles received `IncomingDatagramMessage`s.
    `datagramProcessor` - Reads and writes datagrams.
  Throws:
    `InitializationException` - If the service could not be initialized or started.

### stop

    void stop()

  Stops the service, closes any listening sockets.

### getConfiguration

    C getConfiguration()

  Returns:
    This service's configuration.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.