public class UserAgentContext extends BaseContext
BaseContext.ContextSetNoRemoveIteratorDecorator| Modifier and Type | Field and Description |
|---|---|
private InetAddress |
address
Address of the user-agent host.
|
private String |
identifier
An identification string (such as a User-Agent header).
|
private eu.bitwalker.useragentutils.UserAgent |
userAgent
Parsed User-Agent.
|
| Constructor and Description |
|---|
UserAgentContext() |
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
getAddress()
Get the address of the user-agent host.
|
String |
getIdentifier()
Get the user agent identifier.
|
eu.bitwalker.useragentutils.UserAgent |
getUserAgent()
Gets the parsed user agent.
|
boolean |
isInstance(eu.bitwalker.useragentutils.Browser browser)
Determines whether this user agent is an instance of the given browser.
|
boolean |
isInstance(eu.bitwalker.useragentutils.OperatingSystem os)
Determines whether this user agent is an instance of the given operating system.
|
UserAgentContext |
setAddress(InetAddress userAgentAddress)
Set the address of the user-agent host.
|
UserAgentContext |
setIdentifier(String id)
Set the user agent identifier.
|
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, isAutoCreateSubcontexts, iterator, removeSubcontext, removeSubcontext, setAutoCreateSubcontexts, setParent@Nullable private InetAddress address
@Nullable private String identifier
@Nullable private eu.bitwalker.useragentutils.UserAgent userAgent
@Nullable public InetAddress getAddress()
@Nonnull public UserAgentContext setAddress(@Nullable InetAddress userAgentAddress)
userAgentAddress - address of the user-agent host@Nullable public String getIdentifier()
@Nonnull public UserAgentContext setIdentifier(@Nullable String id)
getUserAgent() upon calling
this method.id - identifier for the user agent@Nullable public eu.bitwalker.useragentutils.UserAgent getUserAgent()
setIdentifier(String) has not been called.public boolean isInstance(@Nonnull eu.bitwalker.useragentutils.Browser browser)
browser - browser to check.public boolean isInstance(@Nonnull eu.bitwalker.useragentutils.OperatingSystem os)
os - operating system to check.Copyright © 1999–2018 Shibboleth Consortium. All rights reserved.