Package com.tnsai.channels.api
Record Class ChannelCapabilities
java.lang.Object
java.lang.Record
com.tnsai.channels.api.ChannelCapabilities
- Record Components:
threads- whether the channel supports threaded conversationsreactions- whether emoji reactions are supportedfileUpload- whether file/document uploads are supportedvoice- whether voice messages are supportedtyping- whether typing indicators can be sentediting- whether sent messages can be edited (for streaming)streaming- whether token-by-token streaming is possible (via editing)maxMessageLength- maximum text length per message (e.g. 4096 for Telegram)
public record ChannelCapabilities(boolean threads, boolean reactions, boolean fileUpload, boolean voice, boolean typing, boolean editing, boolean streaming, long maxMessageLength)
extends Record
Declares what a channel adapter supports.
Used by the router and response formatter to adapt behavior per channel.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionChannelCapabilities(boolean threads, boolean reactions, boolean fileUpload, boolean voice, boolean typing, boolean editing, boolean streaming, long maxMessageLength) Creates an instance of aChannelCapabilitiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelCapabilities.Builderbuilder()booleanediting()Returns the value of theeditingrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefileUploadrecord component.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxMessageLengthrecord component.booleanReturns the value of thereactionsrecord component.booleanReturns the value of thestreamingrecord component.booleanthreads()Returns the value of thethreadsrecord component.final StringtoString()Returns a string representation of this record class.booleantyping()Returns the value of thetypingrecord component.booleanvoice()Returns the value of thevoicerecord component.
-
Constructor Details
-
ChannelCapabilities
public ChannelCapabilities(boolean threads, boolean reactions, boolean fileUpload, boolean voice, boolean typing, boolean editing, boolean streaming, long maxMessageLength) Creates an instance of aChannelCapabilitiesrecord class.- Parameters:
threads- the value for thethreadsrecord componentreactions- the value for thereactionsrecord componentfileUpload- the value for thefileUploadrecord componentvoice- the value for thevoicerecord componenttyping- the value for thetypingrecord componentediting- the value for theeditingrecord componentstreaming- the value for thestreamingrecord componentmaxMessageLength- the value for themaxMessageLengthrecord component
-
-
Method Details
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
threads
public boolean threads()Returns the value of thethreadsrecord component.- Returns:
- the value of the
threadsrecord component
-
reactions
public boolean reactions()Returns the value of thereactionsrecord component.- Returns:
- the value of the
reactionsrecord component
-
fileUpload
public boolean fileUpload()Returns the value of thefileUploadrecord component.- Returns:
- the value of the
fileUploadrecord component
-
voice
public boolean voice()Returns the value of thevoicerecord component.- Returns:
- the value of the
voicerecord component
-
typing
public boolean typing()Returns the value of thetypingrecord component.- Returns:
- the value of the
typingrecord component
-
editing
public boolean editing()Returns the value of theeditingrecord component.- Returns:
- the value of the
editingrecord component
-
streaming
public boolean streaming()Returns the value of thestreamingrecord component.- Returns:
- the value of the
streamingrecord component
-
maxMessageLength
public long maxMessageLength()Returns the value of themaxMessageLengthrecord component.- Returns:
- the value of the
maxMessageLengthrecord component
-