Class ClientHintsHeadersParser
java.lang.Object
nl.basjes.parse.useragent.clienthints.ClientHintsHeadersParser
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ClientHintsAnalyzer
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidconfigureKryo(Object kryoInstance) This is used to configure the provided Kryo instance if Kryo serialization is desired.intvoidbooleanisSupportedClientHintHeader(String header) Tries to find as much usefull information from the client Headers as possible.voidsetCacheInstantiator(AbstractUserAgentAnalyzer.ClientHintsCacheInstantiator<?> newClientHintsCacheInstantiator) voidsetCacheSize(int newClientHintsCacheSize) toString()
-
Field Details
-
LOG
public static final org.apache.logging.log4j.Logger LOG
-
-
Constructor Details
-
ClientHintsHeadersParser
public ClientHintsHeadersParser()
-
-
Method Details
-
supportedClientHintHeaders
-
isSupportedClientHintHeader
-
configureKryo
This is used to configure the provided Kryo instance if Kryo serialization is desired. The expected type here is Object because otherwise the Kryo library becomes a mandatory dependency on any project that uses Yauaa.- Parameters:
kryoInstance- The instance of com.esotericsoftware.kryo.Kryo that needs to be configured.
-
parse
Tries to find as much usefull information from the client Headers as possible.- Parameters:
requestHeaders- The full list of available request headers that may contain some useable Client Hints.- Returns:
- An instance of ClientHints. Possibly without anything in it.
-
toString
-
getCacheSize
public int getCacheSize() -
setCacheSize
public void setCacheSize(int newClientHintsCacheSize) -
setCacheInstantiator
public void setCacheInstantiator(AbstractUserAgentAnalyzer.ClientHintsCacheInstantiator<?> newClientHintsCacheInstantiator) -
initializeCache
public void initializeCache() -
clearCache
public void clearCache()
-