• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DomainBareJid类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jxmpp.jid.DomainBareJid的典型用法代码示例。如果您正苦于以下问题:Java DomainBareJid类的具体用法?Java DomainBareJid怎么用?Java DomainBareJid使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DomainBareJid类属于org.jxmpp.jid包,在下文中一共展示了DomainBareJid类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: domainBareFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Get a domain bare JID.
 *
 * @param jid the JID String.
 * @return a domain bare JID.
 * @throws XmppStringprepException if an error occurs.
 */
public static DomainBareJid domainBareFrom(String jid) throws XmppStringprepException {
	DomainBareJid domainJid = DOMAINJID_CACHE.lookup(jid);
	if (domainJid != null) {
		return domainJid;
	}

	String domain = XmppStringUtils.parseDomain(jid);
	try {
		domainJid = new DomainpartJid(domain);
	} catch (XmppStringprepException e) {
		throw new XmppStringprepException(jid, e);
	}
	DOMAINJID_CACHE.put(jid, domainJid);
	return domainJid;
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:23,代码来源:JidCreate.java


示例2: buildConfiguration

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
private XMPPTCPConnectionConfiguration buildConfiguration() throws XmppStringprepException {
    XMPPTCPConnectionConfiguration.Builder builder =
            XMPPTCPConnectionConfiguration.builder();


    builder.setHost(HOST1);
    builder.setPort(PORT);
    builder.setCompressionEnabled(false);
    builder.setDebuggerEnabled(true);
    builder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
    builder.setSendPresence(true);
    if (Build.VERSION.SDK_INT >= 14) {
        builder.setKeystoreType("AndroidCAStore");
        // config.setTruststorePassword(null);
        builder.setKeystorePath(null);
    } else {
        builder.setKeystoreType("BKS");
        String str = System.getProperty("javax.net.ssl.trustStore");
        if (str == null) {
            str = System.getProperty("java.home") + File.separator + "etc" + File.separator + "security"
                    + File.separator + "cacerts.bks";
        }
        builder.setKeystorePath(str);
    }
    DomainBareJid serviceName = JidCreate.domainBareFrom(HOST);
    builder.setServiceName(serviceName);


    return builder.build();
}
 
开发者ID:saveendhiman,项目名称:XMPPSample_Studio,代码行数:31,代码来源:XMPP.java


示例3: getDefaultGroupChatService

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public String getDefaultGroupChatService ()
{
    try {
        // Create a MultiUserChat using a Connection for a room
        //TODO fix this with new smack
        MultiUserChatManager mucMgr = MultiUserChatManager.getInstanceFor(mConnection);

        if (!mucMgr.providesMucService(JidCreate.domainBareFrom(mUserJid)))
            return DEFAULT_CONFERENCE_SERVER;

        Collection<DomainBareJid> servers = mucMgr.getXMPPServiceDomains();


        //just grab the first one
        for (DomainBareJid server : servers)
            return server.toString();

    }
    catch (Exception xe)
    {
        Log.w(TAG, "Error discovering MUC server",xe);

        //unable to find conference server
        return DEFAULT_CONFERENCE_SERVER;
    }

    return DEFAULT_CONFERENCE_SERVER;
}
 
开发者ID:zom,项目名称:Zom-Android,代码行数:30,代码来源:XmppConnection.java


示例4: domainBareThrowTest

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Test
public void domainBareThrowTest() {
	final String notADomainBareJid = "";
	try {
		DomainBareJid jid = JidCreate.domainBareFrom(notADomainBareJid);
		// Should throw
		fail(jid + " should never been created");
	} catch (XmppStringprepException e) {
		assertEquals(notADomainBareJid, e.getCausingString());
	}
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:12,代码来源:JidCreateTest.java


示例5: DomainAndResourcepartJid

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
DomainAndResourcepartJid(DomainBareJid domainBareJid, Resourcepart resource) {
	this.domainBareJid = requireNonNull(domainBareJid, "The DomainBareJid must not be null");
	this.resource = requireNonNull(resource, "The Resource must not be null");
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:DomainAndResourcepartJid.java


示例6: asDomainBareJid

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public DomainBareJid asDomainBareJid() {
	return domainBareJid;
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:DomainAndResourcepartJid.java


示例7: isParentOf

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public boolean isParentOf(DomainBareJid domainBareJid) {
	return false;
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:DomainAndResourcepartJid.java


示例8: isDomainBareJid

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public final boolean isDomainBareJid() {
	return this instanceof DomainBareJid;
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:AbstractJid.java


示例9: asDomainBareJid

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public DomainBareJid asDomainBareJid() {
	return this;
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:DomainpartJid.java


示例10: isParentOf

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public boolean isParentOf(DomainBareJid domainBareJid) {
	return domain.equals(domainBareJid.getDomain());
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:DomainpartJid.java


示例11: asDomainBareJid

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
@Override
public DomainBareJid asDomainBareJid() {
	return bareJid.asDomainBareJid();
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:5,代码来源:LocalDomainAndResourcepartJid.java


示例12: getManualServiceSettingsService

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
private DomainBareJid getManualServiceSettingsService() throws XmppStringprepException {
	final String jidString = mSharedPreferences.getString(MANUAL_SERVICE_SETTINGS_SERVICE, "");
	return JidCreate.domainBareFrom(jidString);
}
 
开发者ID:ProjectMAXS,项目名称:maxs,代码行数:5,代码来源:Settings.java


示例13: bareFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Get a {@link BareJid} constructed from the optionally given {@link Localpart} and {link DomainBareJid}.
 *
 * @param localpart a optional localpart.
 * @param domainBareJid a domain bare JID.
 * @return a bare JID.
 */
public static BareJid bareFrom(Localpart localpart, DomainBareJid domainBareJid) {
	return bareFrom(localpart, domainBareJid.getDomain());
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:11,代码来源:JidCreate.java


示例14: fullFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Get a {@link FullJid} constructed from the given parts.
 *
 * @param localpart a optional localpart.
 * @param domainBareJid a domain bare JID. 
 * @param resource a resourcepart
 * @return a full JID.
 */
public static FullJid fullFrom(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) {
	return fullFrom(localpart, domainBareJid.getDomain(), resource);
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:12,代码来源:JidCreate.java


示例15: entityBareFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Get a {@link EntityBareJid} constructed from the given {@link Localpart} and {link DomainBareJid}.
 *
 * @param localpart a localpart.
 * @param domainBareJid a domain bare JID.
 * @return a bare JID.
 */
public static EntityBareJid entityBareFrom(Localpart localpart, DomainBareJid domainBareJid) {
	return entityBareFrom(localpart, domainBareJid.getDomain());
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:11,代码来源:JidCreate.java


示例16: entityFullFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Get a {@link EntityFullJid} constructed from the given parts.
 *
 * @param localpart a localpart.
 * @param domainBareJid a domain bare JID.. 
 * @param resource a resourcepart
 * @return a full JID.
 */
public static EntityFullJid entityFullFrom(Localpart localpart, DomainBareJid domainBareJid, Resourcepart resource) {
	return entityFullFrom(localpart, domainBareJid.getDomain(), resource);
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:12,代码来源:JidCreate.java


示例17: serverBareFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Deprecated.
 *
 * @param jid the JID.
 * @return a DopmainBareJid
 * @throws XmppStringprepException if an error happens.
 * @deprecated use {@link #domainBareFrom(String)} instead
 */
@Deprecated
public static DomainBareJid serverBareFrom(String jid) throws XmppStringprepException {
	return domainBareFrom(jid);
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:13,代码来源:JidCreate.java


示例18: domainFullFrom

import org.jxmpp.jid.DomainBareJid; //导入依赖的package包/类
/**
 * Get a domain full JID.
 *
 * @param domainBareJid a domain bare JID.
 * @param resource a resourcepart.
 * @return a domain full JID.
 */
public static DomainFullJid domainFullFrom(DomainBareJid domainBareJid, Resourcepart resource) {
	return new DomainAndResourcepartJid(domainBareJid, resource);
}
 
开发者ID:igniterealtime,项目名称:jxmpp,代码行数:11,代码来源:JidCreate.java



注:本文中的org.jxmpp.jid.DomainBareJid类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PrimitiveType类代码示例发布时间:2022-05-23
下一篇:
Java YearMonth类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap