Channel class

Represents a Bayeux channel with validation and pattern matching

Constructors

Channel.new(String name)
Channel.fromString(String channelName)
Create a channel from a string
factory

Properties

deepWildcardPattern Channel
Get the deep wildcard pattern for this channel
no setter
depth int
Get the depth of this channel (number of segments)
no setter
hashCode int
Hash code
no setteroverride
isMeta bool
Whether this is a meta channel (starts with /meta/)
final
isPattern bool
Whether this channel is a pattern (contains wildcards)
final
isService bool
Whether this is a service channel (starts with /service/)
final
isWildcard bool
Whether this is a wildcard pattern (**)
final
name String
Channel name
final
parent Channel?
Get the parent channel (remove last segment)
no setter
parents List<Channel>
Get all parent channels
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segments List<String>
Get the segments of this channel
no setter
wildcardPattern Channel
Get the wildcard pattern for this channel
no setter

Methods

isChildOf(Channel parent) bool
Check if this channel is a child of another channel
isParentOf(Channel child) bool
Check if this channel is a parent of another channel
matches(String pattern) bool
Check if this channel matches a pattern
matchesChannel(Channel other) bool
Check if this channel matches another channel
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Convert to string
override

Operators

operator ==(Object other) bool
Equality operator
override