Class ServerRpcManager<T extends com.vaadin.shared.communication.ServerRpc>

  • All Implemented Interfaces:
    java.io.Serializable

    public class ServerRpcManager<T extends com.vaadin.shared.communication.ServerRpc>
    extends java.lang.Object
    implements java.io.Serializable
    Server side RPC manager that handles RPC calls coming from the client. Each RPC target (typically a ClientConnector) should have its own instance of ServerRpcManager if it wants to receive RPC calls from the client.
    Since:
    7.0
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ServerRpcManager.RpcInvocationException
      Wrapper exception for exceptions which occur during invocation of an RPC call.
    • Constructor Summary

      Constructors 
      Constructor Description
      ServerRpcManager​(T implementation, java.lang.Class<T> rpcInterface)
      Create a RPC manager for an RPC target.
    • Constructor Detail

      • ServerRpcManager

        public ServerRpcManager​(T implementation,
                                java.lang.Class<T> rpcInterface)
        Create a RPC manager for an RPC target.
        Parameters:
        implementation - RPC interface implementation for the target
        rpcInterface - RPC interface type
    • Method Detail

      • getImplementation

        protected T getImplementation()
        Returns the RPC interface implementation for the RPC target.
        Returns:
        RPC interface implementation
      • getRpcInterface

        public java.lang.Class<T> getRpcInterface()
        Returns the RPC interface type managed by this RPC manager instance.
        Returns:
        RPC interface type
      • getRpcProxy

        public static <T extends com.vaadin.shared.communication.ServerRpc> T getRpcProxy​(ClientConnector connector,
                                                                                          java.lang.Class<T> rpcInterface)
        Returns an RPC proxy for a given client to server RPC interface for the given component or extension.
        Parameters:
        connector - the connector for which to the RPC proxy
        rpcInterface - the RPC interface type
        Returns:
        a server RPC handler which can be used to invoke RPC methods
        Since:
        8.0