On 3/9/11 2:38 PM, Max Rydahl Andersen wrote:
>>>> Haven't seen any good usecases for using the
native/remote api yet.
>>>
>>> I don't think the HTTP side will be too difficult to support but using
Remoting will also automatically give you all of the supported mechanisms for the Native
connections.
>>
>> More automatically than using the http auth api ?
>
> The difference between native and http is that with native you get a
> java API that does all of the protocol stuff for you. With the HTTP API,
> you will have to do generate and parse JSON. For the web console we also
> allow for encoded DMR messages over HTTP, although if you are using DMR,
> thats about 80% of the java API.
when using this java api i still need to use the untyped model correct ? i.e. string
based invocations or
is it more typed ?
Yes it's detyped, but it still has a fluid API that manages the
structure and will auto-convert types for you:
https://github.com/n1hility/jboss-dmr/blob/master/src/test/java/org/jboss...
Although, this could also be done with a good JSON library.
One last small benefit is that the java api will let you excute the
deployment operation with a stream on the same request. Http will
require a standard mime multipart request to do the upload.
--
Jason T. Greene
JBoss, a division of Red Hat