[ https://issues.apache.org/jira/browse/JCLOUDS-400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13844503#comment-13844503
]
Everett Toews commented on JCLOUDS-400:
---------------------------------------
When you have a common header in all of the Callee APIs, that header has to be a param in
each and every method of the API. It's a lot of duplicated code and there are more chances
for clients to make a mistake.
This changes allows you to factor out that common header into the Caller API. Now it's in
one place and there is only one chance to make a mistake. :P
> Allow the HeaderParam annotation to be used in a Caller. Produces/Consumes will propagate.
> ------------------------------------------------------------------------------------------
>
> Key: JCLOUDS-400
> URL: https://issues.apache.org/jira/browse/JCLOUDS-400
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-core
> Reporter: Everett Toews
> Assignee: Everett Toews
> Priority: Minor
> Fix For: 1.7.0
>
>
> Allow jclouds to factor out common headers into the Caller so they don't
> have to be repeated in the Callee.
> e.g.
> @Delegate
> @Path("/queues/{name}")
> ClaimApi getClaimApiForZoneAndQueue(
> @EndpointParam(parser = ZoneToEndpoint.class) @Nullable String zone,
> @HeaderParam("Client-ID") UUID clientId,
> @PathParam("name") String name);
> The Produces/Consumes annotations (Content-Type/Accept headers) will also propagate from
the Caller to the Callee.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)
|