com.opentable.components:otj-jaxrs-client-guice

This is the Base POM for open source OpenTable Maven projects.

Categories

Categories

GUI User Interface CLI Guice Application Layer Libs Dependency Injection
GroupId

GroupId

com.opentable.components
ArtifactId

ArtifactId

otj-jaxrs-client-guice
Last Version

Last Version

1.7.0
Release Date

Release Date

Type

Type

jar
Description

Description

This is the Base POM for open source OpenTable Maven projects.

Download otj-jaxrs-client-guice

How to add to project

<!-- https://jarcasting.com/artifacts/com.opentable.components/otj-jaxrs-client-guice/ -->
<dependency>
    <groupId>com.opentable.components</groupId>
    <artifactId>otj-jaxrs-client-guice</artifactId>
    <version>1.7.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.opentable.components/otj-jaxrs-client-guice/
implementation 'com.opentable.components:otj-jaxrs-client-guice:1.7.0'
// https://jarcasting.com/artifacts/com.opentable.components/otj-jaxrs-client-guice/
implementation ("com.opentable.components:otj-jaxrs-client-guice:1.7.0")
'com.opentable.components:otj-jaxrs-client-guice:jar:1.7.0'
<dependency org="com.opentable.components" name="otj-jaxrs-client-guice" rev="1.7.0">
  <artifact name="otj-jaxrs-client-guice" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.opentable.components', module='otj-jaxrs-client-guice', version='1.7.0')
)
libraryDependencies += "com.opentable.components" % "otj-jaxrs-client-guice" % "1.7.0"
[com.opentable.components/otj-jaxrs-client-guice "1.7.0"]

Dependencies

compile (10)

Group / Artifact Type Version
com.opentable.components : otj-jaxrs-shared jar 1.7.0
com.opentable.components : otj-jaxrs-client jar 1.7.0
com.opentable.components : otj-lifecycle jar 1.2.1
javax.inject : javax.inject jar 1
com.google.inject : guice jar 4.0
com.google.inject.extensions : guice-multibindings jar 4.0
javax.ws.rs : javax.ws.rs-api jar 2.0
com.fasterxml.jackson.core : jackson-databind jar 2.4.6
com.fasterxml.jackson.jaxrs : jackson-jaxrs-json-provider jar 2.4.6
com.google.guava : guava jar 18.0

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.easymock : easymock jar 3.1
org.slf4j : slf4j-simple jar 1.7.12

Project Modules

There are no modules declared in this project.

OpenTable JAX-RS Component

Build Status

Notes

  • otj-jaxrs-exception is considered deprecated. Please do not use it in newer projects (although we will continue to support it indefinitely)

Component Charter

  • Provides bindings from a JAX-RS Client provider into the Spring, configuration, and otj-server ecosystem.
    • Can swap out Jersey for RESTEasy
    • Register Features with Spring DI environment
  • Brings in otj-jackson support for directly reading and writing JSON.

Component Level

Installation

  • Add the otj-jaxrs-client and otj-jaxrs-shared maven dependencies
  • Choose an engine (otj-jaxrs-clientfactory-resteasy, otj-jaxrs-clientfactory-jersey, otj-jaxrs-clientfactory-resteasy-apache).

Normally otj-jaxrs-clientfactory-resteasy (which is RestEasy + Jetty client) is used in otj-server. This is still the recommended choice.

otj-clientfactory-jersey is considered legacy and not regularly tested. We don't recommend it. Let us know if you need it.

otj-clientfactory-resteasy-apache - Is RestEasy + Apache Http Engine. We don't recommend this currently, but we are keeping this around, as Apache has a few options Jetty doesn't support.

Configuration

The JAX-RS client configuration is managed through your application properties.

See JaxRSClientConfig for the list of options. Note many options are only supported by specific engines. It's a bit of a mess, frankly, which eventually we'll clean up.

Options are configured using the provided client name and the corresponding jaxrs configuration:

jaxrs.client.${clientName}.option=value

For the client name "availability" the corresponding connection pool configuration option will be:

jaxrs.client.availability.connectionPool=50

For configuration options that take time, use the ISO 8601 Durations format (https://en.wikipedia.org/wiki/ISO_8601).

Example: Configure the connection timeout to 5s

jaxrs.client.availability.connectTimeout=PT5s

For values smaller than seconds you may use decimals per the ISO 8601 format:

"The smallest value used may also have a decimal fraction, as in "P0.5Y" to indicate half a year. This decimal fraction may be specified with either a comma or a full stop, as in "P0,5Y" or "P0.5Y"."

To configure a connection timeout of 150ms:

jaxrs.client.availability.connectTimeout=PT0.150s

For a list of configurable options see client/src/main/java/com/opentable/jaxrs/JaxRsClientConfig.java


Copyright (C) 2019 OpenTable, Inc.

com.opentable.components

OpenTable

Restaurant Reservations

Versions

Version
1.7.0
1.6.0
1.5.2
1.5.1
1.5.0