public interface StreamFeatureNegotiator<T extends StreamFeature>
An interface for various stream negotiators, either from client perspective or server perspective.
A stream negotiator receives an element from the stream and tries to negotiate the stream feature.
Modifier and Type | Method and Description |
---|---|
boolean |
canProcess(java.lang.Object element)
Checks, whether the element can be processed by the feature negotiator.
|
java.lang.Class<T> |
getFeatureClass()
Gets the feature class, this negotiator is responsible for.
|
StreamNegotiationResult |
processNegotiation(java.lang.Object element)
Processes a feature protocol element or the feature element itself.
|
StreamNegotiationResult processNegotiation(java.lang.Object element) throws StreamNegotiationException
Processes a feature protocol element or the feature element itself.
element
- The XML element, which belongs to the feature negotiation, e.g. <challenge/>
for SASL negotiation or the feature element itself, e.g. <mechanisms/>
.StreamNegotiationException
- Any exception which might be thrown during a feature negotiation.boolean canProcess(java.lang.Object element)
Checks, whether the element can be processed by the feature negotiator.
element
- The feature protocol element, e.g. <challenge/>
. The element is never the feature element itself, e.g. <mechanisms/>
, which is advertised in the <stream:features/>
element.java.lang.Class<T> getFeatureClass()
Gets the feature class, this negotiator is responsible for.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.