[
https://issues.apache.org/jira/browse/CXF-7147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15686557#comment-15686557
]
Sergey Beryozkin commented on CXF-7147:
---------------------------------------
This should be InvocationCallback<Void> ? I'm not really keen to start
loosening the proxy based code - it is possible to register multiple
InvocationCallbacks.
And supporting InvocationCallback<Response> seemed reasonable to me, what is
wrong with Response.class==callbackResponseClass ?
> Unable to register a generic _InvocationCallback<Object>_ when using the
> async proxy client API in JAX-RS
> ---------------------------------------------------------------------------------------------------------
>
> Key: CXF-7147
> URL: https://issues.apache.org/jira/browse/CXF-7147
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Reporter: John Poth
>
> It is currently impossible to register a generic _InvocationCallback<Object>_
> when invoking a method that returns void. This is due to a
> [check|https://github.com/apache/cxf/blob/master/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java#L797]
> that isn't satisfied when the _methodReturnType_ is void. I propose to add
> the following case
> {code}
> Object.class == callbackRespClass
> {code}
> And let the user handle the logic.
> I also propose to remove the condition
> {code}
> Response.class == callbackRespClass
> {code}
> Which will lead to failure when
> [casting|https://github.com/apache/cxf/blob/master/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/JaxrsClientCallback.java#L76]
> to a return type upon completion. I will provide a PR.
> [~sergey_beryozkin] sorry for the confusion.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)