You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Olaf Heyder (Jira)" <ji...@apache.org> on 2021/12/20 12:24:00 UTC

[jira] [Created] (CAMEL-17357) Make the AbstractInvocationHandler pass the method name to the exchange

Olaf Heyder created CAMEL-17357:
-----------------------------------

             Summary: Make the AbstractInvocationHandler pass the method name to the exchange
                 Key: CAMEL-17357
                 URL: https://issues.apache.org/jira/browse/CAMEL-17357
             Project: Camel
          Issue Type: Improvement
          Components: camel-bean
    Affects Versions: Future
            Reporter: Olaf Heyder


One purpose of the _CamelInvocationHandler_ (& Friends) is to translate a _java.lang.reflect.Method_ to  an _Exchange_ in order to eventually have the registered _Producer_ process that Exchange. Currently the name of the method gets lost when the Exchange is prepared.

It would be helpful if the Exchange contained the method name (as a String), e.g. as an appropiate header. In that case it would be possible to write a new Camel Component "{*}jsonrpc{*}". according to Camel's design concept, because the [jsonrpc protocol|https://www.jsonrpc.org/] requires the name of the method in the request message.

My suggestion is to attach the method name to the Exchange in method
{quote}protected Object invokeProxy(final Method method, final ExchangePattern pattern, Object[] args, boolean binding)
{quote}
 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)