Package org.codelibs.fess.helper
Class UserAgentHelper
java.lang.Object
org.codelibs.fess.helper.UserAgentHelper
Helper class for detecting and categorizing user agent types from HTTP requests.
This class analyzes the User-Agent header to determine which browser type is being used
and caches the result in the request attribute for performance optimization.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of supported browser types for user agent detection. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDetermines the user agent type from the current HTTP request.
-
Field Details
-
USER_AGENT
The HTTP header name for User-Agent- See Also:
-
USER_AGENT_TYPE
The request attribute key for storing cached user agent type- See Also:
-
-
Constructor Details
-
UserAgentHelper
public UserAgentHelper()Default constructor for UserAgentHelper.
-
-
Method Details
-
getUserAgentType
Determines the user agent type from the current HTTP request. The method analyzes the User-Agent header to categorize the browser type and caches the result in the request attribute for subsequent calls.- Returns:
- the detected user agent type, or OTHER if no specific type is detected
-