public class ServerRpcManager<T extends ServerRpc> extends Object implements Serializable
RpcTarget (typically a ClientConnector) should have its
own instance of ServerRpcManager if it wants to receive RPC calls
from the client.| Modifier and Type | Class and Description |
|---|---|
static class |
ServerRpcManager.RpcInvocationException
Wrapper exception for exceptions which occur during invocation of an RPC
call.
|
| Constructor and Description |
|---|
ServerRpcManager(T implementation,
Class<T> rpcInterface)
Create a RPC manager for an RPC target.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
applyInvocation(ClientConnector target,
ServerRpcMethodInvocation invocation)
Invoke a method in a server side RPC target class.
|
void |
applyInvocation(ServerRpcMethodInvocation invocation)
Invoke a method in a server side RPC target class.
|
protected T |
getImplementation()
Returns the RPC interface implementation for the RPC target.
|
Class<T> |
getRpcInterface()
Returns the RPC interface type managed by this RPC manager instance.
|
static <T extends ServerRpc> |
getRpcProxy(ClientConnector connector,
Class<T> rpcInterface)
Returns an RPC proxy for a given client to server RPC interface for the
given component or extension.
|
public static void applyInvocation(ClientConnector target, ServerRpcMethodInvocation invocation) throws ServerRpcManager.RpcInvocationException
target - non-null target of the RPC callinvocation - method invocation to performServerRpcManager.RpcInvocationExceptionprotected T getImplementation()
public Class<T> getRpcInterface()
public void applyInvocation(ServerRpcMethodInvocation invocation) throws ServerRpcManager.RpcInvocationException
invocation - method invocation to performServerRpcManager.RpcInvocationExceptionpublic static <T extends ServerRpc> T getRpcProxy(ClientConnector connector, Class<T> rpcInterface)
connector - the connector for which to the RPC proxyrpcInterface - the RPC interface typeCopyright © 2020 Vaadin Ltd. All rights reserved.