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

Java CookieIdentityComparator类代码示例

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

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



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

示例1: testCookieIdentityComparasionByNameDomainAndPath

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
@Test
public void testCookieIdentityComparasionByNameDomainAndPath() {
    final CookieIdentityComparator comparator = new CookieIdentityComparator();
    final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
    c1.setDomain("www.domain.com");
    c1.setPath("/whatever");
    final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
    c2.setDomain("www.domain.com");
    c2.setPath("/whatever");
    Assert.assertTrue(comparator.compare(c1, c2) == 0);

    final BasicClientCookie c3 = new BasicClientCookie("name", "value1");
    c3.setDomain("www.domain.com");
    c3.setPath("/whatever");
    final BasicClientCookie c4 = new BasicClientCookie("name", "value2");
    c4.setDomain("domain.com");
    c4.setPath("/whatever-not");
    Assert.assertFalse(comparator.compare(c3, c4) == 0);
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:20,代码来源:TestCookieIdentityComparator.java


示例2: testCookieIdentityComparasionByNameDomainAndNullPath

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
@Test
public void testCookieIdentityComparasionByNameDomainAndNullPath() {
    final CookieIdentityComparator comparator = new CookieIdentityComparator();
    final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
    c1.setDomain("www.domain.com");
    c1.setPath("/");
    final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
    c2.setDomain("www.domain.com");
    c2.setPath(null);
    Assert.assertTrue(comparator.compare(c1, c2) == 0);

    final BasicClientCookie c3 = new BasicClientCookie("name", "value1");
    c3.setDomain("www.domain.com");
    c3.setPath("/whatever");
    final BasicClientCookie c4 = new BasicClientCookie("name", "value2");
    c4.setDomain("domain.com");
    c4.setPath(null);
    Assert.assertFalse(comparator.compare(c3, c4) == 0);
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:20,代码来源:TestCookieIdentityComparator.java


示例3: testCookieIdentityComparasionByName

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
@Test
public void testCookieIdentityComparasionByName() {
    final CookieIdentityComparator comparator = new CookieIdentityComparator();
    final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
    final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
    Assert.assertTrue(comparator.compare(c1, c2) == 0);

    final BasicClientCookie c3 = new BasicClientCookie("name1", "value");
    final BasicClientCookie c4 = new BasicClientCookie("name2", "value");
    Assert.assertFalse(comparator.compare(c3, c4) == 0);
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:12,代码来源:TestCookieIdentityComparator.java


示例4: testCookieIdentityComparasionByNameAndDomain

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
@Test
public void testCookieIdentityComparasionByNameAndDomain() {
    final CookieIdentityComparator comparator = new CookieIdentityComparator();
    final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
    c1.setDomain("www.domain.com");
    final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
    c2.setDomain("www.domain.com");
    Assert.assertTrue(comparator.compare(c1, c2) == 0);

    final BasicClientCookie c3 = new BasicClientCookie("name", "value1");
    c3.setDomain("www.domain.com");
    final BasicClientCookie c4 = new BasicClientCookie("name", "value2");
    c4.setDomain("domain.com");
    Assert.assertFalse(comparator.compare(c3, c4) == 0);
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:16,代码来源:TestCookieIdentityComparator.java


示例5: testCookieIdentityComparasionByNameAndNullDomain

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
@Test
public void testCookieIdentityComparasionByNameAndNullDomain() {
    final CookieIdentityComparator comparator = new CookieIdentityComparator();
    final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
    c1.setDomain(null);
    final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
    c2.setDomain(null);
    Assert.assertTrue(comparator.compare(c1, c2) == 0);

    final BasicClientCookie c3 = new BasicClientCookie("name", "value1");
    c3.setDomain("www.domain.com");
    final BasicClientCookie c4 = new BasicClientCookie("name", "value2");
    c4.setDomain(null);
    Assert.assertFalse(comparator.compare(c3, c4) == 0);
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:16,代码来源:TestCookieIdentityComparator.java


示例6: testCookieIdentityComparasionByNameAndLocalHost

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
@Test
public void testCookieIdentityComparasionByNameAndLocalHost() {
    final CookieIdentityComparator comparator = new CookieIdentityComparator();
    final BasicClientCookie c1 = new BasicClientCookie("name", "value1");
    c1.setDomain("localhost");
    final BasicClientCookie c2 = new BasicClientCookie("name", "value2");
    c2.setDomain("localhost");
    Assert.assertTrue(comparator.compare(c1, c2) == 0);

    final BasicClientCookie c3 = new BasicClientCookie("name", "value1");
    c3.setDomain("localhost.local");
    final BasicClientCookie c4 = new BasicClientCookie("name", "value2");
    c4.setDomain("localhost");
    Assert.assertTrue(comparator.compare(c3, c4) == 0);
}
 
开发者ID:MyPureCloud,项目名称:purecloud-iot,代码行数:16,代码来源:TestCookieIdentityComparator.java


示例7: BarrierCookieStore

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
public BarrierCookieStore() {
    super();
    this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator());
}
 
开发者ID:brucezee,项目名称:jspider,代码行数:5,代码来源:BarrierCookieStore.java


示例8: BasicCookieStore

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
public BasicCookieStore() {
    super();
    this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:BasicCookieStore.java


示例9: BasicCookieStoreHC4

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
public BasicCookieStoreHC4() {
    super();
    this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator());
}
 
开发者ID:xxonehjh,项目名称:remote-files-sync,代码行数:5,代码来源:BasicCookieStoreHC4.java


示例10: LocalCookieStore

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
public LocalCookieStore() {
    super();
    this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator());
}
 
开发者ID:crawler-commons,项目名称:http-fetcher,代码行数:5,代码来源:LocalCookieStore.java


示例11: CustomCookieStore

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
public CustomCookieStore()
{
	super();
	this.cookies = new TreeSet<Cookie>(new CookieIdentityComparator());
}
 
开发者ID:Leejjon,项目名称:libgdx-chat-example,代码行数:6,代码来源:CustomCookieStore.java


示例12: BasicCookieStore

import org.apache.http.cookie.CookieIdentityComparator; //导入依赖的package包/类
/**
 * Default constructor.
 */
public BasicCookieStore() {
    super();
    this.cookies = new ArrayList<Cookie>();
    this.cookieComparator = new CookieIdentityComparator();
}
 
开发者ID:tdopires,项目名称:cJUnit-mc626,代码行数:9,代码来源:BasicCookieStore.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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