SimpleContainer JAF-Compliant Container Example

SimpleContainer is a simple Java bean container that uses JAF. Supplying a file name to SimpleContainer starts the container, which creates a FileDataSource on the file and displays the MIME type of the file's content. SimpleContainer queries the available commands and creates a button for each operation that JAF defines on the file's content. When the user presses a button, SimpleContainer activates the corresponding bean.

When SimpleContainer runs, we supply it with the file name of an HTML file. At the top of the screen we display the file name and its MIME type. The activated bean is displayed in the center of the screen. In this case, we have activated the view command, which in turn activates ...

Get JavaBeans Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.