mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
Add XMPP.(get|has)Feature(Class|QName) and deprecate (String, String)
This commit is contained in:
parent
91337150e7
commit
329948b442
13 changed files with 78 additions and 18 deletions
|
@ -797,7 +797,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
return;
|
||||
}
|
||||
|
||||
Compress.Feature compression = getFeature(Compress.Feature.ELEMENT, Compress.NAMESPACE);
|
||||
Compress.Feature compression = getFeature(Compress.Feature.class);
|
||||
if (compression == null) {
|
||||
// Server does not support compression
|
||||
return;
|
||||
|
@ -853,7 +853,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
|
||||
@Override
|
||||
protected void afterFeaturesReceived() throws NotConnectedException, InterruptedException, SecurityRequiredByServerException {
|
||||
StartTls startTlsFeature = getFeature(StartTls.ELEMENT, StartTls.NAMESPACE);
|
||||
StartTls startTlsFeature = getFeature(StartTls.class);
|
||||
if (startTlsFeature != null) {
|
||||
if (startTlsFeature.required() && config.getSecurityMode() == SecurityMode.disabled) {
|
||||
SecurityRequiredByServerException smackException = new SecurityRequiredByServerException();
|
||||
|
|
|
@ -819,7 +819,7 @@ public class XmppTcpTransportModule extends ModularXmppClientToServerConnectionM
|
|||
@Override
|
||||
public StateTransitionResult.TransitionImpossible isTransitionToPossible(WalkStateGraphContext walkStateGraphContext)
|
||||
throws SecurityRequiredByClientException, SecurityRequiredByServerException {
|
||||
StartTls startTlsFeature = connectionInternal.connection.getFeature(StartTls.ELEMENT, StartTls.NAMESPACE);
|
||||
StartTls startTlsFeature = connectionInternal.connection.getFeature(StartTls.class);
|
||||
SecurityMode securityMode = connectionInternal.connection.getConfiguration().getSecurityMode();
|
||||
|
||||
switch (securityMode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue