-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Jakarta RESTful Web Services] Provide a configurable client #607
Comments
I'd suggest the following: Clients can be configured individually with some properties to define the desired preconfigured extensions. In order to avoid specifying a PID for the Client, which would make only one implementation possible, we also need to specify a mechanism for a client implementation to announce its configuration PID. As @timothyjward suggested, we can use the default Client we register to announce the PID to use. |
Proposal: The ClientBuilder service registers the service property
When the configuration exists and every filter in the filter list is satisfied a We would need to add a new Open questions:
|
Hi Tim, Regarding you question I think, it is described in It says: *"Note that even though, as explained in Binding in Client API, annotations are not used for binding in the Client API, they are still used to define priorities. Therefore, if a priority other than the default is required, the @priority annotation must be used for a filter or interceptor registered with the Client API. The order in which filters and interceptors that belong to the same priority class are executed is implementation dependent."* The To get a proper priority, I think we could sort
When same extension service matches multiple filters, the from my perspective it fullfilled the pre-defined requirements for this Client. So, in the end the extension would be registered only once to the Client. For me it seems your proposal would lead to a state, where a can client only registered, if all extension filter conditions are fulfilled. We would get a set of extension services, that needs to be ordered correctly and registered to the client. |
We should use the same rules as defined in https://docs.osgi.org/specification/osgi.cmpn/8.0.0/service.jaxrs.html#d0e134480 (which unsurprisingly match what you've just described). Referring to that section of the specification will eliminate the risk that we end up with more than one ordering. We will need to update the extensions section to:
|
Agree! And we have to define the JakartarsClientRuntime with its ClientDTO and FailedClientDTO as well the structure for the ExtensionDTO and FailedExtensionDTO. When do we start ;-) |
You have the pen on the 2.1 update ;) Are you also able to look at the Jakarta REST 4.0 release goals and check whether there is anything coming which will be breaking for us? |
Here is a presentation:
|
Oki, do I get an own branch? |
The correct branch name would be
|
As the REST resources are configurable with extension in the specification on the server side, it would be great to have a similar mechanism, that makes the client configurable.
In fact we already have the ClientBuilder service. I see it similary like an application, so we could also bind extensions (maybe with restrictions) to a ClientBuilder service instance with a given name.
An example could be registering MessageBodyReader/Writer to a client.
Regarding spec section: 151.8.1, I would like to discuss it again. At least I would like to open the spec in a way, that this way of configuration might be possible, whereas there must me a default "ClientBuilder", like out default application.
The text was updated successfully, but these errors were encountered: