- All Known Implementing Classes:
AbstractUserAgent
,DOMCSSStyleSheetFactory.WrapperUserAgent
- Enclosing interface:
- UserAgent
public static interface UserAgent.AgentControl
User agent configuration and control.
-
Method Summary
Modifier and TypeMethodDescriptionauthenticationCredentials
(String host, String realm) Gives the credentials for the given hostname and realm, creating a new one if there is none.getAuthenticationCredentials
(URL url, String realm) Gets the authentication credentials for the given URL.Gets the global, useragent-wide default cookie config.getProperty
(String propertyName) Gets a control property.void
setConnectionTimeout
(int timeout) Sets the connection timeout.void
setProperty
(String propertyName, String value) Sets a control property.
-
Method Details
-
getProperty
Gets a control property.- Parameters:
propertyName
- the property name.- Returns:
- the string representation of the property value, or null if the property is not set.
-
setProperty
Sets a control property.If the property is not known, the user agent may invoke the method
UserAgentErrorHandler.onUnknownProperty(String, String)
. If the property is known but the value is wrong, the user agent should call the methodUserAgentErrorHandler.onWrongPropertyValue(String, String)
.- Parameters:
propertyName
- the name of the property to set.value
- the string representation of the property value.
-
getCookieConfig
CookieConfig getCookieConfig()Gets the global, useragent-wide default cookie config.- Returns:
- the default user-agent cookie config.
-
getAuthenticationCredentials
Gets the authentication credentials for the given URL.- Parameters:
url
- the url for which the credential is required.realm
- the realm name, or null if there is no realm, in which case any valid credential will be returned.- Returns:
- the authentication credentials, or null if there is none.
-
authenticationCredentials
Gives the credentials for the given hostname and realm, creating a new one if there is none.- Parameters:
host
- the host.realm
- the realm. Cannot be null.- Returns:
- the credentials.
-
setConnectionTimeout
void setConnectionTimeout(int timeout) Sets the connection timeout.- Parameters:
timeout
- the connection timeout, in milliseconds. Atimeout
of 0 means no timeout (the default).
-