# NegotiationsHandler class abstract

This class implements the stream feature negotiation for XmppConnection.

Implementers
  - ClientToServerNegotiator
  - ComponentToServerNegotiator

## Constructors

NegotiationsHandler ()

## Properties

getConnectionSettings ↔ GetConnectionSettingsFunction
  Get the connection's settings.
  latefinal
handleError ↔ ErrorCallback
  XmppConnection's handleError method.
  latefinal
hashCode → int
  The hash code for this object.
  no setterinherited
isAuthenticated ↔ IsAuthenticatedFunction
  Returns true if the connection is authenticated. If not, returns false.
  latefinal
log ↔ Logger
  latefinal
negotiators → Map <String, XmppFeatureNegotiatorBase>
  Map of all negotiators registered against the handler.
  final
onNegotiationsDone ↔ NegotiationsDoneCallback
  Function that is called once the negotiator is done with its stream negotiations.
  latefinal
resetStreamParser ↔ ResetStreamParserFunction
  latefinal
runtimeType → Type
  A representation of the runtime type of the object.
  no setterinherited
sendNonza ↔ SendNonzaFunction
  Send a nonza over the stream.
  latefinal
streamId ↔ String?
  The id included in the last stream header.
  getter/setter pair

## Methods

getNegotiatorById <T extends XmppFeatureNegotiatorBase>(String id) → T?
  Returns, if registered, a negotiator with id `id`.
getStanzaNamespace () → String
  Returns the xmlns attribute that stanzas should have.
negotiate (XMPPStreamObject event) → Future <void>
  Called whenever the stream buffer outputs a new event `event`.
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.
registerNegotiator (XmppFeatureNegotiatorBase negotiator) → void
  Registers the negotiator `negotiator` against this negotiations handler.
removeNegotiatingFeature (String feature) → void
  Remove `feature` from the stream features we are currently negotiating.
reset () → void
  Resets all registered negotiators and the negotiation handler.
runPostRegisterCallback () → Future <void>
  Runs the post-register callback of all negotiators.
sendEventToNegotiators (XmppEvent event) → Future <void>
sendStreamHeader () → void
  Sends the stream header.
setStreamHeaderId (String? id) → void
  Set the id of the last stream header.
toString () → String
  A string representation of this object.
  inherited

## Operators

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