當前位置: 首頁>>代碼示例>>Java>>正文


Java AuthCache.remove方法代碼示例

本文整理匯總了Java中org.apache.http.client.AuthCache.remove方法的典型用法代碼示例。如果您正苦於以下問題:Java AuthCache.remove方法的具體用法?Java AuthCache.remove怎麽用?Java AuthCache.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.http.client.AuthCache的用法示例。


在下文中一共展示了AuthCache.remove方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: authFailed

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
public void authFailed(
        final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
    if (authhost == null) {
        throw new IllegalArgumentException("Host may not be null");
    }
    if (context == null) {
        throw new IllegalArgumentException("HTTP context may not be null");
    }
    AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE);
    if (authCache != null) {
        if (this.log.isDebugEnabled()) {
            this.log.debug("Clearing cached auth scheme for " + authhost);
        }
        authCache.remove(authhost);
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:17,代碼來源:AuthenticationStrategyImpl.java

示例2: authFailed

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
public void authFailed(
        final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
    Args.notNull(authhost, "Host");
    Args.notNull(context, "HTTP context");

    final HttpClientContext clientContext = HttpClientContext.adapt(context);

    final AuthCache authCache = clientContext.getAuthCache();
    if (authCache != null) {
        if (Log.isLoggable(TAG, Log.DEBUG)) {
            Log.d(TAG, "Clearing cached auth scheme for " + authhost);
        }
        authCache.remove(authhost);
    }
}
 
開發者ID:xxonehjh,項目名稱:remote-files-sync,代碼行數:16,代碼來源:AuthenticationStrategyImpl.java

示例3: authFailed

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
@Override
public void authFailed(
        final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
    Args.notNull(authhost, "Host");
    Args.notNull(context, "HTTP context");

    final HttpClientContext clientContext = HttpClientContext.adapt(context);

    final AuthCache authCache = clientContext.getAuthCache();
    if (authCache != null) {
        if (this.log.isDebugEnabled()) {
            this.log.debug("Clearing cached auth scheme for " + authhost);
        }
        authCache.remove(authhost);
    }
}
 
開發者ID:MyPureCloud,項目名稱:purecloud-iot,代碼行數:17,代碼來源:AuthenticationStrategyImpl.java

示例4: authFailed

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
@Override
public void authFailed(final HttpHost authhost,
                       final AuthScheme authScheme,
                       final HttpContext context) {
    Objects.requireNonNull(authhost, "Authentication host must be present");
    Objects.requireNonNull(context, "HTTP context must be present");

    LOG.debug("HTTP Signature authentication failed");

    final HttpClientContext clientContext = HttpClientContext.adapt(context);

    final AuthCache authCache = clientContext.getAuthCache();
    if (authCache != null) {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Clearing cached auth scheme for " + authhost);
        }
        authCache.remove(authhost);
    }
}
 
開發者ID:joyent,項目名稱:java-http-signature,代碼行數:20,代碼來源:HttpSignatureAuthenticationStrategy.java

示例5: uncache

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
private void uncache(final AuthCache authCache, final HttpHost host, final AuthScheme authScheme) {
    if (this.log.isDebugEnabled()) {
        this.log.debug("Removing from cache '" + authScheme.getSchemeName() +
                "' auth scheme for " + host);
    }
    authCache.remove(host);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:8,代碼來源:ResponseAuthCache.java

示例6: authFailed

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
public void authFailed(
        final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
    AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE);
    if (authCache == null) {
        return;
    }
    if (this.log.isDebugEnabled()) {
        this.log.debug("Removing from cache '" + authScheme.getSchemeName() +
                "' auth scheme for " + authhost);
    }
    authCache.remove(authhost);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:13,代碼來源:AuthenticationStrategyAdaptor.java

示例7: authFailed

import org.apache.http.client.AuthCache; //導入方法依賴的package包/類
@Override
public void authFailed(
        final HttpHost authhost, final AuthScheme authScheme, final HttpContext context) {
    final AuthCache authCache = (AuthCache) context.getAttribute(ClientContext.AUTH_CACHE);
    if (authCache == null) {
        return;
    }
    if (this.log.isDebugEnabled()) {
        this.log.debug("Removing from cache '" + authScheme.getSchemeName() +
                "' auth scheme for " + authhost);
    }
    authCache.remove(authhost);
}
 
開發者ID:MyPureCloud,項目名稱:purecloud-iot,代碼行數:14,代碼來源:AuthenticationStrategyAdaptor.java


注:本文中的org.apache.http.client.AuthCache.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。