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 ?
It's more typed, but not very.
The essence of the core java API is [1], particularly the ModelNode
execute(ModelNode operation) throws CancellationException, IOException;
method.
The jar produced by this module and the small jboss-dmr lib [2] are the
only dependencies. ModelNode [3] is the only class in jboss-dmr a client
is likely to concern itself with. Working with the ModelNode API lets
you construct operations like I show at [4] (most of the content of that
wiki page was gotten by calling ModelNode.toString()). The server
generates replies a la [5].
- Brian
[1]
https://github.com/jbossas/jboss-as/blob/master/controller-client/src/mai...
[2]
https://github.com/jbossas/jboss-dmr/
[3]
https://github.com/jbossas/jboss-dmr/blob/master/src/main/java/org/jboss/...
[4]
http://community.jboss.org/docs/DOC-16336
[5]
http://community.jboss.org/docs/DOC-16354
/max
_______________________________________________
jboss-as7-dev mailing list
jboss-as7-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
--
Brian Stansberry
Principal Software Engineer
JBoss by Red Hat