Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.lobobrowser.html.test.SimpleUserAgentContext
UserAgentContext
.
Method Summary | |
HttpRequest |
|
void |
|
void |
|
String | |
String | |
String | |
String | |
String | |
String |
|
String | |
protected java.net.Proxy |
|
int |
|
Policy |
|
String | |
boolean | |
boolean |
|
boolean |
|
void |
|
void |
|
void |
|
public HttpRequest createHttpRequest()
Creates aSimpleHttpRequest
instance. Override if a custom mechanism to make requests is needed.
- Specified by:
- createHttpRequest in interface UserAgentContext
public void error(String message)
public void error(String message, Throwable throwable)
public String getAppCodeName()
- Specified by:
- getAppCodeName in interface UserAgentContext
public String getAppMinorVersion()
- Specified by:
- getAppMinorVersion in interface UserAgentContext
public String getBrowserLanguage()
- Specified by:
- getBrowserLanguage in interface UserAgentContext
public String getCookie(java.net.URL url)
- Specified by:
- getCookie in interface UserAgentContext
protected java.net.Proxy getProxy()
Gets the connection proxy used in requests created bycreateHttpRequest()
by default. It returnsProxy.NO_PROXY
, but it may be overridden.
public int getScriptingOptimizationLevel()
Returns -1. Override to provide a different Rhino optimization level.
- Specified by:
- getScriptingOptimizationLevel in interface UserAgentContext
public Policy getSecurityPolicy()
Returnsnull
. This method must be overridden if JavaScript code is untrusted.
- Specified by:
- getSecurityPolicy in interface UserAgentContext
public boolean isCookieEnabled()
- Specified by:
- isCookieEnabled in interface UserAgentContext
public boolean isMedia(String mediaName)
This implementation returns true for certain media names, such asscreen
.
- Specified by:
- isMedia in interface UserAgentContext
public boolean isScriptingEnabled()
Returnstrue
. Implementations wishing to disable JavaScript may override this method.
- Specified by:
- isScriptingEnabled in interface UserAgentContext
public void setCookie(java.net.URL url, String cookieSpec)
- Specified by:
- setCookie in interface UserAgentContext
public void warn(String message)
public void warn(String message, Throwable throwable)