DataObjectFactory is responsible for translating a MimeMessage data structure into a tree of DataObjects. It is used in a number of places. Right now, the use of this class is hardcoded in all those places. However, the desired mapping of a MimeMessage to a DataObject tree may be application-dependent. A possible improvement would be to turn DataObjectFactory into an API with associated registry, so that applications can introduce their own implementation.