eclipse-ee4j / eclipse-ee4j/jersey

Repackage InMemoryConnector to allow internal JVM client

Open
#3,237 3 comments 0 reactions 0 assignees View on GitHub
Component: connectors Priority: Minor Type: Improvement
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

Simplify the ability to create a client that can make an internal JVM call through Jersey to an endpoint, i.e. no new http request going out and back in to the server.

The InMemoryConnector in the test-framework does make it possible to create such an internal client:
Client client = ClientBuilder.newClient(
new ClientConfig().connectorProvider(
new InMemoryConnector.Provider(baseUri, new
ApplicationHandler(resourceConfig))));

However this requires repackaging the InMemoryConnector class to make it available for instantiating.
We currently have two use cases for such a client. One is supporting embedded resources and the other is an existing API that responds to the client with a mash up of various resources.

I would suggest InMemoryConnector should be repackaged under the jersey-client jar and made available.
#### Environment
Any
#### Affected Versions
[2.21]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.