This is an automated email from the ASF dual-hosted git repository. jamesbognar pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push: new a50f019 Javadocs a50f019 is described below commit a50f019ad55d972a53d4bffff190fc79929619d9 Author: JamesBognar <jamesbog...@apache.org> AuthorDate: Sat Aug 18 08:10:43 2018 -0400 Javadocs --- juneau-doc/src/main/javadoc/overview.html | 47 +++++++++++++++++++--- .../34.RemoteInterfaces/01.ClientSide.html | 11 ++++- .../09.juneau-rest-client/01.RemoteResources.html | 13 +++++- .../01.RemoteResources/01.RemoteResource.html | 20 ++++++++- .../01.RemoteResources/02.RemoteMethod.html | 6 +-- 5 files changed, 83 insertions(+), 14 deletions(-) diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html index 382f945..fb5b7e5 100644 --- a/juneau-doc/src/main/javadoc/overview.html +++ b/juneau-doc/src/main/javadoc/overview.html @@ -365,9 +365,9 @@ </ol> <li><p class='toc2 updated'><a class='doclink' href='#juneau-rest-client'>juneau-rest-client</a></p> <ol> - <li><p class='todo'><a class='doclink' href='#juneau-rest-client.RemoteResources'>Remote Resources</a></p> + <li><p class='new'><a class='doclink' href='#juneau-rest-client.RemoteResources'>Remote Resources</a></p> <ol> - <li><p class='todo'><a class='doclink' href='#juneau-rest-client.RemoteResources.RemoteResource'>@RemoteResource</a></p> + <li><p class='new'><a class='doclink' href='#juneau-rest-client.RemoteResources.RemoteResource'>@RemoteResource</a></p> <li><p class='todo'><a class='doclink' href='#juneau-rest-client.RemoteResources.RemoteMethod'>@RemoteMethod</a></p> <li><p class='todo'><a class='doclink' href='#juneau-rest-client.RemoteResources.MethodReturnTypes'>Method Return Types</a></p> <li><p class='new'><a class='doclink' href='#juneau-rest-client.RemoteResources.Body'>@Body</a></p> @@ -19263,9 +19263,16 @@ TODO(7.2.0) <h4 class='topic todo' onclick='toggle(this)'><a href='#juneau-rest-server.RemoteInterfaces.ClientSide' id='juneau-rest-server.RemoteInterfaces.ClientSide'>7.34.1 - Client Side</a></h4> <div class='topic'><!-- START: 7.34.1 - juneau-rest-server.RemoteInterfaces.ClientSide --> <p> - Remote Interface Proxies are retrieved through the existing {@link org.apache.juneau.rest.client.RestClient} - class. + Remote Interface proxies are instantiated using one of the following methods: </p> +<ul class='doctree'> + <li class='jc'>{@link org.apache.juneau.rest.client.RestClient} + <ul> + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteInterface(Class) getRemoteResource(Class)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteInterface(Class,Object) getRemoteResource(Class,Object)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteInterface(Class,Object,Serializer,Parser) getRemoteResource(Class,Object,Serializer,Parser)} + </ul> +</ul> <p> It may seem that the client-side code would need to be complex. <br>In reality, it builds upon existing serializing, parsing, and REST capabilities in Juneau resulting in very @@ -20128,7 +20135,7 @@ TODO(7.2.0) <!-- ==================================================================================================== --> -<h3 class='topic todo' onclick='toggle(this)'><a href='#juneau-rest-client.RemoteResources' id='juneau-rest-client.RemoteResources'>9.1 - Remote Resources</a></h3> +<h3 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-client.RemoteResources' id='juneau-rest-client.RemoteResources'>9.1 - Remote Resources</a></h3> <div class='topic'><!-- START: 9.1 - juneau-rest-client.RemoteResources --> <p> The <code>juneau-rest-client</code> library can also be used to define interface proxies against 3rd-party REST interfaces. @@ -20136,6 +20143,17 @@ TODO(7.2.0) virtually any REST interface. </p> <p> + Remote resources are instantiated using one of the following methods: +</p> +<ul class='doctree'> + <li class='jc'>{@link org.apache.juneau.rest.client.RestClient} + <ul> + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteResource(Class) getRemoteResource(Class)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteResource(Class,Object) getRemoteResource(Class,Object)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteResource(Class,Object,Serializer,Parser) getRemoteResource(Class,Object,Serializer,Parser)} + </ul> +</ul> +<p> Similar in concept to remote interfaces defined previously, but in this case we simply define our interface with special annotations that tell us how to convert input and output to HTTP headers, query parameters, form post parameters, or request/response bodies. @@ -20177,7 +20195,7 @@ TODO(7.2.0) <!-- ==================================================================================================== --> -<h4 class='topic todo' onclick='toggle(this)'><a href='#juneau-rest-client.RemoteResources.RemoteResource' id='juneau-rest-client.RemoteResources.RemoteResource'>9.1.1 - @RemoteResource</a></h4> +<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-client.RemoteResources.RemoteResource' id='juneau-rest-client.RemoteResources.RemoteResource'>9.1.1 - @RemoteResource</a></h4> <div class='topic'><!-- START: 9.1.1 - juneau-rest-client.RemoteResources.RemoteResource --> <p> The {@link org.apache.juneau.remote.RemoteResource @RemoteResource} annotation is used on your interface class @@ -20190,6 +20208,11 @@ TODO(7.2.0) </ul> </ul> <p> + The <ja>@RemoteResource</ja> annotation is optional, but often included for code readability. +</p> + +<h5 class='topic w800'>@RemoteResource(path)</h5> +<p> The {@link org.apache.juneau.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the HTTP path of the REST service. </p> @@ -20216,6 +20239,18 @@ TODO(7.2.0) RestClient client = RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000"</js>).build(); PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>); </p> +<p> + When no path is specified, the root-url defined on the <code>RestClient</code> is used. +</p> +<h5 class='figure'>Example:</h5> +<p class='bpcode w800'> + <ja>@RemoteResource</ja> + <jk>public interface</jk> PetStore {...} +</p> +<p class='bpcode w800'> + RestClient client = RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000/petstore"</js>).build(); + PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>); +</p> </div><!-- END: 9.1.1 - juneau-rest-client.RemoteResources.RemoteResource --> <!-- ==================================================================================================== --> diff --git a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/01.ClientSide.html b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/01.ClientSide.html index 561731d..cea050f 100644 --- a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/01.ClientSide.html +++ b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/01.ClientSide.html @@ -16,9 +16,16 @@ {todo} Client Side <p> - Remote Interface Proxies are retrieved through the existing {@link org.apache.juneau.rest.client.RestClient} - class. + Remote Interface proxies are instantiated using one of the following methods: </p> +<ul class='doctree'> + <li class='jc'>{@link org.apache.juneau.rest.client.RestClient} + <ul> + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteInterface(Class) getRemoteResource(Class)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteInterface(Class,Object) getRemoteResource(Class,Object)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteInterface(Class,Object,Serializer,Parser) getRemoteResource(Class,Object,Serializer,Parser)} + </ul> +</ul> <p> It may seem that the client-side code would need to be complex. <br>In reality, it builds upon existing serializing, parsing, and REST capabilities in Juneau resulting in very diff --git a/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources.html b/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources.html index cf5996a..3a89cfd 100644 --- a/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources.html +++ b/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources.html @@ -13,7 +13,7 @@ ***************************************************************************************************************************/ --> -{todo} Remote Resources +{new} Remote Resources <p> The <code>juneau-rest-client</code> library can also be used to define interface proxies against 3rd-party REST interfaces. @@ -21,6 +21,17 @@ virtually any REST interface. </p> <p> + Remote resources are instantiated using one of the following methods: +</p> +<ul class='doctree'> + <li class='jc'>{@link org.apache.juneau.rest.client.RestClient} + <ul> + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteResource(Class) getRemoteResource(Class)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteResource(Class,Object) getRemoteResource(Class,Object)} + <li class='jm'>{@link org.apache.juneau.rest.client.RestClient#getRemoteResource(Class,Object,Serializer,Parser) getRemoteResource(Class,Object,Serializer,Parser)} + </ul> +</ul> +<p> Similar in concept to remote interfaces defined previously, but in this case we simply define our interface with special annotations that tell us how to convert input and output to HTTP headers, query parameters, form post parameters, or request/response bodies. diff --git a/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/01.RemoteResource.html b/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/01.RemoteResource.html index aa58c02..fb31d74 100644 --- a/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/01.RemoteResource.html +++ b/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/01.RemoteResource.html @@ -13,7 +13,7 @@ ***************************************************************************************************************************/ --> -{todo} @RemoteResource +{new} @RemoteResource <p> The {@link org.apache.juneau.remote.RemoteResource @RemoteResource} annotation is used on your interface class @@ -26,6 +26,11 @@ </ul> </ul> <p> + The <ja>@RemoteResource</ja> annotation is optional, but often included for code readability. +</p> + +<h5 class='topic w800'>@RemoteResource(path)</h5> +<p> The {@link org.apache.juneau.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the HTTP path of the REST service. </p> @@ -52,3 +57,16 @@ RestClient client = RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000"</js>).build(); PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>); </p> +<p> + When no path is specified, the root-url defined on the <code>RestClient</code> is used. +</p> +<h5 class='figure'>Example:</h5> +<p class='bpcode w800'> + <ja>@RemoteResource</ja> + <jk>public interface</jk> PetStore {...} +</p> +<p class='bpcode w800'> + RestClient client = RestClient.<jsm>create</jsm>().json().rootUrl(<js>"http://localhost:10000/petstore"</js>).build(); + PetStore p = client.getRemoteResource(PetStore.<jk>class</jk>); +</p> + diff --git a/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/02.RemoteMethod.html b/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/02.RemoteMethod.html index c0ce225..25a995c 100644 --- a/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/02.RemoteMethod.html +++ b/juneau-doc/src/main/resources/Topics/09.juneau-rest-client/01.RemoteResources/02.RemoteMethod.html @@ -13,11 +13,11 @@ ***************************************************************************************************************************/ --> -{todo} @RemoteMethod +{new} @RemoteMethod <p> The {@link org.apache.juneau.remote.RemoteMethod @RemoteMethod} annotation is applied to methods - of {@link org.apache.juneau.remote.RemoteResource}-annotated interfaces to identify REST endpoint calls. + of {@link org.apache.juneau.remote.RemoteResource}-annotated interfaces to identify REST endpoints. </p> <ul class='doctree'> <li class='ja'>{@link org.apache.juneau.remote.RemoteMethod} @@ -42,8 +42,6 @@ </p> <p> The method names used in 3rd-party proxies can be anything. -</p> -<p> However, the method names can also be used to infer the HTTP method and path if not explicitly specified via the {@link org.apache.juneau.remote.RemoteMethod#httpMethod() @RemoteMethod(httpMethod)} and {@link org.apache.juneau.remote.RemoteMethod#path() @RemoteMethod(path)} annotations.