KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > lobobrowser > html > UserAgentContext


1 package org.lobobrowser.html;
2
3 /**
4  * The user agent context.
5  */

6 public interface UserAgentContext {
7 // /**
8
// * Informs context about a warning.
9
// */
10
// public void warn(String message, Throwable throwable);
11
//
12
// /**
13
// * Informs context about an error.
14
// */
15
// public void error(String message, Throwable throwable);
16
//
17
// /**
18
// * Informs context about a warning.
19
// */
20
// public void warn(String message);
21
//
22
// /**
23
// * Informs context about an error.
24
// */
25
// public void error(String message);
26
//
27
/**
28      * Creates an instance of {@link org.lobobrowser.html.HttpRequest} which
29      * can be used by the renderer to load images and implement the
30      * Javascript XMLHttpRequest class.
31      */

32     public HttpRequest createHttpRequest();
33
34     /**
35      * Gets browser "code" name.
36      */

37     public String JavaDoc getAppCodeName();
38
39     /**
40      * Gets browser application name.
41      */

42     public String JavaDoc getAppName();
43
44     /**
45      * Gets browser application version.
46      */

47     public String JavaDoc getAppVersion();
48
49     /**
50      * Gets browser application minor version.
51      */

52     public String JavaDoc getAppMinorVersion();
53
54     /**
55      * Gets browser language code. See <a HREF="http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes">ISO 639-1 codes</a>.
56      */

57     public String JavaDoc getBrowserLanguage();
58
59     /**
60      * Returns a boolean value indicating whether cookies are
61      * enabled in the user agent.
62      */

63     public boolean isCookieEnabled();
64     
65     /**
66      * Returns a boolean value indicating whether scripting
67      * is enabled in the user agent.
68      */

69     public boolean isScriptingEnabled();
70     
71     /**
72      * Gets the name of the user's operating system.
73      */

74     public String JavaDoc getPlatform();
75
76     /**
77      * Should return the string used in
78      * the User-Agent header.
79      */

80     public String JavaDoc getUserAgent();
81     
82     /**
83      * Method used to implement document.cookie property.
84      */

85     public String JavaDoc getCookie(java.net.URL JavaDoc url);
86
87     /**
88      * Method used to implement document.cookie property.
89      * @param cookieSpec Specification of cookies, as they
90      * would appear in the Set-Cookie
91      * header value of HTTP.
92      */

93     public void setCookie(java.net.URL JavaDoc url, String JavaDoc cookieSpec);
94     
95     /**
96      * Gets the security policy for scripting. Return <code>null</code>
97      * if JavaScript code is trusted.
98      */

99     public java.security.Policy JavaDoc getSecurityPolicy();
100     
101     /**
102      * Gets the scripting optimization level, which is a value
103      * equivalent to Rhino's optimization level.
104      */

105     public int getScriptingOptimizationLevel();
106 }
107
Popular Tags