Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is JAF? What is its purpose?

I am unable to understand the purpose of JAF (Java Activation Framework). Please explain it to me in simple terms, or point me towards information.

The Java Mail API is using JAF. It looks like the JAF is used to find the supporting data types of an object. But I couldn't understand.

Please teach me!

like image 257
Manoj Avatar asked Jun 18 '10 04:06

Manoj


People also ask

What is oracle JavaBeans Activation Framework?

The JavaBeans Activation Framework is implemented as a standard extension. Sun provides a royalty-free reference implementation of the JAF software, in binary form, that developers can use to develop JAF technology-enabled applications for any platform that supports version 1.4 or later of the Java 2 Standard Edition.

What is javax activation?

javax.activation. javax.xml.bind.attachment. This package is implemented by a MIME-based package processor that enables the interpretation and creation of optimized binary data within an MIME-based package format.


3 Answers

The JavaBeans Activation Framework is a library for abstracting the operating system specific bindings/mappings between file types and applications that deal with them. This can be based on MIME types and/or file extensions. It's really nothing more than that.

Open up Windows explorer and right click on a file. Various actions may be there (eg Open, Edit, Play). What actions are associated with the file is associated with the file extension on Windows. JAF is a portable version of that. It's mainly intended for desktop applications to be able to interact with whatever programs can be used with files on that computer.

like image 198
cletus Avatar answered Oct 02 '22 07:10

cletus


It's actually the JavaBeans Activation Framework and I think the docs explain it well:

With the JavaBeans Activation Framework standard extension, developers who use Java technology can take advantage of standard services to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and to instantiate the appropriate bean to perform said operation(s). For example, if a browser obtained a JPEG image, this framework would enable the browser to identify that stream of data as an JPEG image, and from that type, the browser could locate and instantiate an object that could manipulate, or view that image.

What parts of this paragraph are not clear to you?

like image 27
Alex Martelli Avatar answered Oct 02 '22 07:10

Alex Martelli


OT: there is similar functionality in JDK7 (although certainly cannot be considered as full replacement)

like image 33
Tomáš Záluský Avatar answered Oct 02 '22 08:10

Tomáš Záluský