@ApplicationScoped public class ManagedUpnpService extends Object implements UpnpService
The CDI container provides injectable instances of Cling UPnP interfaces, e.g.
you can @Inject Registry or @Inject ControlPoint.
Furthermore, this adapter also binds Cling into the CDI eventing system. You
can @Observe RemoteDeviceDiscoveryStart etc. events of the
registry.
Even better, in the future you might be able to listen to GENA UPnP events with the same API - although this will require some magic for subscription...
TODO: This is a work in progress.
UpnpService.Shutdown, UpnpService.Start| Constructor and Description |
|---|
ManagedUpnpService() |
| Modifier and Type | Method and Description |
|---|---|
UpnpServiceConfiguration |
getConfiguration() |
ControlPoint |
getControlPoint() |
ProtocolFactory |
getProtocolFactory() |
Registry |
getRegistry() |
Router |
getRouter() |
void |
shutdown()
Stopping the UPnP stack.
|
void |
shutdown(UpnpService.Shutdown shutdown) |
void |
start(UpnpService.Start start) |
public UpnpServiceConfiguration getConfiguration()
getConfiguration in interface UpnpServicepublic ControlPoint getControlPoint()
getControlPoint in interface UpnpServicepublic ProtocolFactory getProtocolFactory()
getProtocolFactory in interface UpnpServicepublic Registry getRegistry()
getRegistry in interface UpnpServicepublic Router getRouter()
getRouter in interface UpnpServicepublic void start(@Observes
UpnpService.Start start)
public void shutdown()
UpnpServiceClients are required to stop the UPnP stack properly. Notifications for disappearing devices will be multicast'ed, existing event subscriptions cancelled.
shutdown in interface UpnpServicepublic void shutdown(@Observes
UpnpService.Shutdown shutdown)
Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.