导航菜单

页面标题

页面副标题

bbinstant v6.24.0 - PubSub.java 源代码

正在查看: bbinstant v6.24.0 应用的 PubSub.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package org.jivesoftware.smackx.pubsub.packet;

import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smackx.pubsub.PubSubElementType;
import org.jxmpp.jid.i;

public class PubSub extends IQ {
    public static final String ELEMENT = "pubsub";
    public static final String NAMESPACE = "http://jabber.org/protocol/pubsub";

    public PubSub() {
        super("pubsub", "http://jabber.org/protocol/pubsub");
    }

    public static PubSub createPubsubPacket(i iVar, IQ.Type type, ExtensionElement extensionElement, PubSubNamespace pubSubNamespace) {
        PubSub pubSub = new PubSub(iVar, type, pubSubNamespace);
        pubSub.addExtension(extensionElement);
        return pubSub;
    }

    public <PE extends ExtensionElement> PE getExtension(PubSubElementType pubSubElementType) {
        return (PE) getExtension(pubSubElementType.getElementName(), pubSubElementType.getNamespace().getXmlns());
    }

    @Override
    protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
        iQChildElementXmlStringBuilder.rightAngleBracket();
        return iQChildElementXmlStringBuilder;
    }

    public PubSub(PubSubNamespace pubSubNamespace) {
        super("pubsub", pubSubNamespace.getXmlns());
    }

    public PubSub(i iVar, IQ.Type type, PubSubNamespace pubSubNamespace) {
        super("pubsub", (pubSubNamespace == null ? PubSubNamespace.BASIC : pubSubNamespace).getXmlns());
        setTo(iVar);
        setType(type);
    }
}