SubscribeOptions class

Used to either define advanced router options such a prefix or wildcard matching or subsciption retention. One may also add custom options, Those custom options need to be added with a custom serializer because flutter disables reflections.

Mixed-in types

Constructors

SubscribeOptions({String? match, String? metaTopic, bool? getRetained, Map<String, dynamic>? custom})
the constructor

Properties

custom → Map<String, dynamic>
Arbitrary implementation-specific fields that should be forwarded over the wire when serializing WAMP options/details.
finalinherited
getRetained ↔ bool?
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
match ↔ String?
getter/setter pair
metaTopic ↔ String?
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCustomValue(String key, dynamic valueSerializer(String)) → void
add a custom valueSerializer to a given option key. The valueSerializer is passed a serializerr type. According to that type the serializer should respond with a correct serialized value. Example:
getCustomValues<T>(String serializerType) → HashMap<String, T>
Some server need custom values to be added to the options. Since flutter disables reflection in favor of tree shaking, the custom values need a custom serialization process that has to be defined for each value separately. The current serializerType is passed to the custom serializer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeCustomField(String key) → void
Removes a previously assigned custom field.
inherited
setCustomField(String key, dynamic value) → void
Sets a custom option that will be serialized using json.encode for the JSON serializer and passed through unchanged for binary serializers.
override
setLazyCustomFieldsLoader(Map<String, dynamic> loader()) → void
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

customSerializerCbor → String
final
customSerializerJson → String
final
customSerializerMsgpack → String
final
matchPlain → String?
final
matchPrefix → String
final
matchWildcard → String
final