Browser launcher sample overview

The browser launcher sample program demonstrates how to create a GUI task extension that is browser-based that can be launched from the IBM Director Console. Adding a console task extension is described in Creating console task extensions and is just one of the three aspects outlined in Creating IBM Director tasks. Configuring and launching a browser from within IBM Director is described in Launching a browser from IBM Director.

Detail of the browser launcher sample

IBM Director requires that the TWGTaskFrame class be extended in order to create a GUI task frame that can be launched from the IBM Director Console. IBM Director also provides the BrowserLauncher class to allow applications to launch a browser on their system based on information previously defined in a properties file. The browser launcher sample uses both classes to demonstrate how your organization can create its own browser-based GUI tasks.

This sample creates a GUI task that launches a previously specified browser using the information provided at the time of invocation. The sample code consists of Java source for the GUI task and extensions.

SampleBrowserGUI
Responds to the task launch request for displaying the interactive portion of the task to the user. It extends the TWGTaskFrame class to allow this task to be launched from IBM Director. Instead of launching a Java based GUI, we instead launch a browser-based GUI for the requested task.
SampleBrowserLaunchExtension
Extends the TWGExtension class. This class is the means by which the server recognizes that an additional task has been added. It indicates the property file the server registers for this task.
SampleBrowserResources
Defines a resource bundle of strings used by the utility.
SampleBrowserLaunch.properties
Defines the properties of the task. Among many other items, it specifies the GUI class, how it should appear on the main console, and the title.

Source files of the sample