[ 
https://issues.apache.org/jira/browse/FELIX-3963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13615481#comment-13615481
 ] 

Felix Meschberger commented on FELIX-3963:
------------------------------------------

In Rev. 1461705 implemented:

(1) InventoryPrinter only accepted as a service implementing the API (using 
ServiceFactory and dynamic import fixes static dependency issues better)
(2) ConfigurationPrinter supported through reflection for backwards 
compatibility (only public method in the service object class itself)
(3) Removing test case checking for proper reflection support of the 
InventoryPrinter (not needed any longer)
                
> Properly handle method resolution through reflection
> ----------------------------------------------------
>
>                 Key: FELIX-3963
>                 URL: https://issues.apache.org/jira/browse/FELIX-3963
>             Project: Felix
>          Issue Type: Bug
>          Components: Inventory
>    Affects Versions: inventory-1.0.0
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>             Fix For: inventory-1.0.0
>
>         Attachments: FELIX-3963-get.patch, FELIX-3963-search.patch
>
>
> An InventoryPrinter can be registered as an InventoryPrinter service 
> implementing the interface or it can be registered as service of any type as 
> long as a particular method signature is implemented (along with a number of 
> service registration properties required in both cases).
> The method signature is similar to the InventoryPrinter method is:
>    void print(String mode, PrinterWriter writer, boolean isZip)
> Previously the ConfigurationPrinter support in Web Console 4.0 supported the 
> same mechanism (with a slightly different signature, of course).
> The question is, how is the method found:
> (1) Use the service implementation class only to find any declared method. 
> This is how Web Console 4.0 supports ConfigurationPrinter discovery.
> (2) Use the service implementation class hierarchy to find a properly 
> declared method. This is the current intent of the InventoryPrinter.
> I think for the backwards compatibility use case (ConfigurationPrinter 
> signatures) we should implement the "implementation-class-only" variant (1).
> For new InventoryPrinter services we might consider variant (2). Yet I am not 
> sure, whether this really is usefull: Does such a one-off InventoryPrinter 
> service really support inheritance and method selection through the class 
> hierarchy ? In such cases implementing the InventoryPrinter might make more 
> sense.
> See also the discussion at http://felix.markmail.org/thread/rtkogb7uukyt6gky

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to