juneau-rest-common
juneau-rest-common ships as two sibling Maven artifacts:
| Artifact | Contents | Apache HttpClient 4.5 dependency? |
|---|---|---|
juneau-rest-common | Transport-neutral types under org.apache.juneau.http.* and org.apache.juneau.http.remote.* — annotations, lazy header beans, remote-proxy meta, transport-neutral parts, and transport-neutral response messages. Used by every juneau-rest-* module. | No. Zero org.apache.httpcomponents:* on the classpath. |
juneau-rest-common-classic | Apache HttpClient 4.5–compatible facades under org.apache.juneau.http.classic.* — BasicHeader, BasicMediaTypeHeader, BasicHttpEntity, BasicHttpResponse, response/exception classes, HeaderList, etc. (~170 types). | Yes. Depends on juneau-rest-common and org.apache.httpcomponents:httpcore:4.4.16. |
For transport-neutral (NG) consumers, the canonical path is juneau-rest-common alone. For code that uses any org.apache.juneau.http.classic.* facade (e.g. BasicHeader, BasicHttpResponse, HeaderList), declare juneau-rest-common-classic alone — its POM declares juneau-rest-common as a normal compile-scope dependency (no <optional>, no reduced <scope>), so juneau-rest-common is already on the compile classpath transitively:
Pulls in juneau-rest-common transitively — no need to declare it separately.
| Maven | |
|---|---|
| Jar | juneau-rest-common-classic-10.0.0.jar |
| OSGi | org.apache.juneau.rest.server.common.classic_10.0.0.jar |
| Links | Maven Central · Javadocs · Source |
The aggregator artifacts (juneau-rest-server, juneau-rest-client-classic, juneau-rest-mock, juneau-microservice, juneau-rest-server-springboot, juneau-shaded-rest-server, juneau-shaded-rest-client, juneau-shaded-all, juneau-distrib) already pull both modules in transitively, so most callers don't need to declare either directly.
Contents/Features
The transport-neutral packages in juneau-rest-common:
HttpHeaders factory facade and shared utilities.Header interface dependency) and the EntityTag / EntityTags value types.@Remote / @RemoteOp / @RemoteGet / etc. proxy-interface annotations.HttpResponseMessage implementations) that mirror org.apache.http.HttpResponse semantics without the Apache HttpCore dependency.The Apache HttpClient 4.5–compatible facades in juneau-rest-common-classic:
HttpHeaders, HttpEntities, HttpResponses, HttpParts facades.org.apache.http.HttpEntity.org.apache.http.Header, plus HeaderList.org.apache.http.NameValuePair.org.apache.http.HttpResponse.These classic APIs extend the Apache HttpComponents 4.5 libraries and are consumed by juneau-rest-server, juneau-rest-client-classic, and juneau-rest-mock (classic flavor). The canonical NG REST client built on top of juneau-rest-common is fully decoupled from Apache HttpClient.
In This Section
3.2.1. Helper Classes
The org.apache.juneau.http.header package contains various convenience classes for creating
3.2.2. Annotations
The org.apache.juneau.http package contains annotations for defining both
3.2.3. HTTP Headers
The org.apache.juneau.http.header package contains transport-neutral header beans
3.2.4. HTTP Part Beans
The org.apache.juneau.http.part package contains implementations of
3.2.5. HTTP Entities and Resources
The org.apache.juneau.http.classic.entity package contains implementations of
3.2.6. HTTP Responses
The org.apache.juneau.http.response package contains predefined transport-neutral
3.2.7. Remote Proxy Interfaces
The org.apache.juneau.http.remote package contains the annotations used for defining