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.android
Class AndroidUpnpServiceConfiguration

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

All Implemented Interfaces:
  UpnpServiceConfiguration

    public class AndroidUpnpServiceConfiguration

extends DefaultUpnpServiceConfiguration

Configuration settings for deployment on Android.

This configuration utilizes the Apache HTTP Components transport implementation found in `org.teleal.cling.transport.impl.apache` for TCP/HTTP networking. It will attempt to bind only to the WiFi network interface and addresses on an Android device.

This configuration utilizes the SAX default descriptor binders found in `org.teleal.cling.binding.xml`. The system property `org.xml.sax.driver` is set to `org.xmlpull.v1.sax2.Driver`.

The thread `Executor` is a `ThreadPoolExecutor` with the following properties, optimized for machines with limited resources:

- Core pool size of minimum 8 idle threads
- Maximum 16 threads active
- 5 seconds keep-alive time before an idle thread is removed from the pool
- A FIFO queue of maximum 512 tasks waiting for a thread from the pool

A warning message will be logged when all threads of the pool have been exhausted and executions have to be dropped.

Author:
  Christian Bauer

Field Summary
`protected android.net.wifi.WifiManager` | `wifiManager`

Constructor Summary
`AndroidUpnpServiceConfiguration(android.net.wifi.WifiManager wifiManager)`
`AndroidUpnpServiceConfiguration(android.net.wifi.WifiManager wifiManager, int streamListenPort)`

Method Summary
`protected Executor` | `createDefaultExecutor()`
`protected DeviceDescriptorBinder` | `createDeviceDescriptorBinderUDA10()`
`protected NetworkAddressFactory` | `createNetworkAddressFactory(int streamListenPort)`
`protected ServiceDescriptorBinder` | `createServiceDescriptorBinderUDA10()`
`StreamClient` | `createStreamClient()`
`StreamServer` | `createStreamServer(NetworkAddressFactory networkAddressFactory)`
`int` | `getRegistryMaintenanceIntervalMillis()`

Methods inherited from class org.teleal.cling.DefaultUpnpServiceConfiguration
`createDatagramIO, createDatagramProcessor, createGENAEventProcessor, createMulticastReceiver, createNamespace, createNetworkAddressFactory, createSOAPActionProcessor, getAsyncProtocolExecutor, getDatagramIOExecutor, getDatagramProcessor, getDefaultExecutor, getDeviceDescriptorBinderUDA10, getExclusiveServiceTypes, getGenaEventProcessor, getMulticastReceiverExecutor, getNamespace, getRegistryListenerExecutor, getRegistryMaintainerExecutor, getServiceDescriptorBinderUDA10, getSoapActionProcessor, getStreamServerExecutor, getSyncProtocolExecutor, shutdown`

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

Field Detail

### wifiManager

    protected final android.net.wifi.WifiManager wifiManager

Constructor Detail

### AndroidUpnpServiceConfiguration

    public AndroidUpnpServiceConfiguration(android.net.wifi.WifiManager wifiManager)

### AndroidUpnpServiceConfiguration

    public AndroidUpnpServiceConfiguration(android.net.wifi.WifiManager wifiManager,
                                           int streamListenPort)

Method Detail

### createNetworkAddressFactory

    protected NetworkAddressFactory createNetworkAddressFactory(int streamListenPort)

  Overrides:
    `createNetworkAddressFactory` in class `DefaultUpnpServiceConfiguration`

### createStreamServer

    public StreamServer createStreamServer(NetworkAddressFactory networkAddressFactory)

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

### createStreamClient

    public StreamClient createStreamClient()

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

### createDeviceDescriptorBinderUDA10

    protected DeviceDescriptorBinder createDeviceDescriptorBinderUDA10()

  Overrides:
    `createDeviceDescriptorBinderUDA10` in class `DefaultUpnpServiceConfiguration`

### createServiceDescriptorBinderUDA10

    protected ServiceDescriptorBinder createServiceDescriptorBinderUDA10()

  Overrides:
    `createServiceDescriptorBinderUDA10` in class `DefaultUpnpServiceConfiguration`

### getRegistryMaintenanceIntervalMillis

    public int getRegistryMaintenanceIntervalMillis()

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

### createDefaultExecutor

    protected Executor createDefaultExecutor()

  Overrides:
    `createDefaultExecutor` in class `DefaultUpnpServiceConfiguration`

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.