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 the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.