Add static QNAME field to Compressed, Failure and Tls(Failure|Proceed)

This commit is contained in:
Florian Schmaus 2020-06-14 16:51:28 +02:00
parent cf1f533fff
commit c689bef7ec
4 changed files with 16 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/**
*
* Copyright © 2014-2015 Florian Schmaus
* Copyright © 2014-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,12 +16,15 @@
*/
package org.jivesoftware.smack.compress.packet;
import javax.xml.namespace.QName;
import org.jivesoftware.smack.packet.Nonza;
public final class Compressed implements Nonza {
public static final String ELEMENT = "compressed";
public static final String NAMESPACE = Compress.NAMESPACE;
public static final QName QNAME = new QName(NAMESPACE, ELEMENT);
public static final Compressed INSTANCE = new Compressed();

View File

@ -1,6 +1,6 @@
/**
*
* Copyright 2018 Florian Schmaus
* Copyright 2018-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -18,6 +18,8 @@ package org.jivesoftware.smack.compress.packet;
import java.util.Objects;
import javax.xml.namespace.QName;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.StanzaError;
import org.jivesoftware.smack.util.XmlStringBuilder;
@ -26,6 +28,7 @@ public class Failure implements Nonza {
public static final String ELEMENT = "failure";
public static final String NAMESPACE = Compress.NAMESPACE;
public static final QName QNAME = new QName(NAMESPACE, ELEMENT);
public enum CompressFailureError {
setup_failed,

View File

@ -1,6 +1,6 @@
/**
*
* Copyright 2018 Florian Schmaus
* Copyright 2018-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,12 +16,15 @@
*/
package org.jivesoftware.smack.packet;
import javax.xml.namespace.QName;
public final class TlsFailure implements Nonza {
public static final TlsFailure INSTANCE = new TlsFailure();
public static final String ELEMENT = "failure";
public static final String NAMESPACE = TlsProceed.NAMESPACE;
public static final QName QNAME = new QName(NAMESPACE, ELEMENT);
private TlsFailure() {
}

View File

@ -1,6 +1,6 @@
/**
*
* Copyright 2018 Florian Schmaus
* Copyright 2018-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,12 +16,15 @@
*/
package org.jivesoftware.smack.packet;
import javax.xml.namespace.QName;
public final class TlsProceed implements Nonza {
public static final TlsProceed INSTANCE = new TlsProceed();
public static final String ELEMENT = "proceed";
public static final String NAMESPACE = "urn:ietf:params:xml:ns:xmpp-tls";
public static final QName QNAME = new QName(NAMESPACE, ELEMENT);
private TlsProceed() {
}