public abstract class StreamFeature extends java.lang.Object implements java.lang.Comparable<StreamFeature>
A base class for a stream feature, which is advertised by the server in its <stream:features/>
element.
Constructor and Description |
---|
StreamFeature() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(StreamFeature o)
Compares two features by their priority and mandatory-to-negotiate flag.
|
int |
getPriority()
Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.
|
boolean |
isMandatory()
Indicates, whether this feature is mandatory to negotiate.
|
boolean |
requiresRestart()
If this feature requires a stream restart after it has been negotiated.
|
public boolean isMandatory()
Indicates, whether this feature is mandatory to negotiate. By default a feature is not mandatory. Override this method for mandatory-to-negotiate features.
public int getPriority()
Gets the priority of the feature, i.e. when it will be negotiated during feature negotiation.
public boolean requiresRestart()
If this feature requires a stream restart after it has been negotiated.
public final int compareTo(StreamFeature o)
Compares two features by their priority and mandatory-to-negotiate flag.
A
<features/>
element that contains both mandatory-to-negotiate and voluntary-to-negotiate features indicates that the negotiation is not complete but that the initiating entity MAY complete the voluntary-to-negotiate feature(s) before it attempts to negotiate the mandatory-to-negotiate feature(s).
compareTo
in interface java.lang.Comparable<StreamFeature>
o
- The other feature.Copyright © 2014–2019 XMPP.rocks. All rights reserved.