org.fourthline.cling
Class ManagedUpnpService
java.lang.Object
org.fourthline.cling.ManagedUpnpService
- All Implemented Interfaces:
- UpnpService
@ApplicationScoped
public class ManagedUpnpService
- extends Object
- implements UpnpService
Adapter for CDI environments.
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, you can listen to GENA UPnP events with the same API - although
this will require some magic for subscription...
TODO: This is a work in progress.
- Author:
- Christian Bauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ManagedUpnpService
public ManagedUpnpService()
getConfiguration
public UpnpServiceConfiguration getConfiguration()
- Specified by:
getConfiguration
in interface UpnpService
getControlPoint
public ControlPoint getControlPoint()
- Specified by:
getControlPoint
in interface UpnpService
getProtocolFactory
public ProtocolFactory getProtocolFactory()
- Specified by:
getProtocolFactory
in interface UpnpService
getRegistry
public Registry getRegistry()
- Specified by:
getRegistry
in interface UpnpService
getRouter
public Router getRouter()
- Specified by:
getRouter
in interface UpnpService
shutdown
@PreDestroy
public void shutdown()
- Description copied from interface:
UpnpService
- Stopping the UPnP stack.
Clients are required to stop the UPnP stack properly. Notifications for
disappearing devices will be multicasted, existing event subscriptions canceled.
- Specified by:
shutdown
in interface UpnpService
start
public void start(@Observes
UpnpService.Start start)
shutdown
public void shutdown(@Observes
UpnpService.Shutdown shutdown)
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.