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
Class DefaultUpnpServiceConfiguration

    java.lang.Object
      org.teleal.cling.DefaultUpnpServiceConfiguration

All Implemented Interfaces:
  UpnpServiceConfiguration

Direct Known Subclasses:
  AndroidUpnpServiceConfiguration

    public class DefaultUpnpServiceConfiguration

extends Object
implements UpnpServiceConfiguration

Default configuration data of a typical UPnP stack.

This configuration utilizes the default network transport implementation found in `org.teleal.cling.transport.impl`.

This configuration utilizes the DOM default descriptor binders found in `org.teleal.cling.binding.xml`.

The thread `Executor` is an `Executors.newCachedThreadPool()` with a custom `DefaultUpnpServiceConfiguration.ClingThreadFactory` (it only sets a thread name).

Note that this pool is effectively unlimited, so the number of threads will grow (and shrink) as needed - or restricted by your JVM.

The default `Namespace` is configured without any base path or prefix.

Author:
  Christian Bauer

Nested Class Summary
`static class` | `DefaultUpnpServiceConfiguration.ClingExecutor`
`static class` | `DefaultUpnpServiceConfiguration.ClingThreadFactory`

Constructor Summary
`` | `DefaultUpnpServiceConfiguration()` Defaults to port '0', ephemeral.
`protected` | `DefaultUpnpServiceConfiguration(boolean checkRuntime)`
`` | `DefaultUpnpServiceConfiguration(int streamListenPort)`
`protected` | `DefaultUpnpServiceConfiguration(int streamListenPort, boolean checkRuntime)`

Method Summary
`DatagramIO` | `createDatagramIO(NetworkAddressFactory networkAddressFactory)`
`protected DatagramProcessor` | `createDatagramProcessor()`
`protected Executor` | `createDefaultExecutor()`
`protected DeviceDescriptorBinder` | `createDeviceDescriptorBinderUDA10()`
`protected GENAEventProcessor` | `createGENAEventProcessor()`
`MulticastReceiver` | `createMulticastReceiver(NetworkAddressFactory networkAddressFactory)`
`protected Namespace` | `createNamespace()`
`NetworkAddressFactory` | `createNetworkAddressFactory()`
`protected NetworkAddressFactory` | `createNetworkAddressFactory(int streamListenPort)`
`protected ServiceDescriptorBinder` | `createServiceDescriptorBinderUDA10()`
`protected SOAPActionProcessor` | `createSOAPActionProcessor()`
`StreamClient` | `createStreamClient()`
`StreamServer` | `createStreamServer(NetworkAddressFactory networkAddressFactory)`
`Executor` | `getAsyncProtocolExecutor()`
`Executor` | `getDatagramIOExecutor()`
`DatagramProcessor` | `getDatagramProcessor()`
`protected Executor` | `getDefaultExecutor()`
`DeviceDescriptorBinder` | `getDeviceDescriptorBinderUDA10()`
`ServiceType[]` | `getExclusiveServiceTypes()` Returns service types that can be handled by this UPnP stack, all others will be ignored.
`GENAEventProcessor` | `getGenaEventProcessor()`
`Executor` | `getMulticastReceiverExecutor()`
`Namespace` | `getNamespace()`
`Executor` | `getRegistryListenerExecutor()`
`Executor` | `getRegistryMaintainerExecutor()`
`int` | `getRegistryMaintenanceIntervalMillis()`
`ServiceDescriptorBinder` | `getServiceDescriptorBinderUDA10()`
`SOAPActionProcessor` | `getSoapActionProcessor()`
`Executor` | `getStreamServerExecutor()`
`Executor` | `getSyncProtocolExecutor()`
`void` | `shutdown()` Called by the `UpnpService` on shutdown, useful to e.g.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultUpnpServiceConfiguration

    public DefaultUpnpServiceConfiguration()

  Defaults to port '0', ephemeral.

### DefaultUpnpServiceConfiguration

    public DefaultUpnpServiceConfiguration(int streamListenPort)

### DefaultUpnpServiceConfiguration

    protected DefaultUpnpServiceConfiguration(boolean checkRuntime)

### DefaultUpnpServiceConfiguration

    protected DefaultUpnpServiceConfiguration(int streamListenPort,
                                              boolean checkRuntime)

Method Detail

### getDatagramProcessor

    public DatagramProcessor getDatagramProcessor()

  Specified by:
    `getDatagramProcessor` in interface `UpnpServiceConfiguration`
  Returns:
    The shared implementation of `DatagramProcessor`.

### getSoapActionProcessor

    public SOAPActionProcessor getSoapActionProcessor()

  Specified by:
    `getSoapActionProcessor` in interface `UpnpServiceConfiguration`
  Returns:
    The shared implementation of `SOAPActionProcessor`.

### getGenaEventProcessor

    public GENAEventProcessor getGenaEventProcessor()

  Specified by:
    `getGenaEventProcessor` in interface `UpnpServiceConfiguration`
  Returns:
    The shared implementation of `GENAEventProcessor`.

### createStreamClient

    public StreamClient createStreamClient()

  Specified by:
    `createStreamClient` in interface `UpnpServiceConfiguration`
  Returns:
    A new instance of the `StreamClient` interface.

### createMulticastReceiver

    public MulticastReceiver createMulticastReceiver(NetworkAddressFactory networkAddressFactory)

  Specified by:
    `createMulticastReceiver` in interface `UpnpServiceConfiguration`
  Parameters:
    `networkAddressFactory` - The configured `NetworkAddressFactory`.
  Returns:
    A new instance of the `MulticastReceiver` interface.

### createDatagramIO

    public DatagramIO createDatagramIO(NetworkAddressFactory networkAddressFactory)

  Specified by:
    `createDatagramIO` in interface `UpnpServiceConfiguration`
  Parameters:
    `networkAddressFactory` - The configured `NetworkAddressFactory`.
  Returns:
    A new instance of the `DatagramIO` interface.

### createStreamServer

    public StreamServer createStreamServer(NetworkAddressFactory networkAddressFactory)

  Specified by:
    `createStreamServer` in interface `UpnpServiceConfiguration`
  Parameters:
    `networkAddressFactory` - The configured `NetworkAddressFactory`.
  Returns:
    A new instance of the `StreamServer` interface.

### getMulticastReceiverExecutor

    public Executor getMulticastReceiverExecutor()

  Specified by:
    `getMulticastReceiverExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the listening background threads for multicast datagrams.

### getDatagramIOExecutor

    public Executor getDatagramIOExecutor()

  Specified by:
    `getDatagramIOExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the listening background threads for unicast datagrams.

### getStreamServerExecutor

    public Executor getStreamServerExecutor()

  Specified by:
    `getStreamServerExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the listening background threads for HTTP requests.

### getDeviceDescriptorBinderUDA10

    public DeviceDescriptorBinder getDeviceDescriptorBinderUDA10()

  Specified by:
    `getDeviceDescriptorBinderUDA10` in interface `UpnpServiceConfiguration`
  Returns:
    The shared implementation of `DeviceDescriptorBinder` for the UPnP 1.0 Device Architecture..

### getServiceDescriptorBinderUDA10

    public ServiceDescriptorBinder getServiceDescriptorBinderUDA10()

  Specified by:
    `getServiceDescriptorBinderUDA10` in interface `UpnpServiceConfiguration`
  Returns:
    The shared implementation of `ServiceDescriptorBinder` for the UPnP 1.0 Device Architecture..

### getExclusiveServiceTypes

    public ServiceType[] getExclusiveServiceTypes()

  Description copied from interface: `UpnpServiceConfiguration`
  Returns service types that can be handled by this UPnP stack, all others will be ignored.

  Return `null` to completely disable remote device and service discovery. All incoming notifications and search responses will then be dropped immediately. This is mostly useful in applications that only provide services with no (remote) control point functionality.

  Note that a discovered service type with version 2 or 3 will match an exclusive service type with version 1. UPnP services are required to be backwards compatible, version 2 is a superset of version 1, and version 3 is a superset of version 2, etc.

  Specified by:
    `getExclusiveServiceTypes` in interface `UpnpServiceConfiguration`
  Returns:
    An array of service types that are exclusively discovered, no other service will be discovered. A `null` return value will disable discovery! An empty array means all services will be discovered.

### getRegistryMaintenanceIntervalMillis

    public int getRegistryMaintenanceIntervalMillis()

  Specified by:
    `getRegistryMaintenanceIntervalMillis` in interface `UpnpServiceConfiguration`
  Returns:
    The time in milliseconds to wait between each registry maintenance operation.

### getAsyncProtocolExecutor

    public Executor getAsyncProtocolExecutor()

  Specified by:
    `getAsyncProtocolExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the processing of asynchronous aspects of the UPnP stack (discovery).

### getSyncProtocolExecutor

    public Executor getSyncProtocolExecutor()

  Specified by:
    `getSyncProtocolExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the processing of synchronous aspects of the UPnP stack (description, control, GENA).

### getNamespace

    public Namespace getNamespace()

  Specified by:
    `getNamespace` in interface `UpnpServiceConfiguration`
  Returns:
    An instance of `Namespace` for this UPnP stack.

### getRegistryMaintainerExecutor

    public Executor getRegistryMaintainerExecutor()

  Specified by:
    `getRegistryMaintainerExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the background thread for maintainting the registry.

### getRegistryListenerExecutor

    public Executor getRegistryListenerExecutor()

  Specified by:
    `getRegistryListenerExecutor` in interface `UpnpServiceConfiguration`
  Returns:
    The executor which runs the notification threads of registry listeners.

### createNetworkAddressFactory

    public NetworkAddressFactory createNetworkAddressFactory()

  Specified by:
    `createNetworkAddressFactory` in interface `UpnpServiceConfiguration`
  Returns:
    A new instance of the `NetworkAddressFactory` interface.

### shutdown

    public void shutdown()

  Description copied from interface: `UpnpServiceConfiguration`
  Called by the `UpnpService` on shutdown, useful to e.g. shutdown thread pools.

  Specified by:
    `shutdown` in interface `UpnpServiceConfiguration`

### createNetworkAddressFactory

    protected NetworkAddressFactory createNetworkAddressFactory(int streamListenPort)

### createDatagramProcessor

    protected DatagramProcessor createDatagramProcessor()

### createSOAPActionProcessor

    protected SOAPActionProcessor createSOAPActionProcessor()

### createGENAEventProcessor

    protected GENAEventProcessor createGENAEventProcessor()

### createDeviceDescriptorBinderUDA10

    protected DeviceDescriptorBinder createDeviceDescriptorBinderUDA10()

### createServiceDescriptorBinderUDA10

    protected ServiceDescriptorBinder createServiceDescriptorBinderUDA10()

### createNamespace

    protected Namespace createNamespace()

### getDefaultExecutor

    protected Executor getDefaultExecutor()

### createDefaultExecutor

    protected Executor createDefaultExecutor()

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.