YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
org.fourthline.cling.model.ServiceManager< T > Interface Template Reference

Binds the metadata of a service to a service implementation, unified interface for accessing local services. More...

Inheritance diagram for org.fourthline.cling.model.ServiceManager< T >:
Inheritance graph
Collaboration diagram for org.fourthline.cling.model.ServiceManager< T >:
Collaboration graph

Public Member Functions

LocalService< T > getService ()
 
getImplementation ()
 
void execute (Command< T > cmd) throws Exception
 Double-dispatch of arbitrary commands, used by action executors and state variable accessors.
 
PropertyChangeSupport getPropertyChangeSupport ()
 Provides the capability to monitor the service for state changes.
 
Collection< StateVariableValue > getCurrentState () throws Exception
 Reading the state of a service manually.
 

Static Public Attributes

static final String EVENTED_STATE_VARIABLES = "_EventedStateVariables"
 Use this property name when propagating change events that affect any evented UPnP state variable.
 

Detailed Description

Binds the metadata of a service to a service implementation, unified interface for accessing local services.

The UPnP core will always access a local service implementation through this manager, available with org.fourthline.cling.model.meta.LocalService#getManager():

A service manager can implement these concerns in any way imaginable. It has to be thread-safe.

Parameters
<T>The interface expected by the bound org.fourthline.cling.model.action.ActionExecutors and org.fourthline.cling.model.state.StateVariableAccessors.
Author
Christian Bauer

Member Function Documentation

◆ execute()

void org.fourthline.cling.model.ServiceManager< T >.execute ( Command< T >  cmd) throws Exception

Double-dispatch of arbitrary commands, used by action executors and state variable accessors.

The service manager will execute the given org.fourthline.cling.model.Command and it might decorate the execution, for example, by locking/unlocking access to a shared service implementation before and after the execution.

Parameters
cmdThe command to execute.
Exceptions
ExceptionAny exception, without wrapping, as thrown by org.fourthline.cling.model.Command#execute(ServiceManager)

Implemented in org.fourthline.cling.model.DefaultServiceManager< T >.

◆ getCurrentState()

Collection< StateVariableValue > org.fourthline.cling.model.ServiceManager< T >.getCurrentState ( ) throws Exception

Reading the state of a service manually.

Returns
A Collection of org.fourthline.cling.model.state.StateVariableValue, representing the current state of the service, that is, all evented state variable values.
Exceptions
ExceptionAny error that occurred when the service's state was accessed.

Implemented in org.fourthline.cling.model.DefaultServiceManager< T >.

◆ getImplementation()

T org.fourthline.cling.model.ServiceManager< T >.getImplementation ( )

◆ getPropertyChangeSupport()

PropertyChangeSupport org.fourthline.cling.model.ServiceManager< T >.getPropertyChangeSupport ( )

Provides the capability to monitor the service for state changes.

The GENA subsystem expects that this adapter will notify its listeners whenever any evented UPnP state variable of the service has changed its state. The following change event is expected:

The collection has to include values for all state variables, no matter what state variable was updated. Any other event is ignored (e.g. individual property changes).

Returns
An adapter that will notify its listeners whenever any evented state variable changes.

Implemented in org.fourthline.cling.model.DefaultServiceManager< T >.

◆ getService()

LocalService< T > org.fourthline.cling.model.ServiceManager< T >.getService ( )
Returns
The metadata of the service to which this manager is assigned.

Implemented in org.fourthline.cling.model.DefaultServiceManager< T >.

Member Data Documentation

◆ EVENTED_STATE_VARIABLES

final String org.fourthline.cling.model.ServiceManager< T >.EVENTED_STATE_VARIABLES = "_EventedStateVariables"
static

Use this property name when propagating change events that affect any evented UPnP state variable.

This name is detected by the GENA subsystem.

Referenced by org.fourthline.cling.model.gena.LocalGENASubscription.propertyChange().


The documentation for this interface was generated from the following file: