@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 UpnpService
public ControlPoint getControlPoint()
getControlPoint
in interface UpnpService
public ProtocolFactory getProtocolFactory()
getProtocolFactory
in interface UpnpService
public Registry getRegistry()
getRegistry
in interface UpnpService
public Router getRouter()
getRouter
in interface UpnpService
public void start(@Observes UpnpService.Start start)
public void shutdown()
UpnpService
Clients are required to stop the UPnP stack properly. Notifications for disappearing devices will be multicast'ed, existing event subscriptions cancelled.
shutdown
in interface UpnpService
public void shutdown(@Observes UpnpService.Shutdown shutdown)
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.