Examples of AskSubscriptionType


Examples of org.apache.vysper.xmpp.modules.roster.AskSubscriptionType

                subscriptionType = SubscriptionType.valueOf(typeString == null ? "NONE" : typeString.toUpperCase());
            } catch (IllegalArgumentException e) {
                logger.warn("when loading roster for user " + bareJid + ", contact " + contactJid + " misses a subscription type", bareJid, contactJid);
            }
            String askTypeString = readAttribute(node, "askType");
            AskSubscriptionType askSubscriptionType = AskSubscriptionType.NOT_SET;
            try {
                if (askTypeString != null) askSubscriptionType = AskSubscriptionType.valueOf(askTypeString);
            } catch (IllegalArgumentException e) {
                logger.warn("when loading roster for user " + bareJid.getFullQualifiedName() + ", contact " + contactJid.getFullQualifiedName() + ", the ask subscription type is unparsable. skipping!");
                continue; // don't return it, don't set a default!
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.AskSubscriptionType

        }
    }

    protected Result addAskSubscribe(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        AskSubscriptionType typeAsk = item.getAskSubscriptionType();
        if (type.includesTo()) return ALREADY_SET;
        if (typeAsk == ASK_SUBSCRIBE) return OK;
        // IGNORE this, overwrite! if (typeAsk == ASK_SUBSCRIBED) return ALREADY_SET;
        item.setAskSubscriptionType(ASK_SUBSCRIBE);
        return OK;
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.AskSubscriptionType

        return OK;
    }

    protected Result addAskSubscribed(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        AskSubscriptionType typeAsk = item.getAskSubscriptionType();
        if (type.includesFrom()) return ALREADY_SET;
        if (typeAsk == ASK_SUBSCRIBE) return FAILED; // TODO think about return value
        if (typeAsk == ASK_SUBSCRIBED) return OK;
        item.setAskSubscriptionType(ASK_SUBSCRIBED);
        return OK;
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.AskSubscriptionType

    protected Result removeTo(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        if (!type.includesTo()) {
            // if sub was asked, remove that.
            AskSubscriptionType askType = item.getAskSubscriptionType();
            if (askType != ASK_SUBSCRIBE) return ALREADY_SET;
            item.setAskSubscriptionType(NOT_SET);
            return OK;
        }
        if (type == BOTH) {
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.AskSubscriptionType

    protected Result removeFrom(RosterItem item) {
        SubscriptionType type = item.getSubscriptionType();
        if (!type.includesFrom()) {
            // if sub was asked, remove that.
            AskSubscriptionType askType = item.getAskSubscriptionType();
            if (askType != ASK_SUBSCRIBED) return ALREADY_SET;
            item.setAskSubscriptionType(NOT_SET);
            return OK;
        }
        if (type == BOTH) {
View Full Code Here

Examples of org.apache.vysper.xmpp.modules.roster.AskSubscriptionType

            } catch (IllegalArgumentException e) {
                logger.warn("when loading roster for user " + bareJid + ", contact " + contactJid
                        + " misses a subscription type", bareJid, contactJid);
            }
            String askTypeString = readAttribute(node, "askType");
            AskSubscriptionType askSubscriptionType = AskSubscriptionType.NOT_SET;
            try {
                if (askTypeString != null)
                    askSubscriptionType = AskSubscriptionType.valueOf(askTypeString);
            } catch (IllegalArgumentException e) {
                logger.warn("when loading roster for user " + bareJid.getFullQualifiedName() + ", contact "
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.