Package org.openhab.core.thing.profiles
Interface ProfileContext
@NonNullByDefault
public interface ProfileContext
The profile's context
It gives access to related information like the profile's configuration or a scheduler.
- Author:
- Simon Kaufmann - Initial contribution, Jan N. Klug - Add accepted type methods
-
Method Summary
Modifier and TypeMethodDescriptionGet the list of accepted command types for commands send to the linked item This is an optional method and will return an empty list if not implemented.Get the list of accepted data types for state updates to the linked item This is an optional method and will return an empty list if not implemented.Get the profile's configuration object<T> TgetConfigurationAs(Class<T> configurationClass) Returns the configuration of the profile and transforms it to the given class.Get a scheduler to be used within profiles (if needed at all)Get the list of accepted command types for commands sent to the handler This is an optional method and will return an empty list if not implemented.
-
Method Details
-
getConfiguration
Configuration getConfiguration()Get the profile's configuration object- Returns:
- the configuration
-
getConfigurationAs
Returns the configuration of the profile and transforms it to the given class.- Parameters:
configurationClass- configuration class- Returns:
- configuration of profile in form of the given class
-
getExecutorService
ScheduledExecutorService getExecutorService()Get a scheduler to be used within profiles (if needed at all)- Returns:
- the scheduler
-
getAcceptedDataTypes
Get the list of accepted data types for state updates to the linked item This is an optional method and will return an empty list if not implemented.- Returns:
- A list of all accepted data types
-
getAcceptedCommandTypes
Get the list of accepted command types for commands send to the linked item This is an optional method and will return an empty list if not implemented.- Returns:
- A list of all accepted command types
-
getHandlerAcceptedCommandTypes
Get the list of accepted command types for commands sent to the handler This is an optional method and will return an empty list if not implemented.- Returns:
- A list of all accepted command types
-