org.fourthline.cling

## Class UpnpServiceImpl

- java.lang.Object
- - org.fourthline.cling.UpnpServiceImpl

- All Implemented Interfaces:
    UpnpService

      @Alternative
      public class UpnpServiceImpl
      extends Object
      implements UpnpService

  Default implementation of `UpnpService`, starts immediately on construction.

  If no `UpnpServiceConfiguration` is provided it will automatically instantiate `DefaultUpnpServiceConfiguration`. This configuration does not work on Android! Use the `AndroidUpnpService` application component instead.

  Override the various `create...()` methods to customize instantiation of protocol factory, router, etc.

  Author:
    Christian Bauer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.fourthline.cling.UpnpService

      `UpnpService.Shutdown, UpnpService.Start`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected UpnpServiceConfiguration` | `configuration`
    `protected ControlPoint` | `controlPoint`
    `protected ProtocolFactory` | `protocolFactory`
    `protected Registry` | `registry`
    `protected Router` | `router`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UpnpServiceImpl()`
    `UpnpServiceImpl(RegistryListener... registryListeners)`
    `UpnpServiceImpl(UpnpServiceConfiguration configuration, RegistryListener... registryListeners)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected ControlPoint` | `createControlPoint(ProtocolFactory protocolFactory, Registry registry)`
    `protected ProtocolFactory` | `createProtocolFactory()`
    `protected Registry` | `createRegistry(ProtocolFactory protocolFactory)`
    `protected Router` | `createRouter(ProtocolFactory protocolFactory, Registry registry)`
    `UpnpServiceConfiguration` | `getConfiguration()`
    `ControlPoint` | `getControlPoint()`
    `ProtocolFactory` | `getProtocolFactory()`
    `Registry` | `getRegistry()`
    `Router` | `getRouter()`
    `void` | `shutdown()` Stopping the UPnP stack.
    `protected void` | `shutdown(boolean separateThread)`
    `protected void` | `shutdownConfiguration()`
    `protected void` | `shutdownRegistry()`
    `protected void` | `shutdownRouter()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### configuration

          protected final UpnpServiceConfiguration configuration

    - #### controlPoint

          protected final ControlPoint controlPoint

    - #### protocolFactory

          protected final ProtocolFactory protocolFactory

    - #### registry

          protected final Registry registry

    - #### router

          protected final Router router

  - ### Constructor Detail

    - #### UpnpServiceImpl

          public UpnpServiceImpl()

    - #### UpnpServiceImpl

          public UpnpServiceImpl(RegistryListener... registryListeners)

    - #### UpnpServiceImpl

          public UpnpServiceImpl(UpnpServiceConfiguration configuration,
                                 RegistryListener... registryListeners)

  - ### Method Detail

    - #### createProtocolFactory

          protected ProtocolFactory createProtocolFactory()

    - #### createRegistry

          protected Registry createRegistry(ProtocolFactory protocolFactory)

    - #### createRouter

          protected Router createRouter(ProtocolFactory protocolFactory,
                                        Registry registry)

    - #### createControlPoint

          protected ControlPoint createControlPoint(ProtocolFactory protocolFactory,
                                                    Registry registry)

    - #### getConfiguration

          public UpnpServiceConfiguration getConfiguration()

      Specified by:
        `getConfiguration` in interface `UpnpService`

    - #### getControlPoint

          public ControlPoint getControlPoint()

      Specified by:
        `getControlPoint` in interface `UpnpService`

    - #### getProtocolFactory

          public ProtocolFactory getProtocolFactory()

      Specified by:
        `getProtocolFactory` in interface `UpnpService`

    - #### getRegistry

          public Registry getRegistry()

      Specified by:
        `getRegistry` in interface `UpnpService`

    - #### getRouter

          public Router getRouter()

      Specified by:
        `getRouter` in interface `UpnpService`

    - #### shutdown

          public void shutdown()

      Description copied from interface: `UpnpService`
      Stopping the UPnP stack.

      Clients are required to stop the UPnP stack properly. Notifications for disappearing devices will be multicast'ed, existing event subscriptions cancelled.

      Specified by:
        `shutdown` in interface `UpnpService`

    - #### shutdown

          protected void shutdown(boolean separateThread)

    - #### shutdownRegistry

          protected void shutdownRegistry()

    - #### shutdownRouter

          protected void shutdownRouter()

    - #### shutdownConfiguration

          protected void shutdownConfiguration()

Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.