On Thu, Dec 6, 2012 at 3:36 PM, Rob Vesse <[email protected]> wrote:
> On 12/6/12 12:31 PM, "Andy Seaborne" <[email protected]> wrote:
>
>
>>On 06/12/12 20:03, Martynas Jusevičius wrote:
>>> If Jena would be consistent in its HTTP handling and use an
>>> established API such as JAX-RS, things could be much easier.
>>
>>Could you explain that a bit more so we can see what can be improved (or
>>submit a patch)?  Do you have specific suggestions?
>>
>>JAX-RS is an API for mapping Java with annotations to web resources.
>>
>>HTTP is a protocol.
>
> I agree, I don't see how JAX-RS is relevant here.
>
> However perhaps we should be ensuring that everywhere that does anything
> HTTP uses the Apache HttpClient as a point of standardization and provide
> ways to better expose that up to users to add custom configuration?
>
> As Andy says patches are welcome in this area.  I know I've done some work
> in the past to improve configurability on the remote query side but it
> still uses the java.net APIs rather than HttpClient as the remote update
> stuff does.

HttpClient is nice for what it does, but unfortunately it hides some
of the capabilities of the java.net APIs.  In particular for
jena-client, I could not use it because I needed direct access to the
OutputStream for streaming capabilities [1].  The closest you can get
in HttpClient is InputStreamEntity, which would require an inversion
of control and thus a separate thread in some situations

-Stephen

[1] 
http://svn.apache.org/repos/asf/jena/Experimental/jena-client/src/main/java/org/apache/jena/client/http/HttpUpdater.java

Reply via email to