Skip to content

Provide a way to plug RpcDecoders #2864

Not planned
Not planned

Description

@denis-anisimov

#2849 introduces a basic RPC decoder functionality.
Also there are several hardcocded decoders implemented.

What needs to be done:

  • extract the SPI to its own package ( most likely com.vaadin.server.communication.rpc.decoder )
  • Provide a way to plug any custom decoder. It can be done in a standard way via ServletContainerInitializers ee e.g. (CustomElementRegistryInitializer ). May be it could be done via some another mechanisms (may be via the Instantiator , may be via the VaadinServiceInitListener. Choose the most appropriate way.
  • It should also work with Spring Boot as a Java app (ServletContainerInitializer is not called in this case). Make sure that it works for Spring. In case ServletContainerInitializer is not used make sure that it work for Spring boot app anyway (may it's more convenient to use ApplicationContext::getBeansByType(RpcDecoder.class) so that only @Component RpcDecoders work out of the box. The decision may be done based on this usecase).
  • load all plugged RpcDecoders and use them in the PublishedServerEventHandlerRpcHandler class: see the loadDecoders method.

Activity

  1. totally-not-ai commented on Dec 5, 2026

    @totally-not-ai
    Contributor

    Closing as not planned: there has been no demand for custom RPC decoders since this was filed, and the built-in decoders cover the supported argument types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions