org.teleal.cling
Class DefaultUpnpServiceConfiguration

java.lang.Object
  extended by 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 a ThreadPoolExecutor with the following properties:

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

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

Author:
Christian Bauer

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()
           
 GENAEventProcessor getGenaEventProcessor()
           
 Executor getMulticastReceiverExecutor()
           
 Namespace getNamespace()
           
 Executor getRegistryListenerExecutor()
           
 Executor getRegistryMaintainerExecutor()
           
 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()
Specified by:
getExclusiveServiceTypes in interface UpnpServiceConfiguration
Returns:
An array of service types that are exclusively handled, no other service will be discovered

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


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