org.apache.http.impl.client

## Class BasicAuthCache

- java.lang.Object
- - org.apache.http.impl.client.BasicAuthCache

- All Implemented Interfaces:
    AuthCache

      @Contract(threading=SAFE)
      public class BasicAuthCache
      extends Object
      implements AuthCache

  默认实现`AuthCache` 。 这实现期望`AuthScheme`为`Serializable`以便可缓存。

  从4.4版本开始，该类的实例是线程安全的。

  从以下版本开始：
    4.1

- - ### 构造方法摘要

    构造方法
    Constructor and Description
    `BasicAuthCache()`
    `BasicAuthCache(SchemePortResolver schemePortResolver)` 默认构造函数。

  - ### 方法摘要

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `AuthScheme` | `get(HttpHost host)`
    `protected HttpHost` | `getKey(HttpHost host)`
    `void` | `put(HttpHost host, AuthScheme authScheme)`
    `void` | `remove(HttpHost host)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造方法详细信息

    - #### BasicAuthCache

          public BasicAuthCache(SchemePortResolver schemePortResolver)

      默认构造函数。
      从以下版本开始：
        4.3

    - #### BasicAuthCache

          public BasicAuthCache()

  - ### 方法详细信息

    - #### getKey

          protected HttpHost getKey(HttpHost host)

    - #### put

          public void put(HttpHost host,
                 AuthScheme authScheme)

      Specified by:
        `put`在接口 `AuthCache`

    - #### get

          public AuthScheme get(HttpHost host)

      Specified by:
        `get`在接口 `AuthCache`

    - #### remove

          public void remove(HttpHost host)

      Specified by:
        `remove`在接口 `AuthCache`

    - #### clear

          public void clear()

      Specified by:
        `clear`在接口 `AuthCache`

    - #### toString

          public String toString()

      重写：
        `toString`在 `Object`

Copyright © 1999–2017 The Apache Software Foundation. All rights reserved.

本帮助文档是使用 《谷歌翻译》翻译，请与英文版配合使用 by--QQ:654638585