当前位置: 首页>>代码示例>>Java>>正文


Java CookieStore类代码示例

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


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

示例1: InternalHttpClient

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public InternalHttpClient(
        final ClientExecChain execChain,
        final HttpClientConnectionManager connManager,
        final HttpRoutePlanner routePlanner,
        final Lookup<CookieSpecProvider> cookieSpecRegistry,
        final Lookup<AuthSchemeProvider> authSchemeRegistry,
        final CookieStore cookieStore,
        final CredentialsProvider credentialsProvider,
        final RequestConfig defaultConfig,
        final List<Closeable> closeables) {
    super();
    Args.notNull(execChain, "HTTP client exec chain");
    Args.notNull(connManager, "HTTP connection manager");
    Args.notNull(routePlanner, "HTTP route planner");
    this.execChain = execChain;
    this.connManager = connManager;
    this.routePlanner = routePlanner;
    this.cookieSpecRegistry = cookieSpecRegistry;
    this.authSchemeRegistry = authSchemeRegistry;
    this.cookieStore = cookieStore;
    this.credentialsProvider = credentialsProvider;
    this.defaultConfig = defaultConfig;
    this.closeables = closeables;
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:25,代码来源:InternalHttpClient.java

示例2: process

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public void process(final HttpResponse response, final HttpContext context)
        throws HttpException, IOException {
    Args.notNull(response, "HTTP request");
    Args.notNull(context, "HTTP context");

    final HttpClientContext clientContext = HttpClientContext.adapt(context);

    // Obtain actual CookieSpec instance
    final CookieSpec cookieSpec = clientContext.getCookieSpec();
    if (cookieSpec == null) {
        this.log.debug("Cookie spec not specified in HTTP context");
        return;
    }
    // Obtain cookie store
    final CookieStore cookieStore = clientContext.getCookieStore();
    if (cookieStore == null) {
        this.log.debug("Cookie store not specified in HTTP context");
        return;
    }
    // Obtain actual CookieOrigin instance
    final CookieOrigin cookieOrigin = clientContext.getCookieOrigin();
    if (cookieOrigin == null) {
        this.log.debug("Cookie origin not specified in HTTP context");
        return;
    }
    HeaderIterator it = response.headerIterator(SM.SET_COOKIE);
    processCookies(it, cookieSpec, cookieOrigin, cookieStore);

    // see if the cookie spec supports cookie versioning.
    if (cookieSpec.getVersion() > 0) {
        // process set-cookie2 headers.
        // Cookie2 will replace equivalent Cookie instances
        it = response.headerIterator(SM.SET_COOKIE2);
        processCookies(it, cookieSpec, cookieOrigin, cookieStore);
    }
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:37,代码来源:ResponseProcessCookies.java

示例3: setCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public void setCookieStore(final CookieStore store) {
    this.context.setAttribute(COOKIE_STORE, store);
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:4,代码来源:ClientContextConfigurer.java

示例4: getCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public CookieStore getCookieStore() {
    return getAttribute(COOKIE_STORE, CookieStore.class);
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:4,代码来源:HttpClientContext.java

示例5: setCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public void setCookieStore(final CookieStore cookieStore) {
    setAttribute(COOKIE_STORE, cookieStore);
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:4,代码来源:HttpClientContext.java

示例6: createCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
protected CookieStore createCookieStore() {
    return new BasicCookieStore();
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:4,代码来源:AbstractHttpClient.java

示例7: getCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public synchronized final CookieStore getCookieStore() {
    if (cookieStore == null) {
        cookieStore = createCookieStore();
    }
    return cookieStore;
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:7,代码来源:AbstractHttpClient.java

示例8: setCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public synchronized void setCookieStore(final CookieStore cookieStore) {
    this.cookieStore = cookieStore;
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:4,代码来源:AbstractHttpClient.java

示例9: setDefaultCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
/**
 * Assigns default {@link CookieStore} instance which will be used for
 * request execution if not explicitly set in the client execution context.
 */
public final HttpClientBuilder setDefaultCookieStore(final CookieStore cookieStore) {
    this.cookieStore = cookieStore;
    return this;
}
 
开发者ID:mozilla-mobile,项目名称:FirefoxData-android,代码行数:9,代码来源:HttpClientBuilder.java

示例10: getCookieStore

import ch.boye.httpclientandroidlib.client.CookieStore; //导入依赖的package包/类
public CookieStore getCookieStore() {
    return cookieStore;
}
 
开发者ID:eleks,项目名称:rnd-android-wear-tesla,代码行数:4,代码来源:ApiEngine.java


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