本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}