ClientToServerNegotiator class
This class implements the stream feature negotiation for usage in client to server connections.
- Inheritance
-
- Object
- NegotiationsHandler
- ClientToServerNegotiator
Constructors
Properties
- getConnectionSettings ↔ GetConnectionSettingsFunction
-
Get the connection's settings.
latefinalinherited
- handleError ↔ ErrorCallback
-
XmppConnection's handleError method.
latefinalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAuthenticated ↔ IsAuthenticatedFunction
-
Returns true if the connection is authenticated. If not, returns false.
latefinalinherited
- log ↔ Logger
-
latefinalinherited
-
negotiators
→ Map<
String, XmppFeatureNegotiatorBase> -
Map of all negotiators registered against the handler.
finalinherited
- onNegotiationsDone ↔ NegotiationsDoneCallback
-
Function that is called once the negotiator is done with its stream negotiations.
latefinalinherited
- resetStreamParser ↔ ResetStreamParserFunction
-
latefinalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendNonza ↔ SendNonzaFunction
-
Send a nonza over the stream.
latefinalinherited
- streamId ↔ String?
-
The id included in the last stream header.
getter/setter pairinherited
Methods
-
getNegotiatorById<
T extends XmppFeatureNegotiatorBase> (String id) → T? -
Returns, if registered, a negotiator with id
id
.inherited -
getNextNegotiator(
List< XMLNode> features, {bool log = true}) → XmppFeatureNegotiatorBase? -
Returns the next negotiator that matches
features
. Returns null if none can be picked. Iflog
is true, then the list of matching negotiators will be logged. -
getStanzaNamespace(
) → String -
Returns the xmlns attribute that stanzas should have.
override
-
negotiate(
XMPPStreamObject event) → Future< void> -
Called whenever the stream buffer outputs a new event
event
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register(
NegotiationsDoneCallback onNegotiationsDone, ErrorCallback handleError, IsAuthenticatedFunction isAuthenticated, SendNonzaFunction sendNonza, GetConnectionSettingsFunction getConnectionSettings, ResetStreamParserFunction resetStreamParser) → void -
Register the parameters as the corresponding methods in this class. Also
initializes the logger.
inherited
-
registerNegotiator(
XmppFeatureNegotiatorBase negotiator) → void -
Registers the negotiator
negotiator
against this negotiations handler.override -
removeNegotiatingFeature(
String feature) → void -
Remove
feature
from the stream features we are currently negotiating.override -
reset(
) → void -
Resets all registered negotiators and the negotiation handler.
override
-
runPostRegisterCallback(
) → Future< void> -
Runs the post-register callback of all negotiators.
inherited
-
sendEventToNegotiators(
XmppEvent event) → Future< void> -
inherited
-
sendStreamHeader(
) → void -
Sends the stream header.
override
-
setStreamHeaderId(
String? id) → void -
Set the id of the last stream header.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited