Class ChannelDefinition


  • @NonNullByDefault
    public class ChannelDefinition
    extends Object
    The ChannelDefinition class defines a Channel of a ThingType.

    A Channel is part of a Thing that represents a functionality of it.

    Hint: This class is immutable.

    Author:
    Michael Grammling - Initial contribution, Chris Jackson - Added properties and label/description, Dennis Nobel - Introduced ChannelTypeRegistry and channel type references
    • Method Detail

      • getId

        public String getId()
        Returns the identifier of the channel.
        Returns:
        the identifier of the channel (neither null, nor empty)
      • getChannelTypeUID

        public ChannelTypeUID getChannelTypeUID()
        Returns the type of the channel.
        Returns:
        the type of the channel (not null)
      • getLabel

        public @Nullable String getLabel()
        Returns the label (if set). If no label is set, getLabel will return null and the default label for the ChannelType is used.
        Returns:
        the label for the channel. Can be null.
      • getDescription

        public @Nullable String getDescription()
        Returns the description (if set). If no description is set, getDescription will return null and the default description for the ChannelType is used.
        Returns:
        the description for the channel. Can be null.
      • getAutoUpdatePolicy

        public @Nullable AutoUpdatePolicy getAutoUpdatePolicy()
        Returns the AutoUpdatePolicy to use for this channel.
        Returns:
        the auto update policy