james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wim Jongman <wim.jong...@gmail.com>
Subject Re: mime4j and OSGi
Date Mon, 16 Mar 2009 15:34:52 GMT
On Mon, Mar 16, 2009 at 1:52 PM, Markus Wiederkehr <
markus.wiederkehr@gmail.com> wrote:

> On Mon, Mar 16, 2009 at 1:10 PM, Wim Jongman <wim.jongman@gmail.com>
> wrote:
> >>
> >> mime4j package already contains Bundle-/Import directives in the
> >> MANIFEST file. What else is needed?
> >>
> >> Stefano
> >>
> >
> > That depends on your needs/commitment to OSGi. For instance, I see that
> all
> > packages are exported where only API should be exported. I will study the
> > mime4j software and get back with recommendations of osgi content in the
> > manifest
>
>
>
> Maybe we should also emphasize the fact that these packages are not
> public by renaming them into o.a.j.mime4j.private.* or something like
> that.. Opinions?
>
> Markus
>

IMO that is a great design choice. *internal* would be the name to go with
instead of *private*. Although you could also say:

In OSGi, if you do not export a package, the programmer cannot access it.
However, this breaks the important aspect that programmers sometimes use
your classes in ways you did not envision (like Robert remarked). So you
also export packages that could be interesting and only hide the absolutely
non API packages.

However, if you want to use the jar outside of OSGi then there is no way of
hiding the absolute non-API packages and also no way of recognizing that the
package is off limits.

Not related to mime4j there should be a new naming convention providing for
three levels of package visibility.

   1. API,  dom.organization.soandso
   2. Not intended to be API dom.organization.internal.soandso
   3. Absolutely not API dom.organization.private.soandso


http://jakarta.apache-korea.org/cactus/participating/apis.html
http://wiki.eclipse.org/index.php/Naming_Conventions

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message