org.teleal.cling.android
Class AndroidUpnpServiceConfiguration

java.lang.Object
  extended by org.teleal.cling.DefaultUpnpServiceConfiguration
      extended by 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:

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)
           
 
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

createDefaultExecutor

protected Executor createDefaultExecutor()
Overrides:
createDefaultExecutor in class DefaultUpnpServiceConfiguration


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