ChannelDescriptorBuilder
Builder that creates an instance of the ChannelDescriptor object.
Extends
Builder
Constructors
new ChannelDescriptorBuilder()
new ChannelDescriptorBuilder(): ChannelDescriptorBuilder
Returns
Methods
build()
build(): IChannelDescriptor
Builds the ChannelDescriptor object from the fields in the ChannelDescriptorBuilder object.
Throws
InvalidArgumentErrorif one or more of the required fields are missing.IllegalStateErrorif the function is called after this builder instance has already built an object once.
Returns
IChannelDescriptor The built ChannelDescriptor object.
identifier()
identifier(identifier:
string): ChannelDescriptorBuilder
Sets the Identifier of the ChannelDescriptor.
This field is required for the channel descriptor.
Parameters
identifier
string
A string that represents a unique identifier for the channel. This identifier should be unique across all channels within the application package. This field has a maximum length of 8192 bytes.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.InvalidArgumentErrorif the field exceeds the maximum length of 8192 bytes.InvalidArgumentErrorif a string that is not valid UTF-8 is passed in.
Returns
ChannelDescriptorBuilder The ChannelDescriptorBuilder object with channel Identifier set.
majorNumber()
majorNumber(majorNumber:
number): ChannelDescriptorBuilder
Sets the MajorNumber of the ChannelDescriptor.
This field is required for the channel descriptor.
Parameters
majorNumber
number
The major number indicates the channel major number value (for example, using ATSC format). When the channel number is expressed as a string, such as "13.1" or "256", the major number would be 13 or 256, respectively. This field should be set to 0 for channels that are not represented by a major or minor number.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.
Returns
ChannelDescriptorBuilder The ChannelDescriptorBuilder object with channel MajorNumber set.
minorNumber()
minorNumber(minorNumber:
number): ChannelDescriptorBuilder
Sets the MinorNumber of the ChannelDescriptor.
This field is required for the channel descriptor.
Parameters
minorNumber
number
The minor number indicates the channel minor number value (for example, using ATSC format). When the channel number is expressed as a string, such as "13.1" or "256", the minor number would be 1 or 0, respectively. This field should be set to 0 for channels that are not represented by a major or minor number.
Throws
IllegalStateErrorif the function is called after this builder instance has already built an object once.
Returns
ChannelDescriptorBuilder The ChannelDescriptorBuilder object with channel MinorNumber set.
Last updated: Jul 31, 2026

