Class SharingAuthCache
- java.lang.Object
-
- org.eclipse.aether.transport.http.SharingAuthCache
-
- All Implemented Interfaces:
org.apache.http.client.AuthCache
final class SharingAuthCache extends java.lang.Object implements org.apache.http.client.AuthCache
Auth scheme cache that upon clearing releases all cached schemes into a pool for future reuse by other requests, thereby reducing challenge-response roundtrips.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<org.apache.http.HttpHost,org.apache.http.auth.AuthScheme>
authSchemes
private LocalState
state
-
Constructor Summary
Constructors Constructor Description SharingAuthCache(LocalState state)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
org.apache.http.auth.AuthScheme
get(org.apache.http.HttpHost host)
void
put(org.apache.http.HttpHost host, org.apache.http.auth.AuthScheme authScheme)
void
remove(org.apache.http.HttpHost host)
private void
share()
private static org.apache.http.HttpHost
toKey(org.apache.http.HttpHost host)
java.lang.String
toString()
-
-
-
Field Detail
-
state
private final LocalState state
-
authSchemes
private final java.util.Map<org.apache.http.HttpHost,org.apache.http.auth.AuthScheme> authSchemes
-
-
Constructor Detail
-
SharingAuthCache
SharingAuthCache(LocalState state)
-
-
Method Detail
-
toKey
private static org.apache.http.HttpHost toKey(org.apache.http.HttpHost host)
-
get
public org.apache.http.auth.AuthScheme get(org.apache.http.HttpHost host)
- Specified by:
get
in interfaceorg.apache.http.client.AuthCache
-
put
public void put(org.apache.http.HttpHost host, org.apache.http.auth.AuthScheme authScheme)
- Specified by:
put
in interfaceorg.apache.http.client.AuthCache
-
remove
public void remove(org.apache.http.HttpHost host)
- Specified by:
remove
in interfaceorg.apache.http.client.AuthCache
-
clear
public void clear()
- Specified by:
clear
in interfaceorg.apache.http.client.AuthCache
-
share
private void share()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-