Skip to content

Unable to effectively create decorator class for RestHighLevelClient due to final modifiers #31065

Closed
@mveitas

Description

Now that all methods on the RestHighLevelClient are marked as final, it is not possible to be able to effectively decorate the RestHighLevelClient class. The use case I have for decorating this class is to provide some high level metrics around the usage of the client from our application code.

One possibility would be to introduce some interface that the RestHighLevelClient implements would allow the class to be wrapped and ensure that all methods are accounted for if there is a addition or removal of a method.

This issue comes from a conversation from #27238 (comment) that changed all of the modifiers to be final.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions