# Class e.p.c.c.CoherenceResource(ResourceProvider):

Part of elisa.plugins.coherence.coherence_resource View In Hierarchy

The Coherence resource_provider is in charge of detecting UPnP services available on the local network. It currently only detects MediaServers.

When a new service is detected a `NetworkServiceAppearedMessage` message is sent over the bus. If a service disappears, a `NetworkServiceDisappearedMessage` is sent.

This resource_provider depends on the `elisa.plugins.coherence.coherence_service` Service so as to correctly connect to the signals sent by Coherence when a new service is detected/removed.

Line # | Kind | Name | Docs
--- | --- | --- | ---
65 | Method | initialize | Initialize the component.
141 | Method | get | Get a list of specific UPnP services. Right now only media_servers are known.

Inherited from ResourceProvider:

Line # | Kind | Name | Docs
--- | --- | --- | ---
94 | Method | post | Update the resource pointed by `uri` with `parameters`.
107 | Method | put | Put one resource into another. Both resources are identified with URIs.
129 | Method | delete | Delete a Resource represented by a URI.

Inherited from Component (via ResourceProvider):

Line # | Kind | Name | Docs
--- | --- | --- | ---
85 | Class | PathDescriptor | Undocumented
97 | Class Method | create | Create and initialize the component.
142 | Method | clean | Clean the component.

Inherited from Loggable (via ResourceProvider, Component):

Line # | Kind | Name | Docs
--- | --- | --- | ---
81 | Method | __init__ | Undocumented

def initialize(self):
overrides elisa.core.component.Component.initialize

Initialize the component.

This method is called by `Component.create` to finish the initialization of a component.

Returns | a deferred called when a component is fully initialized (type: `twisted.internet.defer.Deferred` )

def get(self, uri, context_model=None):
overrides elisa.core.components.resource_provider.ResourceProvider.get

    Get a list of specific UPnP services. Right now only media_servers are known.

    coherence://media_servers -> list of L{elisa.plugins.base.network.NetworkServiceModel} wrapped
                                 in a I{media_servers} attribute of a L{Model} instance.

    TODO:

    - coherence://media_renderers