org.fourthline.cling.model.meta

## Class LocalService<T>

- java.lang.Object
- - org.fourthline.cling.model.meta.Service<LocalDevice,LocalService>
  - - org.fourthline.cling.model.meta.LocalService<T>

-     public class LocalService<T>
      extends Service<LocalDevice,LocalService>

  The metadata of a service created on this host, by application code.

  After instantiation `setManager(org.fourthline.cling.model.ServiceManager)` must be called to bind the service metadata to the service implementation.

  Author:
    Christian Bauer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<Action,ActionExecutor>` | `actionExecutors`
    `protected ServiceManager` | `manager`
    `protected Map<StateVariable,StateVariableAccessor>` | `stateVariableAccessors`
    `protected Set<Class>` | `stringConvertibleTypes`
    `protected boolean` | `supportsQueryStateVariables`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalService(ServiceType serviceType, ServiceId serviceId, Action[] actions, StateVariable[] stateVariables)`
    `LocalService(ServiceType serviceType, ServiceId serviceId, Map<Action,ActionExecutor> actionExecutors, Map<StateVariable,StateVariableAccessor> stateVariableAccessors, Set<Class> stringConvertibleTypes, boolean supportsQueryStateVariables)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StateVariableAccessor` | `getAccessor(StateVariable stateVariable)`
    `StateVariableAccessor` | `getAccessor(String stateVariableName)`
    `ActionExecutor` | `getExecutor(Action action)`
    `ActionExecutor` | `getExecutor(String actionName)`
    `ServiceManager<T>` | `getManager()`
    `Action` | `getQueryStateVariableAction()`
    `Set<Class>` | `getStringConvertibleTypes()`
    `boolean` | `isStringConvertibleType(Class clazz)`
    `boolean` | `isStringConvertibleType(Object o)`
    `boolean` | `isSupportsQueryStateVariables()`
    `void` | `setManager(ServiceManager<T> manager)`
    `String` | `toString()`

    - ### Methods inherited from class org.fourthline.cling.model.meta.Service

      `getAction, getActions, getDatatype, getDevice, getReference, getRelatedStateVariable, getServiceId, getServiceType, getStateVariable, getStateVariables, hasActions, hasStateVariables, validate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### actionExecutors

          protected final Map<Action,ActionExecutor> actionExecutors

    - #### stateVariableAccessors

          protected final Map<StateVariable,StateVariableAccessor> stateVariableAccessors

    - #### stringConvertibleTypes

          protected final Set<Class> stringConvertibleTypes

    - #### supportsQueryStateVariables

          protected final boolean supportsQueryStateVariables

    - #### manager

          protected ServiceManager manager

  - ### Constructor Detail

    - #### LocalService

          public LocalService(ServiceType serviceType,
                      ServiceId serviceId,
                      Action[] actions,
                      StateVariable[] stateVariables)
                       throws ValidationException

      Throws:
        `ValidationException`

    - #### LocalService

          public LocalService(ServiceType serviceType,
                      ServiceId serviceId,
                      Map<Action,ActionExecutor> actionExecutors,
                      Map<StateVariable,StateVariableAccessor> stateVariableAccessors,
                      Set<Class> stringConvertibleTypes,
                      boolean supportsQueryStateVariables)
                       throws ValidationException

      Throws:
        `ValidationException`

  - ### Method Detail

    - #### setManager

          public void setManager(ServiceManager<T> manager)

    - #### getManager

          public ServiceManager<T> getManager()

    - #### isSupportsQueryStateVariables

          public boolean isSupportsQueryStateVariables()

    - #### getStringConvertibleTypes

          public Set<Class> getStringConvertibleTypes()

    - #### isStringConvertibleType

          public boolean isStringConvertibleType(Object o)

    - #### isStringConvertibleType

          public boolean isStringConvertibleType(Class clazz)

    - #### getAccessor

          public StateVariableAccessor getAccessor(String stateVariableName)

    - #### getAccessor

          public StateVariableAccessor getAccessor(StateVariable stateVariable)

    - #### getExecutor

          public ActionExecutor getExecutor(String actionName)

    - #### getExecutor

          public ActionExecutor getExecutor(Action action)

    - #### getQueryStateVariableAction

          public Action getQueryStateVariableAction()

      Specified by:
        `getQueryStateVariableAction` in class `Service<LocalDevice,LocalService>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Service<LocalDevice,LocalService>`

Copyright © 2014 4th Line GmbH, Switzerland. All Rights Reserved.