You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2018/08/18 13:22:32 UTC
[juneau] branch master updated: Further cleanup of Remoteable APIs
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 993915f Further cleanup of Remoteable APIs
993915f is described below
commit 993915f5175e07852fdde6c6fabcabaeb94e2043
Author: JamesBognar <ja...@apache.org>
AuthorDate: Sat Aug 18 09:22:18 2018 -0400
Further cleanup of Remoteable APIs
---
.../org/apache/juneau/remote/RemoteExpose.java | 42 ---
.../org/apache/juneau/remote/RemoteInterface.java | 22 +-
.../apache/juneau/remote/RemoteInterfaceMeta.java | 41 +--
...esourceMeta.java => RemoteInterfaceMethod.java} | 64 ++---
juneau-doc/src/main/javadoc/overview.html | 34 ++-
.../src/main/resources/ReleaseNotes/7.2.0.html | 2 +-
.../34.RemoteInterfaces/04.RemoteMethod.html | 2 +-
.../01.RemoteResources/01.RemoteResource.html | 8 +-
.../01.RemoteResources/02.RemoteMethod.html | 16 +-
.../rest/test/client/RequestBeanProxyTest.java | 74 ++---
.../rest/test/client/ThirdPartyProxyTest.java | 320 ++++++++++-----------
.../org/apache/juneau/rest/client/RestClient.java | 22 +-
.../client}/remote/RemoteMetadataException.java | 4 +-
.../juneau/rest/client}/remote/RemoteMethod.java | 58 ++--
.../rest/client}/remote/RemoteMethodArg.java | 4 +-
.../rest/client}/remote/RemoteMethodBeanArg.java | 4 +-
.../rest/client}/remote/RemoteMethodMeta.java | 8 +-
.../rest/client}/remote/RemoteMethodReturn.java | 4 +-
.../juneau/rest/client}/remote/RemoteResource.java | 20 +-
.../rest/client}/remote/RemoteResourceMeta.java | 4 +-
.../juneau/rest/client}/remote/RemoteReturn.java | 2 +-
.../java/org/apache/juneau/rest/RestContext.java | 2 +-
.../java/org/apache/juneau/rest/RestRequest.java | 1 -
.../juneau/rest/remote/RemoteInterfaceServlet.java | 6 +-
24 files changed, 340 insertions(+), 424 deletions(-)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteExpose.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteExpose.java
deleted file mode 100644
index abb2696..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteExpose.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.remote;
-
-/**
- * Specifies possible values for the {@link RemoteInterface#expose()} annotation.
- */
-public enum RemoteExpose {
-
- /**
- * Expose all methods defined on the interface or class.
- */
- ALL,
-
- /**
- * Expose only methods declared on the immediate interface/class.
- * Methods on parent interfaces/classes are ignored.
- * <p>
- * This is the default value.
- */
- DECLARED,
-
- /**
- * Only methods annotated with {@link RemoteMethod} are exposed.
- */
- ANNOTATED,
-
- /**
- * A placeholder for no value.
- */
- DEFAULT;
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
index debf9c5..7a9beaf 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterface.java
@@ -18,12 +18,11 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
- * Identifies a remote proxy interface against a REST interface.
+ * Identifies a remote proxy REST interface.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
* <li class='link'>{@doc juneau-rest-server.RemoteInterfaces}
- * <li class='link'>{@doc juneau-rest-client.RemoteResources}
* </ul>
*/
@Documented
@@ -33,20 +32,15 @@ import java.lang.annotation.*;
public @interface RemoteInterface {
/**
- * The absolute or relative path of the REST service.
+ * REST service path.
*
* <p>
- * When a relative path is specified, it's relative to the root-url defined on the <code>RestClient</code> used
- * to instantiate the interface.
- *
- * <p>
- * When no path is specified, the path is assumed to be the class name (e.g.
- * <js>"http://localhost/root-url/org.foo.MyInterface"</js>)
+ * The possible values are:
+ * <ul class='spaced-list'>
+ * <li>An absolute URL.
+ * <li>A relative URL interpreted as relative to the root URL defined on the <code>RestClient</code>
+ * <li>No path interpreted as the class name (e.g. <js>"http://localhost/root-url/org.foo.MyInterface"</js>)
+ * </ul>
*/
String path() default "";
-
- /**
- * Identifies which methods on the interface should be exposed through the proxy.
- */
- RemoteExpose expose() default RemoteExpose.DEFAULT;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
index 328fafe..928c99d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMeta.java
@@ -15,28 +15,25 @@ package org.apache.juneau.remote;
import static org.apache.juneau.internal.ClassUtils.*;
import static org.apache.juneau.internal.CollectionUtils.*;
import static org.apache.juneau.internal.StringUtils.*;
-import static org.apache.juneau.remote.RemoteExpose.*;
import java.lang.reflect.*;
import java.util.*;
/**
- * Contains the meta-data about a remoteable interface.
+ * Contains the meta-data about a remote proxy REST interface.
*
* <p>
- * Captures the information in {@link RemoteResource @RemoteInterface} and {@link RemoteMethod @RemoteMethod} annotations for
- * caching and reuse.
+ * Captures the information in {@link RemoteInterface @RemoteInterface} annotations for caching and reuse.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
* <li class='link'>{@doc juneau-rest-server.RemoteInterfaces}
- * <li class='link'>{@doc juneau-rest-client.RemoteResources}
* </ul>
*/
public class RemoteInterfaceMeta {
- private final Map<Method,RemoteMethodMeta> methods;
- private final Map<String,RemoteMethodMeta> methodsByPath;
+ private final Map<Method,RemoteInterfaceMethod> methods;
+ private final Map<String,RemoteInterfaceMethod> methodsByPath;
private final String path;
private final Class<?> c;
@@ -44,7 +41,7 @@ public class RemoteInterfaceMeta {
* Constructor.
*
* @param c
- * The interface class annotated with a {@link RemoteInterface @RemoteInterface} or {@link RemoteResource @RemoteResource} annotation.
+ * The interface class annotated with a {@link RemoteInterface @RemoteInterface} annotation.
* <br>Note that the annotations are optional.
* @param uri
* The absolute URL of the remote REST interface that implements this proxy interface.
@@ -52,27 +49,19 @@ public class RemoteInterfaceMeta {
*/
public RemoteInterfaceMeta(Class<?> c, String uri) {
this.c = c;
- RemoteExpose expose = DECLARED;
String path = "";
List<RemoteInterface> rr = getAnnotationsParentFirst(RemoteInterface.class, c);
- for (RemoteInterface r : rr) {
- if (r.expose() != DEFAULT)
- expose = r.expose();
+ for (RemoteInterface r : rr)
if (! r.path().isEmpty())
path = trimSlashes(r.path());
- }
- Map<Method,RemoteMethodMeta> methods = new LinkedHashMap<>();
- for (Method m : expose == DECLARED ? c.getDeclaredMethods() : c.getMethods()) {
- if (isPublic(m)) {
- RemoteMethod rm = c.getAnnotation(RemoteMethod.class);
- if (rm != null || expose != ANNOTATED)
- methods.put(m, new RemoteMethodMeta(uri, m, true, "POST"));
- }
- }
+ Map<Method,RemoteInterfaceMethod> methods = new LinkedHashMap<>();
+ for (Method m : c.getMethods())
+ if (isPublic(m))
+ methods.put(m, new RemoteInterfaceMethod(uri, m));
- Map<String,RemoteMethodMeta> methodsByPath = new LinkedHashMap<>();
- for (RemoteMethodMeta rmm : methods.values())
+ Map<String,RemoteInterfaceMethod> methodsByPath = new LinkedHashMap<>();
+ for (RemoteInterfaceMethod rmm : methods.values())
methodsByPath.put(rmm.getPath(), rmm);
this.methods = unmodifiableMap(methods);
@@ -88,7 +77,7 @@ public class RemoteInterfaceMeta {
* <br>The keys never have leading slashes.
* <br>The map is never <jk>null</jk>.
*/
- public Map<String,RemoteMethodMeta> getMethodsByPath() {
+ public Map<String,RemoteInterfaceMethod> getMethodsByPath() {
return methodsByPath;
}
@@ -98,7 +87,7 @@ public class RemoteInterfaceMeta {
* @param m The method to look up.
* @return Metadata about the method or <jk>null</jk> if no metadata was found.
*/
- public RemoteMethodMeta getMethodMeta(Method m) {
+ public RemoteInterfaceMethod getMethodMeta(Method m) {
return methods.get(m);
}
@@ -108,7 +97,7 @@ public class RemoteInterfaceMeta {
* @param p The HTTP path to look for.
* @return Metadata about the method or <jk>null</jk> if no metadata was found.
*/
- public RemoteMethodMeta getMethodMetaByPath(String p) {
+ public RemoteInterfaceMethod getMethodMetaByPath(String p) {
return methodsByPath.get(p);
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResourceMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
similarity index 55%
copy from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResourceMeta.java
copy to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
index 2153e7a..4f432e5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResourceMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteInterfaceMethod.java
@@ -12,71 +12,69 @@
// ***************************************************************************************************************************
package org.apache.juneau.remote;
-import static org.apache.juneau.internal.ClassUtils.*;
-import static org.apache.juneau.internal.CollectionUtils.*;
import static org.apache.juneau.internal.StringUtils.*;
import java.lang.reflect.*;
-import java.util.*;
+
+import org.apache.juneau.internal.*;
/**
- * Contains the meta-data about a remote resource.
+ * Contains the meta-data about a Java method on a remote class.
*
* <p>
- * Captures the information in {@link RemoteResource @RemoteResource} and {@link RemoteMethod @RemoteMethod} annotations for
- * caching and reuse.
+ * Captures the information in {@link RemoteInterface @RemoteInterface} annotations for caching and reuse.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
- * <li class='link'>{@doc juneau-rest-client.RemoteResources}
+ * <li class='link'>{@doc juneau-rest-server.RemoteInterfaces}
* </ul>
*/
-public class RemoteResourceMeta {
+public class RemoteInterfaceMethod {
- private final Map<Method,RemoteMethodMeta> methods;
- private final String path;
+ private final String url, path;
+ private final Method method;
/**
* Constructor.
*
- * @param c The interface class annotated with a {@link RemoteResource @RemoteResource} annotation (optional).
- * @param restUrl The absolute URL of the remote REST interface that implements this proxy interface.
+ * @param restUrl The absolute URL of the REST interface backing the interface proxy.
+ * @param m The Java method.
*/
- public RemoteResourceMeta(Class<?> c, String restUrl) {
- String path = "";
-
- for (RemoteResource r : getAnnotationsParentFirst(RemoteResource.class, c))
- if (! r.path().isEmpty())
- path = trimSlashes(r.path());
-
- Map<Method,RemoteMethodMeta> methods = new LinkedHashMap<>();
- for (Method m : c.getMethods())
- if (isPublic(m))
- methods.put(m, new RemoteMethodMeta(restUrl, m, false, "GET"));
-
- this.methods = unmodifiableMap(methods);
- this.path = path;
+ public RemoteInterfaceMethod(final String restUrl, Method m) {
+ this.method = m;
+ this.path = m.getName() + '/' + HttpUtils.getMethodArgsSignature(m, true);
+ this.url = trimSlashes(restUrl) + '/' + urlEncode(path);
}
/**
- * Returns the metadata about the specified method on this resource proxy.
+ * Returns the absolute URL of the REST interface invoked by this Java method.
*
- * @param m The method to look up.
- * @return Metadata about the method or <jk>null</jk> if no metadata was found.
+ * @return The absolute URL of the REST interface, never <jk>null</jk>.
*/
- public RemoteMethodMeta getMethodMeta(Method m) {
- return methods.get(m);
+ public String getUrl() {
+ return url;
}
/**
- * Returns the HTTP path of this interface.
+ * Returns the HTTP path of this method.
*
* @return
- * The HTTP path of this interface.
+ * The HTTP path of this method relative to the parent interface.
* <br>Never <jk>null</jk>.
* <br>Never has leading or trailing slashes.
*/
public String getPath() {
return path;
}
+
+ /**
+ * Returns the underlying Java method that this metadata is about.
+ *
+ * @return
+ * The underlying Java method that this metadata is about.
+ * <br>Never <jk>null</jk>.
+ */
+ public Method getJavaMethod() {
+ return method;
+ }
}
diff --git a/juneau-doc/src/main/javadoc/overview.html b/juneau-doc/src/main/javadoc/overview.html
index fb5b7e5..da06673 100644
--- a/juneau-doc/src/main/javadoc/overview.html
+++ b/juneau-doc/src/main/javadoc/overview.html
@@ -368,7 +368,7 @@
<li><p class='new'><a class='doclink' href='#juneau-rest-client.RemoteResources'>Remote Resources</a></p>
<ol>
<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='new'><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>
<li><p class='new'><a class='doclink' href='#juneau-rest-client.RemoteResources.FormData'>@FormData</a></p>
@@ -19506,7 +19506,7 @@ TODO(7.2.0)
<p>
What if you want fine-tuned control over which methods are exposed in an interface instead of just all public
methods?
- <br>For this, the {@link org.apache.juneau.remote.RemoteMethod @RemoteMethod} annotation is provided.
+ <br>For this, the {@link org.apache.juneau.rest.client.remote.RemoteMethod @RemoteMethod} annotation is provided.
<br>It can be applied to individual interface methods to only expose those methods through the remote interface servlet.
</p>
<p>
@@ -20198,13 +20198,13 @@ TODO(7.2.0)
<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
+ The {@link org.apache.juneau.rest.client.remote.RemoteResource @RemoteResource} annotation is used on your interface class
to identify it as a REST proxy interface.
</p>
<ul class='doctree'>
- <li class='ja'>{@link org.apache.juneau.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteResource}
<ul>
- <li class='jf'>{@link org.apache.juneau.remote.RemoteResource#path path}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteResource#path path}
</ul>
</ul>
<p>
@@ -20213,7 +20213,7 @@ TODO(7.2.0)
<h5 class='topic w800'>@RemoteResource(path)</h5>
<p>
- The {@link org.apache.juneau.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the
+ The {@link org.apache.juneau.rest.client.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the
HTTP path of the REST service.
</p>
<p>
@@ -20255,18 +20255,18 @@ TODO(7.2.0)
<!-- ==================================================================================================== -->
-<h4 class='topic todo' onclick='toggle(this)'><a href='#juneau-rest-client.RemoteResources.RemoteMethod' id='juneau-rest-client.RemoteResources.RemoteMethod'>9.1.2 - @RemoteMethod</a></h4>
+<h4 class='topic new' onclick='toggle(this)'><a href='#juneau-rest-client.RemoteResources.RemoteMethod' id='juneau-rest-client.RemoteResources.RemoteMethod'>9.1.2 - @RemoteMethod</a></h4>
<div class='topic'><!-- START: 9.1.2 - juneau-rest-client.RemoteResources.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.
+ The {@link org.apache.juneau.rest.client.remote.RemoteMethod @RemoteMethod} annotation is applied to methods
+ of {@link org.apache.juneau.rest.client.remote.RemoteResource}-annotated interfaces to identify REST endpoints.
</p>
<ul class='doctree'>
- <li class='ja'>{@link org.apache.juneau.remote.RemoteMethod}
+ <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteMethod}
<ul>
- <li class='jf'>{@link org.apache.juneau.remote.RemoteMethod#httpMethod httpMethod}
- <li class='jf'>{@link org.apache.juneau.remote.RemoteMethod#path path}
- <li class='jf'>{@link org.apache.juneau.remote.RemoteMethod#returns returns}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#method method}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#path path}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#returns returns}
</ul>
</ul>
<p>
@@ -20284,11 +20284,9 @@ TODO(7.2.0)
</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.
+ via the {@link org.apache.juneau.rest.client.remote.RemoteMethod#method() @RemoteMethod(method)} and
+ {@link org.apache.juneau.rest.client.remote.RemoteMethod#path() @RemoteMethod(path)} annotations.
</p>
<p>
For example, the <code>getPet</code> method below defaults to <code>GET /pet</code>:
@@ -31597,7 +31595,7 @@ TODO(7.2.0)
- Used for remote proxy interfaces served up through
{@link org.apache.juneau.rest.remote.RemoteInterfaceServlet} or REST <js>"PROXY"</js> methods.
<br>Defaults to <js>"POST"</js> with method signatures as paths.
- <li class='ja'>{@link org.apache.juneau.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteResource}
- Used for 3rd-party REST interfaces.
<br>Defaults to <js>"GET"</js> with standardized naming conventions for paths.
</ul>
diff --git a/juneau-doc/src/main/resources/ReleaseNotes/7.2.0.html b/juneau-doc/src/main/resources/ReleaseNotes/7.2.0.html
index 9ea3b0c..a2f606e 100644
--- a/juneau-doc/src/main/resources/ReleaseNotes/7.2.0.html
+++ b/juneau-doc/src/main/resources/ReleaseNotes/7.2.0.html
@@ -54,7 +54,7 @@
- Used for remote proxy interfaces served up through
{@link org.apache.juneau.rest.remote.RemoteInterfaceServlet} or REST <js>"PROXY"</js> methods.
<br>Defaults to <js>"POST"</js> with method signatures as paths.
- <li class='ja'>{@link org.apache.juneau.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteResource}
- Used for 3rd-party REST interfaces.
<br>Defaults to <js>"GET"</js> with standardized naming conventions for paths.
</ul>
diff --git a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/04.RemoteMethod.html b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/04.RemoteMethod.html
index 0b33027..1085995 100644
--- a/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/04.RemoteMethod.html
+++ b/juneau-doc/src/main/resources/Topics/07.juneau-rest-server/34.RemoteInterfaces/04.RemoteMethod.html
@@ -18,7 +18,7 @@
<p>
What if you want fine-tuned control over which methods are exposed in an interface instead of just all public
methods?
- <br>For this, the {@link org.apache.juneau.remote.RemoteMethod @RemoteMethod} annotation is provided.
+ <br>For this, the {@link org.apache.juneau.rest.client.remote.RemoteMethod @RemoteMethod} annotation is provided.
<br>It can be applied to individual interface methods to only expose those methods through the remote interface servlet.
</p>
<p>
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 fb31d74..d8f7071 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
@@ -16,13 +16,13 @@
{new} @RemoteResource
<p>
- The {@link org.apache.juneau.remote.RemoteResource @RemoteResource} annotation is used on your interface class
+ The {@link org.apache.juneau.rest.client.remote.RemoteResource @RemoteResource} annotation is used on your interface class
to identify it as a REST proxy interface.
</p>
<ul class='doctree'>
- <li class='ja'>{@link org.apache.juneau.remote.RemoteResource}
+ <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteResource}
<ul>
- <li class='jf'>{@link org.apache.juneau.remote.RemoteResource#path path}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteResource#path path}
</ul>
</ul>
<p>
@@ -31,7 +31,7 @@
<h5 class='topic w800'>@RemoteResource(path)</h5>
<p>
- The {@link org.apache.juneau.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the
+ The {@link org.apache.juneau.rest.client.remote.RemoteResource#path @RemoteResource(path)} annotation is used to define the
HTTP path of the REST service.
</p>
<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 25a995c..7245275 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
@@ -16,15 +16,15 @@
{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 endpoints.
+ The {@link org.apache.juneau.rest.client.remote.RemoteMethod @RemoteMethod} annotation is applied to methods
+ of {@link org.apache.juneau.rest.client.remote.RemoteResource}-annotated interfaces to identify REST endpoints.
</p>
<ul class='doctree'>
- <li class='ja'>{@link org.apache.juneau.remote.RemoteMethod}
+ <li class='ja'>{@link org.apache.juneau.rest.client.remote.RemoteMethod}
<ul>
- <li class='jf'>{@link org.apache.juneau.remote.RemoteMethod#httpMethod httpMethod}
- <li class='jf'>{@link org.apache.juneau.remote.RemoteMethod#path path}
- <li class='jf'>{@link org.apache.juneau.remote.RemoteMethod#returns returns}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#method method}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#path path}
+ <li class='jf'>{@link org.apache.juneau.rest.client.remote.RemoteMethod#returns returns}
</ul>
</ul>
<p>
@@ -43,8 +43,8 @@
<p>
The method names used in 3rd-party proxies can be anything.
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.
+ via the {@link org.apache.juneau.rest.client.remote.RemoteMethod#method() @RemoteMethod(method)} and
+ {@link org.apache.juneau.rest.client.remote.RemoteMethod#path() @RemoteMethod(path)} annotations.
</p>
<p>
For example, the <code>getPet</code> method below defaults to <code>GET /pet</code>:
diff --git a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java
index c92d440..e59972e 100644
--- a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java
+++ b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/RequestBeanProxyTest.java
@@ -22,10 +22,10 @@ import java.util.*;
import org.apache.juneau.http.annotation.*;
import org.apache.juneau.httppart.*;
-import org.apache.juneau.remote.*;
import org.apache.juneau.rest.*;
import org.apache.juneau.rest.annotation.*;
import org.apache.juneau.rest.client.*;
+import org.apache.juneau.rest.client.remote.*;
import org.apache.juneau.rest.mock.*;
import org.apache.juneau.serializer.*;
import org.apache.juneau.urlencoding.*;
@@ -56,10 +56,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface A01_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String normal(@Request A01_BeanImpl rb);
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String serialized(@Request(partSerializer=XSerializer.class) A01_BeanImpl rb);
}
@@ -106,10 +106,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface A02_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String normal(@Request A02_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String serialized(@Request(partSerializer=XSerializer.class) A02_Bean rb);
}
@@ -158,10 +158,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface A03_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String normal(@Request A03_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String serialized(@Request(partSerializer=XSerializer.class) A03_Bean rb);
}
@@ -209,7 +209,7 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface A04_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String normal(@Request A04_Bean rb);
}
@@ -234,7 +234,7 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface A05_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String normal(@Request A05_Bean rb);
}
@@ -260,10 +260,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface A06_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String normal(@Request A06_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoQuery")
+ @RemoteMethod(method="GET", path="/echoQuery")
String serialized(@Request(partSerializer=XSerializer.class) A06_Bean rb);
}
@@ -345,10 +345,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface C01_RemoteResource {
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String normal(@Request C01_Bean rb);
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String serialized(@Request(partSerializer=XSerializer.class) C01_Bean rb);
}
@@ -409,10 +409,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface C02_RemoteResource {
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String normal(@Request C02_Bean rb);
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String serialized(@Request(partSerializer=XSerializer.class) C02_Bean rb);
}
@@ -461,10 +461,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface C03_RemoteResource {
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String normal(@Request C03_Bean rb);
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String serialized(@Request(partSerializer=XSerializer.class) C03_Bean rb);
}
@@ -512,7 +512,7 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface C04_RemoteResource {
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String normal(@Request C04_Bean rb);
}
@@ -537,7 +537,7 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface C05_RemoteResource {
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String normal(@Request C05_Bean rb);
}
@@ -563,10 +563,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface C06_RemoteResource {
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String normal(@Request C06_Bean rb);
- @RemoteMethod(httpMethod="POST", path="/echoFormData")
+ @RemoteMethod(method="POST", path="/echoFormData")
String serialized(@Request(partSerializer=XSerializer.class) C06_Bean rb);
}
@@ -649,10 +649,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface E01_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String normal(@Request E01_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String serialized(@Request(partSerializer=XSerializer.class) E01_Bean rb);
}
@@ -713,10 +713,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface E02_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String normal(@Request E02_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String serialized(@Request(partSerializer=XSerializer.class) E02_Bean rb);
}
@@ -765,10 +765,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface E03_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String normal(@Request E03_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String serialized(@Request(partSerializer=XSerializer.class) E03_Bean rb);
}
@@ -817,10 +817,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface E04_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String normal(@Request E04_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoHeaders")
+ @RemoteMethod(method="GET", path="/echoHeaders")
String serialized(@Request(partSerializer=XSerializer.class) E04_Bean rb);
}
@@ -902,10 +902,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface G01_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{e}/{f}/{g}/{h}")
+ @RemoteMethod(method="GET", path="/echoPath/{a}/{b}/{c}/{e}/{f}/{g}/{h}")
String normal(@Request G01_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{e}/{f}/{g}/{h}")
+ @RemoteMethod(method="GET", path="/echoPath/{a}/{b}/{c}/{e}/{f}/{g}/{h}")
String serialized(@Request(partSerializer=XSerializer.class) G01_Bean rb);
}
@@ -966,10 +966,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface G02_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+ @RemoteMethod(method="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
String normal(@Request G02_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+ @RemoteMethod(method="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
String serialized(@Request(partSerializer=XSerializer.class) G02_Bean rb);
}
@@ -1018,10 +1018,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface G03_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+ @RemoteMethod(method="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
String normal(@Request G03_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
+ @RemoteMethod(method="GET", path="/echoPath/{a1}/{a2}/{a3}/{a4}/{b1}/{b2}/{b3}/{c1}/{c2}/{c3}/{c4}")
String serialized(@Request(partSerializer=XSerializer.class) G03_Bean rb);
}
@@ -1070,10 +1070,10 @@ public class RequestBeanProxyTest {
@RemoteResource(path="/")
public static interface G04_RemoteResource {
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
+ @RemoteMethod(method="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
String normal(@Request G04_Bean rb);
- @RemoteMethod(httpMethod="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
+ @RemoteMethod(method="GET", path="/echoPath/{a}/{b}/{c}/{d}/{e}/{f}/{g}/{h}/{i}")
String serialized(@Request(partSerializer=XSerializer.class) G04_Bean rb);
}
diff --git a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java
index 499e734..486aef6 100644
--- a/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java
+++ b/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/client/ThirdPartyProxyTest.java
@@ -28,8 +28,8 @@ import org.apache.juneau.jena.*;
import org.apache.juneau.json.*;
import org.apache.juneau.msgpack.*;
import org.apache.juneau.parser.*;
-import org.apache.juneau.remote.*;
import org.apache.juneau.rest.client.*;
+import org.apache.juneau.rest.client.remote.*;
import org.apache.juneau.rest.test.*;
import org.apache.juneau.rest.test.client.ThirdPartyProxyTest.ThirdPartyProxy.*;
import org.apache.juneau.rest.testutils.*;
@@ -1600,7 +1600,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// Header tests
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="GET", path="/primitiveHeaders")
+ @RemoteMethod(method="GET", path="/primitiveHeaders")
String primitiveHeaders(
@Header("a") String a,
@Header("an") String an,
@@ -1612,7 +1612,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("f") Float f
);
- @RemoteMethod(httpMethod="GET", path="/primitiveCollectionHeaders")
+ @RemoteMethod(method="GET", path="/primitiveCollectionHeaders")
String primitiveCollectionHeaders(
@Header("a") int[][][] a,
@Header("b") Integer[][][] b,
@@ -1624,7 +1624,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("h") List<String> h
);
- @RemoteMethod(httpMethod="GET", path="/beanHeaders")
+ @RemoteMethod(method="GET", path="/beanHeaders")
String beanHeaders(
@Header("a") ABean a,
@Header("an") ABean an,
@@ -1637,7 +1637,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("h") Map<Integer,List<ABean>> h
);
- @RemoteMethod(httpMethod="GET", path="/typedBeanHeaders")
+ @RemoteMethod(method="GET", path="/typedBeanHeaders")
String typedBeanHeaders(
@Header("a") TypedBean a,
@Header("an") TypedBean an,
@@ -1650,7 +1650,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("h") Map<Integer,List<TypedBean>> h
);
- @RemoteMethod(httpMethod="GET", path="/swappedPojoHeaders")
+ @RemoteMethod(method="GET", path="/swappedPojoHeaders")
String swappedPojoHeaders(
@Header("a") SwappedPojo a,
@Header("b") SwappedPojo[][][] b,
@@ -1658,7 +1658,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("d") Map<SwappedPojo,SwappedPojo[][][]> d
);
- @RemoteMethod(httpMethod="GET", path="/implicitSwappedPojoHeaders")
+ @RemoteMethod(method="GET", path="/implicitSwappedPojoHeaders")
String implicitSwappedPojoHeaders(
@Header("a") ImplicitSwappedPojo a,
@Header("b") ImplicitSwappedPojo[][][] b,
@@ -1666,7 +1666,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("d") Map<ImplicitSwappedPojo,ImplicitSwappedPojo[][][]> d
);
- @RemoteMethod(httpMethod="GET", path="/enumHeaders")
+ @RemoteMethod(method="GET", path="/enumHeaders")
String enumHeaders(
@Header("a") TestEnum a,
@Header("an") TestEnum an,
@@ -1679,17 +1679,17 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Header("h") Map<TestEnum,List<TestEnum[][][]>> h
);
- @RemoteMethod(httpMethod="GET", path="/mapHeader")
+ @RemoteMethod(method="GET", path="/mapHeader")
String mapHeader(
@Header("*") Map<String,Object> a
);
- @RemoteMethod(httpMethod="GET", path="/beanHeader")
+ @RemoteMethod(method="GET", path="/beanHeader")
String beanHeader(
@Header("*") NeBean a
);
- @RemoteMethod(httpMethod="GET", path="/nameValuePairsHeader")
+ @RemoteMethod(method="GET", path="/nameValuePairsHeader")
String nameValuePairsHeader(
@Header("*") NameValuePairs a
);
@@ -1698,7 +1698,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// Query tests
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="GET", path="/primitiveQueries")
+ @RemoteMethod(method="GET", path="/primitiveQueries")
String primitiveQueries(
@Query("a") String a,
@Query("an") String an,
@@ -1710,7 +1710,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("f") Float f
);
- @RemoteMethod(httpMethod="GET", path="/primitiveCollectionQueries")
+ @RemoteMethod(method="GET", path="/primitiveCollectionQueries")
String primitiveCollectionQueries(
@Query("a") int[][][] a,
@Query("b") Integer[][][] b,
@@ -1722,7 +1722,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("h") List<String> h
);
- @RemoteMethod(httpMethod="GET", path="/beanQueries")
+ @RemoteMethod(method="GET", path="/beanQueries")
String beanQueries(
@Query("a") ABean a,
@Query("an") ABean an,
@@ -1735,7 +1735,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("h") Map<Integer,List<ABean>> h
);
- @RemoteMethod(httpMethod="GET", path="/typedBeanQueries")
+ @RemoteMethod(method="GET", path="/typedBeanQueries")
String typedBeanQueries(
@Query("a") TypedBean a,
@Query("an") TypedBean an,
@@ -1748,7 +1748,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("h") Map<Integer,List<TypedBean>> h
);
- @RemoteMethod(httpMethod="GET", path="/swappedPojoQueries")
+ @RemoteMethod(method="GET", path="/swappedPojoQueries")
String swappedPojoQueries(
@Query("a") SwappedPojo a,
@Query("b") SwappedPojo[][][] b,
@@ -1756,7 +1756,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("d") Map<SwappedPojo,SwappedPojo[][][]> d
);
- @RemoteMethod(httpMethod="GET", path="/implicitSwappedPojoQueries")
+ @RemoteMethod(method="GET", path="/implicitSwappedPojoQueries")
String implicitSwappedPojoQueries(
@Query("a") ImplicitSwappedPojo a,
@Query("b") ImplicitSwappedPojo[][][] b,
@@ -1764,7 +1764,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("d") Map<ImplicitSwappedPojo,ImplicitSwappedPojo[][][]> d
);
- @RemoteMethod(httpMethod="GET", path="/enumQueries")
+ @RemoteMethod(method="GET", path="/enumQueries")
String enumQueries(
@Query("a") TestEnum a,
@Query("an") TestEnum an,
@@ -1777,27 +1777,27 @@ public class ThirdPartyProxyTest extends RestTestcase {
@Query("h") Map<TestEnum,List<TestEnum[][][]>> h
);
- @RemoteMethod(httpMethod="GET", path="/stringQuery1")
+ @RemoteMethod(method="GET", path="/stringQuery1")
String stringQuery1(
@Query String a
);
- @RemoteMethod(httpMethod="GET", path="/stringQuery2")
+ @RemoteMethod(method="GET", path="/stringQuery2")
String stringQuery2(
@Query("*") String a
);
- @RemoteMethod(httpMethod="GET", path="/mapQuery")
+ @RemoteMethod(method="GET", path="/mapQuery")
String mapQuery(
@Query("*") Map<String,Object> a
);
- @RemoteMethod(httpMethod="GET", path="/beanQuery")
+ @RemoteMethod(method="GET", path="/beanQuery")
String beanQuery(
@Query("*") NeBean a
);
- @RemoteMethod(httpMethod="GET", path="/nameValuePairsQuery")
+ @RemoteMethod(method="GET", path="/nameValuePairsQuery")
String nameValuePairsQuery(
@Query("*") NameValuePairs a
);
@@ -1806,7 +1806,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// FormData tests
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/primitiveFormData")
+ @RemoteMethod(method="POST", path="/primitiveFormData")
String primitiveFormData(
@FormData("a") String a,
@FormData("an") String an,
@@ -1818,7 +1818,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("f") Float f
);
- @RemoteMethod(httpMethod="POST", path="/primitiveCollectionFormData")
+ @RemoteMethod(method="POST", path="/primitiveCollectionFormData")
String primitiveCollectionFormData(
@FormData("a") int[][][] a,
@FormData("b") Integer[][][] b,
@@ -1830,7 +1830,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("h") List<String> h
);
- @RemoteMethod(httpMethod="POST", path="/beanFormData")
+ @RemoteMethod(method="POST", path="/beanFormData")
String beanFormData(
@FormData("a") ABean a,
@FormData("an") ABean an,
@@ -1843,7 +1843,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("h") Map<Integer,List<ABean>> h
);
- @RemoteMethod(httpMethod="POST", path="/typedBeanFormData")
+ @RemoteMethod(method="POST", path="/typedBeanFormData")
String typedBeanFormData(
@FormData("a") TypedBean a,
@FormData("an") TypedBean an,
@@ -1856,7 +1856,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("h") Map<Integer,List<TypedBean>> h
);
- @RemoteMethod(httpMethod="POST", path="/swappedPojoFormData")
+ @RemoteMethod(method="POST", path="/swappedPojoFormData")
String swappedPojoFormData(
@FormData("a") SwappedPojo a,
@FormData("b") SwappedPojo[][][] b,
@@ -1864,7 +1864,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("d") Map<SwappedPojo,SwappedPojo[][][]> d
);
- @RemoteMethod(httpMethod="POST", path="/implicitSwappedPojoFormData")
+ @RemoteMethod(method="POST", path="/implicitSwappedPojoFormData")
String implicitSwappedPojoFormData(
@FormData("a") ImplicitSwappedPojo a,
@FormData("b") ImplicitSwappedPojo[][][] b,
@@ -1872,7 +1872,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("d") Map<ImplicitSwappedPojo,ImplicitSwappedPojo[][][]> d
);
- @RemoteMethod(httpMethod="POST", path="/enumFormData")
+ @RemoteMethod(method="POST", path="/enumFormData")
String enumFormData(
@FormData("a") TestEnum a,
@FormData("an") TestEnum an,
@@ -1885,17 +1885,17 @@ public class ThirdPartyProxyTest extends RestTestcase {
@FormData("h") Map<TestEnum,List<TestEnum[][][]>> h
);
- @RemoteMethod(httpMethod="POST", path="/mapFormData")
+ @RemoteMethod(method="POST", path="/mapFormData")
String mapFormData(
@FormData("*") Map<String,Object> a
);
- @RemoteMethod(httpMethod="POST", path="/beanFormData2")
+ @RemoteMethod(method="POST", path="/beanFormData2")
String beanFormData(
@FormData("*") NeBean a
);
- @RemoteMethod(httpMethod="POST", path="/nameValuePairsFormData")
+ @RemoteMethod(method="POST", path="/nameValuePairsFormData")
String nameValuePairsFormData(
@FormData("*") NameValuePairs a
);
@@ -1904,18 +1904,18 @@ public class ThirdPartyProxyTest extends RestTestcase {
// Path tests
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/pathVars1/{a}/{b}")
+ @RemoteMethod(method="POST", path="/pathVars1/{a}/{b}")
String pathVars1(
@Path("a") int a,
@Path("b") String b
);
- @RemoteMethod(httpMethod="POST", path="/pathVars2/{a}/{b}")
+ @RemoteMethod(method="POST", path="/pathVars2/{a}/{b}")
String pathVars2(
@Path Map<String,Object> a
);
- @RemoteMethod(httpMethod="POST", path="/pathVars3/{a}/{b}")
+ @RemoteMethod(method="POST", path="/pathVars3/{a}/{b}")
String pathVars3(
@Path ABean a
);
@@ -1924,7 +1924,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// @Request tests - Path
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/reqBeanPath/{a}/{b}")
+ @RemoteMethod(method="POST", path="/reqBeanPath/{a}/{b}")
String reqBeanPath1(
@Request ReqBeanPath1 rb
);
@@ -1949,7 +1949,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanPath/{a}/{b}")
+ @RemoteMethod(method="POST", path="/reqBeanPath/{a}/{b}")
String reqBeanPath2(
@Request ReqBeanPath2 rb
);
@@ -1966,7 +1966,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanPath/{a}/{b}")
+ @RemoteMethod(method="POST", path="/reqBeanPath/{a}/{b}")
String reqBeanPath3(
@Request ReqBeanPath3 rb
);
@@ -1979,7 +1979,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
String getY();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanPath/{a}/{b}")
+ @RemoteMethod(method="POST", path="/reqBeanPath/{a}/{b}")
String reqBeanPath6(
@Request ReqBeanPath6 rb
);
@@ -1989,7 +1989,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
Map<String,Object> getX();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanPath/{a}/{b}")
+ @RemoteMethod(method="POST", path="/reqBeanPath/{a}/{b}")
String reqBeanPath7(
@Request ReqBeanPath7 rb
);
@@ -2003,7 +2003,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// @Request tests - Query
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/reqBeanQuery")
+ @RemoteMethod(method="POST", path="/reqBeanQuery")
String reqBeanQuery1(
@Request ReqBeanQuery1 rb
);
@@ -2028,7 +2028,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanQuery")
+ @RemoteMethod(method="POST", path="/reqBeanQuery")
String reqBeanQuery2(
@Request ReqBeanQuery2 rb
);
@@ -2045,7 +2045,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanQuery")
+ @RemoteMethod(method="POST", path="/reqBeanQuery")
String reqBeanQuery3(
@Request ReqBeanQuery3 rb
);
@@ -2058,7 +2058,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
String getY();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanQuery")
+ @RemoteMethod(method="POST", path="/reqBeanQuery")
String reqBeanQuery6(
@Request ReqBeanQuery6 rb
);
@@ -2068,7 +2068,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
Map<String,Object> getX();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanQuery")
+ @RemoteMethod(method="POST", path="/reqBeanQuery")
String reqBeanQuery7(
@Request ReqBeanQuery7 rb
);
@@ -2082,7 +2082,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// @Request tests - FormData
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/reqBeanFormData")
+ @RemoteMethod(method="POST", path="/reqBeanFormData")
String reqBeanFormData1(
@Request ReqBeanFormData1 rb
);
@@ -2107,7 +2107,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanFormData")
+ @RemoteMethod(method="POST", path="/reqBeanFormData")
String reqBeanFormData2(
@Request ReqBeanFormData2 rb
);
@@ -2124,7 +2124,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanFormData")
+ @RemoteMethod(method="POST", path="/reqBeanFormData")
String reqBeanFormData3(
@Request ReqBeanFormData3 rb
);
@@ -2137,7 +2137,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
String getY();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanFormData")
+ @RemoteMethod(method="POST", path="/reqBeanFormData")
String reqBeanFormData6(
@Request ReqBeanFormData6 rb
);
@@ -2147,7 +2147,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
Map<String,Object> getX();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanFormData")
+ @RemoteMethod(method="POST", path="/reqBeanFormData")
String reqBeanFormData7(
@Request ReqBeanFormData7 rb
);
@@ -2161,7 +2161,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// @Request tests - Header
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/reqBeanHeader")
+ @RemoteMethod(method="POST", path="/reqBeanHeader")
String reqBeanHeader1(
@Request ReqBeanHeader1 rb
);
@@ -2186,7 +2186,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanHeader")
+ @RemoteMethod(method="POST", path="/reqBeanHeader")
String reqBeanHeader2(
@Request ReqBeanHeader2 rb
);
@@ -2203,7 +2203,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
}
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanHeader")
+ @RemoteMethod(method="POST", path="/reqBeanHeader")
String reqBeanHeader3(
@Request ReqBeanHeader3 rb
);
@@ -2216,7 +2216,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
String getY();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanHeader")
+ @RemoteMethod(method="POST", path="/reqBeanHeader")
String reqBeanHeader6(
@Request ReqBeanHeader6 rb
);
@@ -2226,7 +2226,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
Map<String,Object> getX();
}
- @RemoteMethod(httpMethod="POST", path="/reqBeanHeader")
+ @RemoteMethod(method="POST", path="/reqBeanHeader")
String reqBeanHeader7(
@Request ReqBeanHeader7 rb
);
@@ -2240,7 +2240,7 @@ public class ThirdPartyProxyTest extends RestTestcase {
// PartFormatters
//--------------------------------------------------------------------------------
- @RemoteMethod(httpMethod="POST", path="/partFormatters/{p1}")
+ @RemoteMethod(method="POST", path="/partFormatters/{p1}")
String partFormatters(
@Path(value="p1", serializer=DummyPartSerializer.class) String p1,
@Header(value="h1", serializer=DummyPartSerializer.class) String h1,
@@ -2254,158 +2254,158 @@ public class ThirdPartyProxyTest extends RestTestcase {
// Various primitives
- @RemoteMethod(httpMethod="GET", path="/returnVoid")
+ @RemoteMethod(method="GET", path="/returnVoid")
void returnVoid();
- @RemoteMethod(httpMethod="GET", path="/returnInt")
+ @RemoteMethod(method="GET", path="/returnInt")
int returnInt();
- @RemoteMethod(httpMethod="GET", path="/returnInteger")
+ @RemoteMethod(method="GET", path="/returnInteger")
Integer returnInteger();
- @RemoteMethod(httpMethod="GET", path="/returnBoolean")
+ @RemoteMethod(method="GET", path="/returnBoolean")
boolean returnBoolean();
- @RemoteMethod(httpMethod="GET", path="/returnFloat")
+ @RemoteMethod(method="GET", path="/returnFloat")
float returnFloat();
- @RemoteMethod(httpMethod="GET", path="/returnFloatObject")
+ @RemoteMethod(method="GET", path="/returnFloatObject")
Float returnFloatObject();
- @RemoteMethod(httpMethod="GET", path="/returnString")
+ @RemoteMethod(method="GET", path="/returnString")
String returnString();
- @RemoteMethod(httpMethod="GET", path="/returnNullString")
+ @RemoteMethod(method="GET", path="/returnNullString")
String returnNullString();
- @RemoteMethod(httpMethod="GET", path="/returnInt3dArray")
+ @RemoteMethod(method="GET", path="/returnInt3dArray")
int[][][] returnInt3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnInteger3dArray")
+ @RemoteMethod(method="GET", path="/returnInteger3dArray")
Integer[][][] returnInteger3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnString3dArray")
+ @RemoteMethod(method="GET", path="/returnString3dArray")
String[][][] returnString3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnIntegerList")
+ @RemoteMethod(method="GET", path="/returnIntegerList")
List<Integer> returnIntegerList();
- @RemoteMethod(httpMethod="GET", path="/returnInteger3dList")
+ @RemoteMethod(method="GET", path="/returnInteger3dList")
List<List<List<Integer>>> returnInteger3dList();
- @RemoteMethod(httpMethod="GET", path="/returnInteger1d3dList")
+ @RemoteMethod(method="GET", path="/returnInteger1d3dList")
List<Integer[][][]> returnInteger1d3dList();
- @RemoteMethod(httpMethod="GET", path="/returnInt1d3dList")
+ @RemoteMethod(method="GET", path="/returnInt1d3dList")
List<int[][][]> returnInt1d3dList();
- @RemoteMethod(httpMethod="GET", path="/returnStringList")
+ @RemoteMethod(method="GET", path="/returnStringList")
List<String> returnStringList();
// Beans
- @RemoteMethod(httpMethod="GET", path="/returnBean")
+ @RemoteMethod(method="GET", path="/returnBean")
ABean returnBean();
- @RemoteMethod(httpMethod="GET", path="/returnBean3dArray")
+ @RemoteMethod(method="GET", path="/returnBean3dArray")
ABean[][][] returnBean3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnBeanList")
+ @RemoteMethod(method="GET", path="/returnBeanList")
List<ABean> returnBeanList();
- @RemoteMethod(httpMethod="GET", path="/returnBean1d3dList")
+ @RemoteMethod(method="GET", path="/returnBean1d3dList")
List<ABean[][][]> returnBean1d3dList();
- @RemoteMethod(httpMethod="GET", path="/returnBeanMap")
+ @RemoteMethod(method="GET", path="/returnBeanMap")
Map<String,ABean> returnBeanMap();
- @RemoteMethod(httpMethod="GET", path="/returnBeanListMap")
+ @RemoteMethod(method="GET", path="/returnBeanListMap")
Map<String,List<ABean>> returnBeanListMap();
- @RemoteMethod(httpMethod="GET", path="/returnBean1d3dListMap")
+ @RemoteMethod(method="GET", path="/returnBean1d3dListMap")
Map<String,List<ABean[][][]>> returnBean1d3dListMap();
- @RemoteMethod(httpMethod="GET", path="/returnBeanListMapIntegerKeys")
+ @RemoteMethod(method="GET", path="/returnBeanListMapIntegerKeys")
Map<Integer,List<ABean>> returnBeanListMapIntegerKeys();
// Typed beans
- @RemoteMethod(httpMethod="GET", path="/returnTypedBean")
+ @RemoteMethod(method="GET", path="/returnTypedBean")
TypedBean returnTypedBean();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBean3dArray")
+ @RemoteMethod(method="GET", path="/returnTypedBean3dArray")
TypedBean[][][] returnTypedBean3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBeanList")
+ @RemoteMethod(method="GET", path="/returnTypedBeanList")
List<TypedBean> returnTypedBeanList();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBean1d3dList")
+ @RemoteMethod(method="GET", path="/returnTypedBean1d3dList")
List<TypedBean[][][]> returnTypedBean1d3dList();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBeanMap")
+ @RemoteMethod(method="GET", path="/returnTypedBeanMap")
Map<String,TypedBean> returnTypedBeanMap();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBeanListMap")
+ @RemoteMethod(method="GET", path="/returnTypedBeanListMap")
Map<String,List<TypedBean>> returnTypedBeanListMap();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBean1d3dListMap")
+ @RemoteMethod(method="GET", path="/returnTypedBean1d3dListMap")
Map<String,List<TypedBean[][][]>> returnTypedBean1d3dListMap();
- @RemoteMethod(httpMethod="GET", path="/returnTypedBeanListMapIntegerKeys")
+ @RemoteMethod(method="GET", path="/returnTypedBeanListMapIntegerKeys")
Map<Integer,List<TypedBean>> returnTypedBeanListMapIntegerKeys();
// Swapped POJOs
- @RemoteMethod(httpMethod="GET", path="/returnSwappedPojo")
+ @RemoteMethod(method="GET", path="/returnSwappedPojo")
SwappedPojo returnSwappedPojo();
- @RemoteMethod(httpMethod="GET", path="/returnSwappedPojo3dArray")
+ @RemoteMethod(method="GET", path="/returnSwappedPojo3dArray")
SwappedPojo[][][] returnSwappedPojo3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnSwappedPojoMap")
+ @RemoteMethod(method="GET", path="/returnSwappedPojoMap")
Map<SwappedPojo,SwappedPojo> returnSwappedPojoMap();
- @RemoteMethod(httpMethod="GET", path="/returnSwappedPojo3dMap")
+ @RemoteMethod(method="GET", path="/returnSwappedPojo3dMap")
Map<SwappedPojo,SwappedPojo[][][]> returnSwappedPojo3dMap();
// Implicit swapped POJOs
- @RemoteMethod(httpMethod="GET", path="/returnImplicitSwappedPojo")
+ @RemoteMethod(method="GET", path="/returnImplicitSwappedPojo")
ImplicitSwappedPojo returnImplicitSwappedPojo();
- @RemoteMethod(httpMethod="GET", path="/returnImplicitSwappedPojo3dArray")
+ @RemoteMethod(method="GET", path="/returnImplicitSwappedPojo3dArray")
ImplicitSwappedPojo[][][] returnImplicitSwappedPojo3dArray();
- @RemoteMethod(httpMethod="GET", path="/returnImplicitSwappedPojoMap")
+ @RemoteMethod(method="GET", path="/returnImplicitSwappedPojoMap")
Map<ImplicitSwappedPojo,ImplicitSwappedPojo> returnImplicitSwappedPojoMap();
- @RemoteMethod(httpMethod="GET", path="/returnImplicitSwappedPojo3dMap")
+ @RemoteMethod(method="GET", path="/returnImplicitSwappedPojo3dMap")
Map<ImplicitSwappedPojo,ImplicitSwappedPojo[][][]> returnImplicitSwappedPojo3dMap();
// Enums
- @RemoteMethod(httpMethod="GET", path="/returnEnum")
+ @RemoteMethod(method="GET", path="/returnEnum")
TestEnum returnEnum();
- @RemoteMethod(httpMethod="GET", path="/returnEnum3d")
+ @RemoteMethod(method="GET", path="/returnEnum3d")
TestEnum[][][] returnEnum3d();
- @RemoteMethod(httpMethod="GET", path="/returnEnumList")
+ @RemoteMethod(method="GET", path="/returnEnumList")
List<TestEnum> returnEnumList();
- @RemoteMethod(httpMethod="GET", path="/returnEnum3dList")
+ @RemoteMethod(method="GET", path="/returnEnum3dList")
List<List<List<TestEnum>>> returnEnum3dList();
- @RemoteMethod(httpMethod="GET", path="/returnEnum1d3dList")
+ @RemoteMethod(method="GET", path="/returnEnum1d3dList")
List<TestEnum[][][]> returnEnum1d3dList();
- @RemoteMethod(httpMethod="GET", path="/returnEnumMap")
+ @RemoteMethod(method="GET", path="/returnEnumMap")
Map<TestEnum,TestEnum> returnEnumMap();
- @RemoteMethod(httpMethod="GET", path="/returnEnum3dArrayMap")
+ @RemoteMethod(method="GET", path="/returnEnum3dArrayMap")
Map<TestEnum,TestEnum[][][]> returnEnum3dArrayMap();
- @RemoteMethod(httpMethod="GET", path="/returnEnum1d3dListMap")
+ @RemoteMethod(method="GET", path="/returnEnum1d3dListMap")
Map<TestEnum,List<TestEnum[][][]>> returnEnum1d3dListMap();
//--------------------------------------------------------------------------------
@@ -2414,181 +2414,181 @@ public class ThirdPartyProxyTest extends RestTestcase {
// Various primitives
- @RemoteMethod(httpMethod="POST", path="/setInt")
+ @RemoteMethod(method="POST", path="/setInt")
void setInt(@Body int x);
- @RemoteMethod(httpMethod="POST", path="/setInteger")
+ @RemoteMethod(method="POST", path="/setInteger")
void setInteger(@Body Integer x);
- @RemoteMethod(httpMethod="POST", path="/setBoolean")
+ @RemoteMethod(method="POST", path="/setBoolean")
void setBoolean(@Body boolean x);
- @RemoteMethod(httpMethod="POST", path="/setFloat")
+ @RemoteMethod(method="POST", path="/setFloat")
void setFloat(@Body float x);
- @RemoteMethod(httpMethod="POST", path="/setFloatObject")
+ @RemoteMethod(method="POST", path="/setFloatObject")
void setFloatObject(@Body Float x);
- @RemoteMethod(httpMethod="POST", path="/setString")
+ @RemoteMethod(method="POST", path="/setString")
void setString(@Body String x);
- @RemoteMethod(httpMethod="POST", path="/setNullString")
+ @RemoteMethod(method="POST", path="/setNullString")
void setNullString(@Body String x);
- @RemoteMethod(httpMethod="POST", path="/setInt3dArray")
+ @RemoteMethod(method="POST", path="/setInt3dArray")
String setInt3dArray(@Body int[][][] x, @org.apache.juneau.http.annotation.Query("I") int i);
- @RemoteMethod(httpMethod="POST", path="/setInteger3dArray")
+ @RemoteMethod(method="POST", path="/setInteger3dArray")
void setInteger3dArray(@Body Integer[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setString3dArray")
+ @RemoteMethod(method="POST", path="/setString3dArray")
void setString3dArray(@Body String[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setIntegerList")
+ @RemoteMethod(method="POST", path="/setIntegerList")
void setIntegerList(@Body List<Integer> x);
- @RemoteMethod(httpMethod="POST", path="/setInteger3dList")
+ @RemoteMethod(method="POST", path="/setInteger3dList")
void setInteger3dList(@Body List<List<List<Integer>>> x);
- @RemoteMethod(httpMethod="POST", path="/setInteger1d3dList")
+ @RemoteMethod(method="POST", path="/setInteger1d3dList")
void setInteger1d3dList(@Body List<Integer[][][]> x);
- @RemoteMethod(httpMethod="POST", path="/setInt1d3dList")
+ @RemoteMethod(method="POST", path="/setInt1d3dList")
void setInt1d3dList(@Body List<int[][][]> x);
- @RemoteMethod(httpMethod="POST", path="/setStringList")
+ @RemoteMethod(method="POST", path="/setStringList")
void setStringList(@Body List<String> x);
// Beans
- @RemoteMethod(httpMethod="POST", path="/setBean")
+ @RemoteMethod(method="POST", path="/setBean")
void setBean(@Body ABean x);
- @RemoteMethod(httpMethod="POST", path="/setBean3dArray")
+ @RemoteMethod(method="POST", path="/setBean3dArray")
void setBean3dArray(@Body ABean[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setBeanList")
+ @RemoteMethod(method="POST", path="/setBeanList")
void setBeanList(@Body List<ABean> x);
- @RemoteMethod(httpMethod="POST", path="/setBean1d3dList")
+ @RemoteMethod(method="POST", path="/setBean1d3dList")
void setBean1d3dList(@Body List<ABean[][][]> x);
- @RemoteMethod(httpMethod="POST", path="/setBeanMap")
+ @RemoteMethod(method="POST", path="/setBeanMap")
void setBeanMap(@Body Map<String,ABean> x);
- @RemoteMethod(httpMethod="POST", path="/setBeanListMap")
+ @RemoteMethod(method="POST", path="/setBeanListMap")
void setBeanListMap(@Body Map<String,List<ABean>> x);
- @RemoteMethod(httpMethod="POST", path="/setBean1d3dListMap")
+ @RemoteMethod(method="POST", path="/setBean1d3dListMap")
void setBean1d3dListMap(@Body Map<String,List<ABean[][][]>> x);
- @RemoteMethod(httpMethod="POST", path="/setBeanListMapIntegerKeys")
+ @RemoteMethod(method="POST", path="/setBeanListMapIntegerKeys")
void setBeanListMapIntegerKeys(@Body Map<Integer,List<ABean>> x);
// Typed beans
- @RemoteMethod(httpMethod="POST", path="/setTypedBean")
+ @RemoteMethod(method="POST", path="/setTypedBean")
void setTypedBean(@Body TypedBean x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBean3dArray")
+ @RemoteMethod(method="POST", path="/setTypedBean3dArray")
void setTypedBean3dArray(@Body TypedBean[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBeanList")
+ @RemoteMethod(method="POST", path="/setTypedBeanList")
void setTypedBeanList(@Body List<TypedBean> x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBean1d3dList")
+ @RemoteMethod(method="POST", path="/setTypedBean1d3dList")
void setTypedBean1d3dList(@Body List<TypedBean[][][]> x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBeanMap")
+ @RemoteMethod(method="POST", path="/setTypedBeanMap")
void setTypedBeanMap(@Body Map<String,TypedBean> x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBeanListMap")
+ @RemoteMethod(method="POST", path="/setTypedBeanListMap")
void setTypedBeanListMap(@Body Map<String,List<TypedBean>> x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBean1d3dListMap")
+ @RemoteMethod(method="POST", path="/setTypedBean1d3dListMap")
void setTypedBean1d3dListMap(@Body Map<String,List<TypedBean[][][]>> x);
- @RemoteMethod(httpMethod="POST", path="/setTypedBeanListMapIntegerKeys")
+ @RemoteMethod(method="POST", path="/setTypedBeanListMapIntegerKeys")
void setTypedBeanListMapIntegerKeys(@Body Map<Integer,List<TypedBean>> x);
// Swapped POJOs
- @RemoteMethod(httpMethod="POST", path="/setSwappedPojo")
+ @RemoteMethod(method="POST", path="/setSwappedPojo")
void setSwappedPojo(@Body SwappedPojo x);
- @RemoteMethod(httpMethod="POST", path="/setSwappedPojo3dArray")
+ @RemoteMethod(method="POST", path="/setSwappedPojo3dArray")
void setSwappedPojo3dArray(@Body SwappedPojo[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setSwappedPojoMap")
+ @RemoteMethod(method="POST", path="/setSwappedPojoMap")
void setSwappedPojoMap(@Body Map<SwappedPojo,SwappedPojo> x);
- @RemoteMethod(httpMethod="POST", path="/setSwappedPojo3dMap")
+ @RemoteMethod(method="POST", path="/setSwappedPojo3dMap")
void setSwappedPojo3dMap(@Body Map<SwappedPojo,SwappedPojo[][][]> x);
// Implicit swapped POJOs
- @RemoteMethod(httpMethod="POST", path="/setImplicitSwappedPojo")
+ @RemoteMethod(method="POST", path="/setImplicitSwappedPojo")
void setImplicitSwappedPojo(@Body ImplicitSwappedPojo x);
- @RemoteMethod(httpMethod="POST", path="/setImplicitSwappedPojo3dArray")
+ @RemoteMethod(method="POST", path="/setImplicitSwappedPojo3dArray")
void setImplicitSwappedPojo3dArray(@Body ImplicitSwappedPojo[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setImplicitSwappedPojoMap")
+ @RemoteMethod(method="POST", path="/setImplicitSwappedPojoMap")
void setImplicitSwappedPojoMap(@Body Map<ImplicitSwappedPojo,ImplicitSwappedPojo> x);
- @RemoteMethod(httpMethod="POST", path="/setImplicitSwappedPojo3dMap")
+ @RemoteMethod(method="POST", path="/setImplicitSwappedPojo3dMap")
void setImplicitSwappedPojo3dMap(@Body Map<ImplicitSwappedPojo,ImplicitSwappedPojo[][][]> x);
// Enums
- @RemoteMethod(httpMethod="POST", path="/setEnum")
+ @RemoteMethod(method="POST", path="/setEnum")
void setEnum(@Body TestEnum x);
- @RemoteMethod(httpMethod="POST", path="/setEnum3d")
+ @RemoteMethod(method="POST", path="/setEnum3d")
void setEnum3d(@Body TestEnum[][][] x);
- @RemoteMethod(httpMethod="POST", path="/setEnumList")
+ @RemoteMethod(method="POST", path="/setEnumList")
void setEnumList(@Body List<TestEnum> x);
- @RemoteMethod(httpMethod="POST", path="/setEnum3dList")
+ @RemoteMethod(method="POST", path="/setEnum3dList")
void setEnum3dList(@Body List<List<List<TestEnum>>> x);
- @RemoteMethod(httpMethod="POST", path="/setEnum1d3dList")
+ @RemoteMethod(method="POST", path="/setEnum1d3dList")
void setEnum1d3dList(@Body List<TestEnum[][][]> x);
- @RemoteMethod(httpMethod="POST", path="/setEnumMap")
+ @RemoteMethod(method="POST", path="/setEnumMap")
void setEnumMap(@Body Map<TestEnum,TestEnum> x);
- @RemoteMethod(httpMethod="POST", path="/setEnum3dArrayMap")
+ @RemoteMethod(method="POST", path="/setEnum3dArrayMap")
void setEnum3dArrayMap(@Body Map<TestEnum,TestEnum[][][]> x);
- @RemoteMethod(httpMethod="POST", path="/setEnum1d3dListMap")
+ @RemoteMethod(method="POST", path="/setEnum1d3dListMap")
void setEnum1d3dListMap(@Body Map<TestEnum,List<TestEnum[][][]>> x);
// Method returns status code
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
int httpStatusReturnInt200();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
Integer httpStatusReturnInteger200();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
int httpStatusReturnInt404();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
Integer httpStatusReturnInteger404();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
boolean httpStatusReturnBool200();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn200", returns=RemoteReturn.HTTP_STATUS)
Boolean httpStatusReturnBoolean200();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
boolean httpStatusReturnBool404();
- @RemoteMethod(httpMethod="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
+ @RemoteMethod(method="GET", path="/httpStatusReturn404", returns=RemoteReturn.HTTP_STATUS)
Boolean httpStatusReturnBoolean404();
}
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index 83a68ad..9919dd2 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -13,7 +13,6 @@
package org.apache.juneau.rest.client;
import static org.apache.juneau.internal.StringUtils.*;
-import static org.apache.juneau.remote.RemoteReturn.*;
import static org.apache.juneau.httppart.HttpPartType.*;
import java.io.*;
@@ -36,6 +35,7 @@ import org.apache.juneau.internal.*;
import org.apache.juneau.json.*;
import org.apache.juneau.parser.*;
import org.apache.juneau.remote.*;
+import org.apache.juneau.rest.client.remote.*;
import org.apache.juneau.serializer.*;
import org.apache.juneau.urlencoding.*;
@@ -1105,10 +1105,10 @@ public class RestClient extends BeanContext implements Closeable {
}
RemoteMethodReturn rmr = rmm.getReturns();
- if (rmr.getReturnValue() == NONE) {
+ if (rmr.getReturnValue() == RemoteReturn.NONE) {
rc.run();
return null;
- } else if (rmr.getReturnValue() == HTTP_STATUS) {
+ } else if (rmr.getReturnValue() == RemoteReturn.HTTP_STATUS) {
rc.ignoreErrors();
int returnCode = rc.run();
Class<?> rt = method.getReturnType();
@@ -1227,24 +1227,16 @@ public class RestClient extends BeanContext implements Closeable {
@Override /* InvocationHandler */
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- RemoteMethodMeta rmm = rm.getMethodMeta(method);
+ RemoteInterfaceMethod rim = rm.getMethodMeta(method);
- if (rmm == null)
+ if (rim == null)
throw new RuntimeException("Method is not exposed as a remote method.");
- String url = rmm.getUrl();
+ String url = rim.getUrl();
try (RestCall rc = doCall("POST", url, true)) {
- rc.serializer(serializer).parser(parser);
-
- if (rmm.getOtherArgs().length > 0) {
- Object[] otherArgs = new Object[rmm.getOtherArgs().length];
- int i = 0;
- for (RemoteMethodArg a : rmm.getOtherArgs())
- otherArgs[i++] = args[a.getIndex()];
- rc.body(otherArgs);
- }
+ rc.serializer(serializer).parser(parser).body(args);
Object v = rc.getResponse(method.getGenericReturnType());
if (v == null && method.getReturnType().isPrimitive())
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMetadataException.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java
similarity index 96%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMetadataException.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java
index de398d8..58d47aa 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMetadataException.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMetadataException.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import java.lang.reflect.*;
import java.text.*;
@@ -18,7 +18,7 @@ import java.text.*;
import org.apache.juneau.*;
/**
- * Exceptions caused by invalid remote classes.
+ * Exceptions caused by invalid REST proxy classes.
*/
public class RemoteMetadataException extends FormattedRuntimeException {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethod.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethod.java
similarity index 63%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethod.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethod.java
index a499f9e..78f760d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethod.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethod.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@@ -18,21 +18,10 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.io.*;
import java.lang.annotation.*;
+import org.apache.juneau.http.annotation.*;
+
/**
- * Annotation applied to Java methods on interface proxy classes.
- *
- * <p>
- * The return type on the Java method can be any of the following:
- * <ul>
- * <li><jk>void</jk> - Don't parse any response. Note that the method will still throw an exception if an error
- * HTTP status is returned.
- * <li>Any parsable POJO - The body of the response will be converted to the POJO using the parser defined on the
- * <code>RestClient</code>.
- * <li><code>HttpResponse</code> - Returns the raw <code>HttpResponse</code> returned by the inner
- * <code>HttpClient</code>.
- * <li>{@link Reader} - Returns access to the raw reader of the response.
- * <li>{@link InputStream} - Returns access to the raw input stream of the response.
- * </ul>
+ * Annotation applied to Java methods on REST proxy.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
@@ -62,35 +51,36 @@ public @interface RemoteMethod {
* Defines the HTTP method to use for REST calls.
*
* <p>
- * Possible values:
- * <ul>
- * <li><jsf>POST</jsf> (default) - Parameters are serialized using the serializer registered with the RestClient.
- * <li><jsf>GET</jsf> - Parameters are serialized using the UrlEncodingSerializer registered with the RestClient.
- * </ul>
- *
- * <p>
- * The default value is <js>"POST"</js>.
+ * The default value is <js>"GET"</js> although any valid HTTP method is possible.
*/
- String httpMethod() default "";
+ String method() default "";
/**
* The value the remote method returns.
*
* <p>
* Possible values:
- * <ul>
+ * <ul class='spaced-list'>
* <li>
* {@link RemoteReturn#BODY} (default) - The body of the HTTP response converted to a POJO.
* <br>The return type on the Java method can be any of the following:
- * <ul>
- * <li><jk>void</jk> - Don't parse any response. Note that the method will still throw an exception if an
- * error HTTP status is returned.
- * <li>Any parsable POJO - The body of the response will be converted to the POJO using the parser defined
- * on the <code>RestClient</code>.
- * <li><code>HttpResponse</code> - Returns the raw <code>HttpResponse</code> returned by the inner
- * <code>HttpClient</code>.
- * <li>{@link Reader} - Returns access to the raw reader of the response.
- * <li>{@link InputStream} - Returns access to the raw input stream of the response.
+ * <ul class='spaced-list'>
+ * <li>
+ * <jk>void</jk> - Don't parse any response. Note that the method will still throw an exception if an
+ * error HTTP status is returned.
+ * <li>
+ * Any parsable POJO - The body of the response will be converted to the POJO using the parser defined
+ * on the <code>RestClient</code>.
+ * <li>
+ * Any POJO annotated with the {@link Response @Response} annotation.
+ * This allows for response beans to be used which also allows for OpenAPI-based parsing and validation.
+ * <li>
+ * <code>HttpResponse</code> - Returns the raw <code>HttpResponse</code> returned by the inner
+ * <code>HttpClient</code>.
+ * <li>
+ * {@link Reader} - Returns access to the raw reader of the response.
+ * <li>
+ * {@link InputStream} - Returns access to the raw input stream of the response.
* </ul>
* <li>
* {@link RemoteReturn#HTTP_STATUS} - The HTTP status code on the response.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodArg.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodArg.java
similarity index 98%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodArg.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodArg.java
index 49bfab2..9cf2f18 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodArg.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodArg.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static org.apache.juneau.internal.ClassUtils.*;
import static org.apache.juneau.httppart.HttpPartType.*;
@@ -21,7 +21,7 @@ import org.apache.juneau.http.annotation.*;
import org.apache.juneau.httppart.*;
/**
- * Represents the metadata about an annotated argument of a method on a remote proxy interface.
+ * Represents the metadata about an annotated argument of a method on a REST proxy class.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodBeanArg.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodBeanArg.java
similarity index 97%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodBeanArg.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodBeanArg.java
index e7c33be..7e407d1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodBeanArg.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodBeanArg.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static org.apache.juneau.internal.ClassUtils.*;
@@ -19,7 +19,7 @@ import org.apache.juneau.httppart.*;
import org.apache.juneau.httppart.bean.*;
/**
- * Represents the metadata about an {@link Request}-annotated argument of a method on a remote proxy interface.
+ * Represents the metadata about an {@link Request}-annotated argument of a method on a REST proxy class.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodMeta.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodMeta.java
similarity index 96%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodMeta.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodMeta.java
index c930e4f..8b4665e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodMeta.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodMeta.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static org.apache.juneau.internal.StringUtils.*;
import static org.apache.juneau.httppart.HttpPartType.*;
@@ -25,7 +25,7 @@ import org.apache.juneau.httppart.bean.*;
import org.apache.juneau.internal.*;
/**
- * Contains the meta-data about a Java method on a remote class.
+ * Contains the meta-data about a Java method on a REST proxy class.
*
* <p>
* Captures the information in {@link RemoteMethod @RemoteMethod} annotations for caching and reuse.
@@ -86,7 +86,7 @@ public class RemoteMethodMeta {
RemoteMethod rm = m.getAnnotation(RemoteMethod.class);
- httpMethod = rm == null ? "" : rm.httpMethod();
+ httpMethod = rm == null ? "" : rm.method();
path = rm == null ? "" : rm.path();
if (path.isEmpty()) {
@@ -142,7 +142,7 @@ public class RemoteMethodMeta {
}
/**
- * Returns the value of the {@link RemoteMethod#httpMethod() @RemoteMethod.httpMethod()} annotation on this Java method.
+ * Returns the value of the {@link RemoteMethod#method() @RemoteMethod.httpMethod()} annotation on this Java method.
*
* @return The value of the annotation, never <jk>null</jk>.
*/
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodReturn.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodReturn.java
similarity index 96%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodReturn.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodReturn.java
index ca84ff6..c949751 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteMethodReturn.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteMethodReturn.java
@@ -10,10 +10,10 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static org.apache.juneau.internal.ClassUtils.*;
-import static org.apache.juneau.remote.RemoteReturn.*;
+import static org.apache.juneau.rest.client.remote.RemoteReturn.*;
import java.lang.reflect.*;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResource.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteResource.java
similarity index 77%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResource.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteResource.java
index 12b58ea..6e9afb6 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResource.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteResource.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@@ -18,11 +18,10 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
- * Identifies a remote proxy interface against a REST interface.
+ * Identifies a proxy against a REST interface.
*
* <h5 class='section'>See Also:</h5>
* <ul class='doctree'>
- * <li class='link'>{@doc juneau-rest-server.RemoteInterfaces}
* <li class='link'>{@doc juneau-rest-client.RemoteResources}
* </ul>
*/
@@ -33,16 +32,15 @@ import java.lang.annotation.*;
public @interface RemoteResource {
/**
- * The absolute or relative path of the REST service.
+ * REST service path.
*
* <p>
- * When a relative path is specified, it's relative to the root-url defined on the <code>RestClient</code> used
- * to instantiate the interface.
- *
- * <p>
- * When no path is specified, the path is assumed to be the class name (e.g.
- * <js>"http://localhost/root-url/org.foo.MyInterface"</js>)
+ * The possible values are:
+ * <ul class='spaced-list'>
+ * <li>An absolute URL.
+ * <li>A relative URL interpreted as relative to the root URL defined on the <code>RestClient</code>
+ * <li>No path interpreted as the class name (e.g. <js>"http://localhost/root-url/org.foo.MyInterface"</js>)
+ * </ul>
*/
String path() default "";
-
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResourceMeta.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteResourceMeta.java
similarity index 97%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResourceMeta.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteResourceMeta.java
index 2153e7a..eef8d56 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteResourceMeta.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteResourceMeta.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
import static org.apache.juneau.internal.ClassUtils.*;
import static org.apache.juneau.internal.CollectionUtils.*;
@@ -20,7 +20,7 @@ import java.lang.reflect.*;
import java.util.*;
/**
- * Contains the meta-data about a remote resource.
+ * Contains the meta-data about a REST proxy class.
*
* <p>
* Captures the information in {@link RemoteResource @RemoteResource} and {@link RemoteMethod @RemoteMethod} annotations for
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteReturn.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteReturn.java
similarity index 97%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteReturn.java
rename to juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteReturn.java
index 53490ec..b521878 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/remote/RemoteReturn.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/remote/RemoteReturn.java
@@ -10,7 +10,7 @@
// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
// * specific language governing permissions and limitations under the License. *
// ***************************************************************************************************************************
-package org.apache.juneau.remote;
+package org.apache.juneau.rest.client.remote;
/**
* Possible values for the {@link RemoteMethod#returns() @RemoteMethod.returns()} annotation.
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index bbdf432..0cfa99f 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -3257,7 +3257,7 @@ public final class RestContext extends BeanContext {
if (pathInfo.indexOf('/') != -1)
pathInfo = pathInfo.substring(pathInfo.lastIndexOf('/')+1);
pathInfo = urlDecode(pathInfo);
- RemoteMethodMeta rmm = rim.getMethodMetaByPath(pathInfo);
+ RemoteInterfaceMethod rmm = rim.getMethodMetaByPath(pathInfo);
if (rmm != null) {
Method m = rmm.getJavaMethod();
try {
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
index e7ca663..e4ca291 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestRequest.java
@@ -17,7 +17,6 @@ import static java.util.logging.Level.*;
import static org.apache.juneau.html.HtmlDocSerializer.*;
import static org.apache.juneau.httppart.HttpPartType.*;
import static org.apache.juneau.internal.IOUtils.*;
-import static org.apache.juneau.remote.RemoteReturn.*;
import static org.apache.juneau.serializer.Serializer.*;
import java.io.*;
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
index a5ad580..706896d 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/remote/RemoteInterfaceServlet.java
@@ -123,7 +123,7 @@ public abstract class RemoteInterfaceServlet extends BasicRestServlet {
) throws NotFound, Exception {
// Find the method.
- RemoteMethodMeta rmm = getMethods(javaInterface).get(javaMethod);
+ RemoteInterfaceMethod rmm = getMethods(javaInterface).get(javaMethod);
if (rmm == null)
throw new NotFound("Method not found");
@@ -201,7 +201,7 @@ public abstract class RemoteInterfaceServlet extends BasicRestServlet {
throw new NotFound("Service not found");
// Find the method.
- RemoteMethodMeta rmm = getMethods(javaInterface).get(javaMethod);
+ RemoteInterfaceMethod rmm = getMethods(javaInterface).get(javaMethod);
if (rmm == null)
throw new NotFound("Method not found");
@@ -216,7 +216,7 @@ public abstract class RemoteInterfaceServlet extends BasicRestServlet {
// Other methods
//--------------------------------------------------------------------------------
- private Map<String,RemoteMethodMeta> getMethods(String javaInterface) throws Exception {
+ private Map<String,RemoteInterfaceMethod> getMethods(String javaInterface) throws Exception {
return getInterfaceClass(javaInterface).getMethodsByPath();
}