X hits on this document

PDF document

Bart Calder, Bill Shannon - page 15 / 21





15 / 21

Framework Integration Points

against the BDK BeanBox (and the JDK Appletviewer if they are subclassed from Applet).

7.8 Lifecycle

In general the JAF expects that its viewer bean life cycle semantics are the same as those for all Beans. In the case of Beans that implement the CommandObject interface we encourage application developers to not parent Beans subclassed from java.awt.Component to an AWT container until after they have called the javax.activation.CommandObject.setCommandContext method.

7.9 Command Verbs

The MailcapCommandMap implementation provides a mechanism that allows for an extensible set of command verbs. Applications using the JAF can query the system for commands available for a particular MIME type, and retrieve the Bean associated with that MIME type.

8.0 Framework Integration Points

This section presents several examples that clarify how JavaBeans™ developers can write Beans that are integrated with the JAF.

First, let’s review the pluggable components of the JavaBeans™ Activation Framework:

  • A mechanism that accesses target data where it is stored: DataSource

  • A mechanism to convert data objects to and from an external byte stream format: DataContentHandler

  • A mechanism to locate visual components that operate on data objects: CommandMap

  • The visual components that operate on data objects: JAF-aware Beans

As a JavaBeans™ developer, you may build visual Beans. You can also develop DataContentHandlers to supply data to those Beans. You might also need to develop a new DataSource or CommandMap class to access data and specify a data type.



Suppose you’re building a new Wombat Editor product, with its corresponding Wombat file format. You’ve built the Wombat Editor as one big Bean. Your WombatBean can do anything and everything that you might want to do with a Wombat. It can edit, it can print, it can view, it can save Wombats to files, and it can read Wombats in from files. You’ve defined a language-independent Wombat file format. You consider the Wombat data and file formats to be proprietary so you have no need to offer programmatic interfaces to Wombats beyond what your WombatBean supports.

15 of 21

Document info
Document views45
Page views45
Page last viewedMon Oct 24 21:07:59 UTC 2016