Java Activation Framework

The Java Activation Framework (JAF) is a standard extension that can be used by beans that work with many external data types, such as media retrieved from files and streams. It is essentially a generalized content/protocol handler mechanism for JavaBeans. The JAF is an extensible set of classes that wrap arbitrary, raw data sources to provide access to their data as streams or objects, identify the MIME type of the data, and enumerate a registered set of "commands" for operating on the data. The JAF provides two primary interfaces: DataSource and DataHandler. The DataSource acts like the protocol handlers we discussed in . It wraps the data source and determines a MIME type for the data stream. The DataHandler acts like a content handler, except it provides a great deal more than access to the data. A DataHandler is constructed to wrap a DataSource and interpret the data in different forms. It also provides a list of command operations that can be used to access the data. DataHandler also implements the java.awt.datatransfer.Transferable interface, allowing data to be passed among app components in a well-defined way. The JAF hasn't been used much outside the JavaMail API, but you can find out more about JAF from Sun at http://java.oracle.com/beans/glasgow/jaf.html.

Java ScreenShot
Comments