YAACC - UPNP Client and Server
|
Shared configuration data of the UPnP stack. More...
Public Member Functions | |
NetworkAddressFactory | createNetworkAddressFactory () |
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. | |
int | getRegistryMaintenanceIntervalMillis () |
int | getAliveIntervalMillis () |
Optional setting for flooding alive NOTIFY messages for local devices. | |
boolean | isReceivedSubscriptionTimeoutIgnored () |
Ignore the received event subscription timeout from remote control points. | |
Integer | getRemoteDeviceMaxAgeSeconds () |
Returns the time in seconds a remote device will be registered until it is expired. | |
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. | |
Executor | getAsyncProtocolExecutor () |
ExecutorService | getSyncProtocolExecutorService () |
Namespace | getNamespace () |
Executor | getRegistryMaintainerExecutor () |
Executor | getRegistryListenerExecutor () |
void | shutdown () |
Called by the org.fourthline.cling.UpnpService on shutdown, useful to e.g. | |
Shared configuration data of the UPnP stack.
This interface offers methods for retrieval of configuration data by the org.fourthline.cling.transport.Router
and the org.fourthline.cling.registry.Registry
, as well as other parts of the UPnP stack.
You can re-use this interface if you implement a subclass of UpnpServiceImpl
or if you create a new implementation of UpnpService
.
DatagramIO org.fourthline.cling.UpnpServiceConfiguration.createDatagramIO | ( | NetworkAddressFactory | networkAddressFactory | ) |
networkAddressFactory | The configured org.fourthline.cling.transport.spi.NetworkAddressFactory . |
org.fourthline.cling.transport.spi.DatagramIO
interface. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
MulticastReceiver org.fourthline.cling.UpnpServiceConfiguration.createMulticastReceiver | ( | NetworkAddressFactory | networkAddressFactory | ) |
networkAddressFactory | The configured org.fourthline.cling.transport.spi.NetworkAddressFactory . |
org.fourthline.cling.transport.spi.MulticastReceiver
interface. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
NetworkAddressFactory org.fourthline.cling.UpnpServiceConfiguration.createNetworkAddressFactory | ( | ) |
org.fourthline.cling.transport.spi.NetworkAddressFactory
interface. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Referenced by org.fourthline.cling.transport.RouterImpl.enable().
StreamClient org.fourthline.cling.UpnpServiceConfiguration.createStreamClient | ( | ) |
org.fourthline.cling.transport.spi.StreamClient
interface. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Referenced by org.fourthline.cling.transport.RouterImpl.enable().
StreamServer org.fourthline.cling.UpnpServiceConfiguration.createStreamServer | ( | ProtocolFactory | protocolFactory, |
NetworkAddressFactory | networkAddressFactory | ||
) |
networkAddressFactory | The configured org.fourthline.cling.transport.spi.NetworkAddressFactory . |
org.fourthline.cling.transport.spi.StreamServer
interface. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
int org.fourthline.cling.UpnpServiceConfiguration.getAliveIntervalMillis | ( | ) |
Optional setting for flooding alive NOTIFY messages for local devices.
Use this to advertise local devices at the specified interval, independent of its org.fourthline.cling.model.meta.DeviceIdentity#maxAgeSeconds
value. Note that this will increase network traffic.
Some control points (XBMC and other Platinum UPnP SDK based devices, OPPO-93) seem to not properly receive SSDP M-SEARCH replies sent by Cling, but will handle NOTIFY alive messages just fine.
0
to disable Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Executor org.fourthline.cling.UpnpServiceConfiguration.getAsyncProtocolExecutor | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Referenced by org.fourthline.cling.transport.RouterImpl.received().
Executor org.fourthline.cling.UpnpServiceConfiguration.getDatagramIOExecutor | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
DatagramProcessor org.fourthline.cling.UpnpServiceConfiguration.getDatagramProcessor | ( | ) |
org.fourthline.cling.transport.spi.DatagramProcessor
. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
UpnpHeaders org.fourthline.cling.UpnpServiceConfiguration.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. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
DeviceDescriptorBinder org.fourthline.cling.UpnpServiceConfiguration.getDeviceDescriptorBinderUDA10 | ( | ) |
org.fourthline.cling.binding.xml.DeviceDescriptorBinder
for the UPnP 1.0 Device Architecture.. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
UpnpHeaders org.fourthline.cling.UpnpServiceConfiguration.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. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
ServiceType[] org.fourthline.cling.UpnpServiceConfiguration.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. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
GENAEventProcessor org.fourthline.cling.UpnpServiceConfiguration.getGenaEventProcessor | ( | ) |
org.fourthline.cling.transport.spi.GENAEventProcessor
. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Executor org.fourthline.cling.UpnpServiceConfiguration.getMulticastReceiverExecutor | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Namespace org.fourthline.cling.UpnpServiceConfiguration.getNamespace | ( | ) |
org.fourthline.cling.model.Namespace
for this UPnP stack. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Executor org.fourthline.cling.UpnpServiceConfiguration.getRegistryListenerExecutor | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Referenced by org.fourthline.cling.registry.RegistryImpl.notifyDiscoveryFailure(), and org.fourthline.cling.registry.RegistryImpl.notifyDiscoveryStart().
Executor org.fourthline.cling.UpnpServiceConfiguration.getRegistryMaintainerExecutor | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Referenced by org.fourthline.cling.registry.RegistryImpl.RegistryImpl(), and org.fourthline.cling.registry.RegistryImpl.resume().
int org.fourthline.cling.UpnpServiceConfiguration.getRegistryMaintenanceIntervalMillis | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Integer org.fourthline.cling.UpnpServiceConfiguration.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. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
ServiceDescriptorBinder org.fourthline.cling.UpnpServiceConfiguration.getServiceDescriptorBinderUDA10 | ( | ) |
org.fourthline.cling.binding.xml.ServiceDescriptorBinder
for the UPnP 1.0 Device Architecture.. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
SOAPActionProcessor org.fourthline.cling.UpnpServiceConfiguration.getSoapActionProcessor | ( | ) |
org.fourthline.cling.transport.spi.SOAPActionProcessor
. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
ExecutorService org.fourthline.cling.UpnpServiceConfiguration.getStreamServerExecutorService | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
ExecutorService org.fourthline.cling.UpnpServiceConfiguration.getSyncProtocolExecutorService | ( | ) |
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
Referenced by org.fourthline.cling.transport.RouterImpl.received().
boolean org.fourthline.cling.UpnpServiceConfiguration.isReceivedSubscriptionTimeoutIgnored | ( | ) |
Ignore the received event subscription timeout from remote control points.
Some control points have trouble renewing subscriptions properly; enabling this option in conjunction with a high value for org.fourthline.cling.model.UserConstants#DEFAULT_SUBSCRIPTION_DURATION_SECONDS
ensures that your devices will not disappear on such control points.
true
if the timeout in incoming event subscriptions should be ignored and the default value (org.fourthline.cling.model.UserConstants#DEFAULT_SUBSCRIPTION_DURATION_SECONDS
) should be used instead. Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.
void org.fourthline.cling.UpnpServiceConfiguration.shutdown | ( | ) |
Called by the org.fourthline.cling.UpnpService
on shutdown, useful to e.g.
shutdown thread pools.
Implemented in org.fourthline.cling.DefaultUpnpServiceConfiguration.