|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mozilla.webclient.BrowserControlFactory
public class BrowserControlFactory
The factory from which BrowserControl
instances are
created.
BrowserControlFactory uses Utilities.getImplFromServices(java.lang.String)
to find an implementation of WebclientFactory
. All of the public static methods in this class
simply call through to this implementation instance.
Method Summary | |
---|---|
static void |
appTerminate()
This method must be called when the application no longer needs to use the Webclient API for the rest of its lifetime. |
static void |
deleteBrowserControl(BrowserControl toDelete)
Delete a BrowserControl instance created with newBrowserControl() . |
protected static org.mozilla.webclient.WebclientFactory |
getInstance()
This method enables separating the webclient interface from its implementation via the Utilities.getImplFromServices(java.lang.String)
method. |
static BrowserControl |
newBrowserControl()
Create, initialize, and return a new BrowserControl
instance. |
static void |
setAppData(java.lang.String absolutePathToNativeBrowserBinDir)
Initialize the webclient API passing in the path to the browser binary, if necessary. |
static void |
setAppData(java.lang.String notUsed,
java.lang.String absolutePathToNativeBrowserBinDir)
Deprecated. Use setAppData(java.lang.String) instead. |
static void |
setProfile(java.lang.String profileName)
If called before the first BrowserControl has been
created, set the name of the profile to use for this browser
session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void setProfile(java.lang.String profileName)
If called before the first BrowserControl
has been
created, set the name of the profile to use for this browser
session. If the underlying browser does not support the concept
of profiles, this method is a no-op.
profileName
- the name of the profilepublic static void setAppData(java.lang.String absolutePathToNativeBrowserBinDir) throws java.io.FileNotFoundException, java.lang.ClassNotFoundException
Initialize the webclient API passing in the path to the browser binary, if necessary. This must be the first method called in the Webclient API, and it must be called once and only once.
If we are embedding a native browser, calling this method will cause the native libraries to be loaded into the JVM.
absolutePathToNativeBrowserBinDir
- if non-null
this must be the path to the bin dir of the native browser, including
the bin. ie: "D:\\Projects\\mozilla\\dist\\win32_d.obj\\bin". When
embedding a non-native browser, this may be null.
java.io.FileNotFoundException
java.lang.ClassNotFoundException
public static void setAppData(java.lang.String notUsed, java.lang.String absolutePathToNativeBrowserBinDir) throws java.io.FileNotFoundException, java.lang.ClassNotFoundException
setAppData(java.lang.String)
instead.
java.io.FileNotFoundException
java.lang.ClassNotFoundException
public static void appTerminate() throws java.lang.Exception
This method must be called when the application no longer needs to use the Webclient API for the rest of its lifetime.
java.lang.Exception
public static BrowserControl newBrowserControl() throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.IllegalStateException
Create, initialize, and return a new BrowserControl
instance. There is one BrowserControl
instance per
browser window. For example, in a tabbed browser application
with three browser tabs open, there will be three
BrowserControl
instances, one for each tab. Also,
any pop-up windows that are created during the course of a user
session also correspond to a BrowserControl
instance.
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.IllegalStateException
public static void deleteBrowserControl(BrowserControl toDelete)
Delete a BrowserControl
instance created with newBrowserControl()
. This method must be called when the user no
longer needs a BrowserControl
instance. For
example, when a browser tab closes. After returning from this
call, any extant references to that BrowserControl
are completely useless.
toDelete
- the BrowserControl
instance to
delete.protected static org.mozilla.webclient.WebclientFactory getInstance()
This method enables separating the webclient interface from
its implementation via the Utilities.getImplFromServices(java.lang.String)
method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |