You not actually going to prohibit folks for using the old constructors are
you?
I'd say adding factories is a good thing, and you should encourage folks to
use the factories instead of the constructors, but please don't stop folks
from using the constructors directly.


On Wed, Jan 23, 2013 at 11:36 AM, Phil Harvey <p...@philharveyonline.com>wrote:

> As part of the Proton JNI work, I would like to remove all calls to
> proton-j implementation constructors from "client code".  I intend that
> factories will be used instead [1], thereby abstracting away whether the
> implementation is pure Java or proton-c-via-JNI.
>
> I'd like to check that folks are happy with me making this change, and to
> mention a couple of problems I've had.
>
> In this context, "client code" is anything outside the current
> sub-component, where our sub-components are Engine, Codec, Driver, Message
> and Messenger, plus each of the contrib modules, and of course third party
> code.
>
> To enforce this abstraction, I am planning to make the constructors of the
> affected classes package-private where possible.  I believe that, although
> third party projects might already be calling these constructors, it is
> acceptable for us to change its public API in this manner while Proton is
> such a young project.
>
> Please shout if you disagree with any of the above.
>
> Now, onto my problem.  I started off with the
> org.apache.qpid.proton.engine.
> impl package, and found that  o.a.q.p.hawtdispatch.impl.AmqpTransport calls
> various methods on ConnectionImpl and TransportImpl, so simply using a
> Connection and Transport will not work.  I don't know what to do about
> this, and would welcome people's opinions.
>
>
> Thanks
> Phil
>
> [1] for example, these work-in-progress classes:
>
> https://svn.apache.org/repos/asf/qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/ProtonFactoryLoader.java
>
> https://svn.apache.org/repos/asf/qpid/proton/branches/jni-binding/proton-j/proton-api/src/main/java/org/apache/qpid/proton/engine/EngineFactory.java
>
> https://svn.apache.org/repos/asf/qpid/proton/branches/jni-binding/proton-j/proton/src/main/java/org/apache/qpid/proton/engine/impl/EngineFactoryImpl.java
>
> https://svn.apache.org/repos/asf/qpid/proton/branches/jni-binding/proton-c/bindings/java/jni/src/main/java/org/apache/qpid/proton/engine/jni/JNIEngineFactory.java
>



-- 

**

*Hiram Chirino*

*Engineering | Red Hat, Inc.*

*hchir...@redhat.com <hchir...@redhat.com> | fusesource.com | redhat.com*

*skype: hiramchirino | twitter: @hiramchirino<http://twitter.com/hiramchirino>
*

*blog: Hiram Chirino's Bit Mojo <http://hiramchirino.com/blog/>*

Reply via email to