YAACC - UPNP Client and Server
|
Default configuration data of a typical UPnP stack. More...
Classes | |
class | ClingExecutor |
class | ClingThreadFactory |
Public Member Functions | |
DefaultUpnpServiceConfiguration () | |
Defaults to port '0', ephemeral. | |
DefaultUpnpServiceConfiguration (int streamListenPort) | |
DatagramProcessor | getDatagramProcessor () |
SOAPActionProcessor | getSoapActionProcessor () |
GENAEventProcessor | getGenaEventProcessor () |
StreamClient | createStreamClient () |
MulticastReceiver | createMulticastReceiver (NetworkAddressFactory networkAddressFactory) |
DatagramIO | createDatagramIO (NetworkAddressFactory networkAddressFactory) |
StreamServer | createStreamServer (ProtocolFactory protocolFactory, NetworkAddressFactory networkAddressFactory) |
Executor | getMulticastReceiverExecutor () |
Executor | getDatagramIOExecutor () |
ExecutorService | getStreamServerExecutorService () |
DeviceDescriptorBinder | getDeviceDescriptorBinderUDA10 () |
ServiceDescriptorBinder | getServiceDescriptorBinderUDA10 () |
ServiceType[] | getExclusiveServiceTypes () |
Returns service types that can be handled by this UPnP stack, all others will be ignored. | |
boolean | isReceivedSubscriptionTimeoutIgnored () |
UpnpHeaders | getDescriptorRetrievalHeaders (RemoteDeviceIdentity identity) |
Optional extra headers for device descriptor retrieval HTTP requests. | |
UpnpHeaders | getEventSubscriptionHeaders (RemoteService service) |
Optional extra headers for event subscription (almost HTTP) messages. | |
int | getRegistryMaintenanceIntervalMillis () |
int | getAliveIntervalMillis () |
Integer | getRemoteDeviceMaxAgeSeconds () |
Returns the time in seconds a remote device will be registered until it is expired. | |
Executor | getAsyncProtocolExecutor () |
ExecutorService | getSyncProtocolExecutorService () |
Namespace | getNamespace () |
Executor | getRegistryMaintainerExecutor () |
Executor | getRegistryListenerExecutor () |
NetworkAddressFactory | createNetworkAddressFactory () |
void | shutdown () |
Called by the org.fourthline.cling.UpnpService on shutdown, useful to e.g. | |
Default configuration data of a typical UPnP stack.
This configuration utilizes the default network transport implementation found in org.fourthline.cling.transport.impl
.
This configuration utilizes the DOM default descriptor binders found in org.fourthline.cling.binding.xml
.
The thread Executor
is an Executors.newCachedThreadPool()
with a custom 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 org.fourthline.cling.model.Namespace
is configured without any base path or prefix.
DatagramIO org.fourthline.cling.DefaultUpnpServiceConfiguration.createDatagramIO | ( | NetworkAddressFactory | networkAddressFactory | ) |
networkAddressFactory | The configured org.fourthline.cling.transport.spi.NetworkAddressFactory . |
org.fourthline.cling.transport.spi.DatagramIO
interface. Implements org.fourthline.cling.UpnpServiceConfiguration.
MulticastReceiver org.fourthline.cling.DefaultUpnpServiceConfiguration.createMulticastReceiver | ( | NetworkAddressFactory | networkAddressFactory | ) |
networkAddressFactory | The configured org.fourthline.cling.transport.spi.NetworkAddressFactory . |
org.fourthline.cling.transport.spi.MulticastReceiver
interface. Implements org.fourthline.cling.UpnpServiceConfiguration.
NetworkAddressFactory org.fourthline.cling.DefaultUpnpServiceConfiguration.createNetworkAddressFactory | ( | ) |
org.fourthline.cling.transport.spi.NetworkAddressFactory
interface. Implements org.fourthline.cling.UpnpServiceConfiguration.
Referenced by org.fourthline.cling.DefaultUpnpServiceConfiguration.createNetworkAddressFactory().
StreamClient org.fourthline.cling.DefaultUpnpServiceConfiguration.createStreamClient | ( | ) |
org.fourthline.cling.transport.spi.StreamClient
interface. Implements org.fourthline.cling.UpnpServiceConfiguration.
StreamServer org.fourthline.cling.DefaultUpnpServiceConfiguration.createStreamServer | ( | ProtocolFactory | protocolFactory, |
NetworkAddressFactory | networkAddressFactory | ||
) |
networkAddressFactory | The configured org.fourthline.cling.transport.spi.NetworkAddressFactory . |
org.fourthline.cling.transport.spi.StreamServer
interface. Implements org.fourthline.cling.UpnpServiceConfiguration.
int org.fourthline.cling.DefaultUpnpServiceConfiguration.getAliveIntervalMillis | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
Executor org.fourthline.cling.DefaultUpnpServiceConfiguration.getAsyncProtocolExecutor | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
Executor org.fourthline.cling.DefaultUpnpServiceConfiguration.getDatagramIOExecutor | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
DatagramProcessor org.fourthline.cling.DefaultUpnpServiceConfiguration.getDatagramProcessor | ( | ) |
org.fourthline.cling.transport.spi.DatagramProcessor
. Implements org.fourthline.cling.UpnpServiceConfiguration.
UpnpHeaders org.fourthline.cling.DefaultUpnpServiceConfiguration.getDescriptorRetrievalHeaders | ( | RemoteDeviceIdentity | identity | ) |
Optional extra headers for device descriptor retrieval HTTP requests.
Some devices might require extra headers to recognize your control point, use this method to set these headers. They will be used for every descriptor (XML) retrieval HTTP request by Cling. See org.fourthline.cling.model.profile.ClientInfo
for action request messages.
identity | The (so far) discovered identity of the remote device. |
null
or extra HTTP headers. Implements org.fourthline.cling.UpnpServiceConfiguration.
DeviceDescriptorBinder org.fourthline.cling.DefaultUpnpServiceConfiguration.getDeviceDescriptorBinderUDA10 | ( | ) |
org.fourthline.cling.binding.xml.DeviceDescriptorBinder
for the UPnP 1.0 Device Architecture.. Implements org.fourthline.cling.UpnpServiceConfiguration.
UpnpHeaders org.fourthline.cling.DefaultUpnpServiceConfiguration.getEventSubscriptionHeaders | ( | RemoteService | service | ) |
Optional extra headers for event subscription (almost HTTP) messages.
Some devices might require extra headers to recognize your control point, use this method to set these headers for GENA subscriptions. Note that the headers will not be applied to actual event messages, only subscribe, unsubscribe, and renewal.
null
or extra HTTP headers. Implements org.fourthline.cling.UpnpServiceConfiguration.
ServiceType[] org.fourthline.cling.DefaultUpnpServiceConfiguration.getExclusiveServiceTypes | ( | ) |
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.
null
return value will disable discovery! An empty array means all services will be discovered. Implements org.fourthline.cling.UpnpServiceConfiguration.
GENAEventProcessor org.fourthline.cling.DefaultUpnpServiceConfiguration.getGenaEventProcessor | ( | ) |
org.fourthline.cling.transport.spi.GENAEventProcessor
. Implements org.fourthline.cling.UpnpServiceConfiguration.
Executor org.fourthline.cling.DefaultUpnpServiceConfiguration.getMulticastReceiverExecutor | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
Namespace org.fourthline.cling.DefaultUpnpServiceConfiguration.getNamespace | ( | ) |
org.fourthline.cling.model.Namespace
for this UPnP stack. Implements org.fourthline.cling.UpnpServiceConfiguration.
Executor org.fourthline.cling.DefaultUpnpServiceConfiguration.getRegistryListenerExecutor | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
Executor org.fourthline.cling.DefaultUpnpServiceConfiguration.getRegistryMaintainerExecutor | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
int org.fourthline.cling.DefaultUpnpServiceConfiguration.getRegistryMaintenanceIntervalMillis | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
Integer org.fourthline.cling.DefaultUpnpServiceConfiguration.getRemoteDeviceMaxAgeSeconds | ( | ) |
Returns the time in seconds a remote device will be registered until it is expired.
This setting is useful on systems which do not support multicast networking (Android on HTC phones, for example). On such a system you will not receive messages when a remote device disappears from the network and you will not receive its periodic heartbeat alive messages. Only an initial search response (UDP unicast) has been received from the remote device, with its proposed maximum age. To avoid (early) expiration of the remote device, you can override its maximum age with this configuration setting, ignoring the initial maximum age sent by the device. You most likely want to return 0
in this case, so that the remote device is never expired unless you manually remove it from the org.fourthline.cling.registry.Registry
. You typically remove the device when an action or GENA subscription request to the remote device failed.
null
(the default) to accept the remote device's proposed maximum age, or 0
for unlimited age, or a value in seconds. Implements org.fourthline.cling.UpnpServiceConfiguration.
ServiceDescriptorBinder org.fourthline.cling.DefaultUpnpServiceConfiguration.getServiceDescriptorBinderUDA10 | ( | ) |
org.fourthline.cling.binding.xml.ServiceDescriptorBinder
for the UPnP 1.0 Device Architecture.. Implements org.fourthline.cling.UpnpServiceConfiguration.
SOAPActionProcessor org.fourthline.cling.DefaultUpnpServiceConfiguration.getSoapActionProcessor | ( | ) |
org.fourthline.cling.transport.spi.SOAPActionProcessor
. Implements org.fourthline.cling.UpnpServiceConfiguration.
ExecutorService org.fourthline.cling.DefaultUpnpServiceConfiguration.getStreamServerExecutorService | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
ExecutorService org.fourthline.cling.DefaultUpnpServiceConfiguration.getSyncProtocolExecutorService | ( | ) |
Implements org.fourthline.cling.UpnpServiceConfiguration.
boolean org.fourthline.cling.DefaultUpnpServiceConfiguration.isReceivedSubscriptionTimeoutIgnored | ( | ) |
false
. Implements org.fourthline.cling.UpnpServiceConfiguration.
void org.fourthline.cling.DefaultUpnpServiceConfiguration.shutdown | ( | ) |
Called by the org.fourthline.cling.UpnpService
on shutdown, useful to e.g.
shutdown thread pools.
Implements org.fourthline.cling.UpnpServiceConfiguration.