com.vaadin.terminal.gwt.server
Class ServerRpcManager<T>

java.lang.Object
  extended by com.vaadin.terminal.gwt.server.ServerRpcManager<T>
All Implemented Interfaces:
RpcManager, Serializable

public class ServerRpcManager<T>
extends Object
implements RpcManager

Server side RPC manager that handles RPC calls coming from the client. Each RpcTarget (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/interfaces inherited from interface com.vaadin.terminal.gwt.server.RpcManager
RpcManager.RpcInvocationException
 
Constructor Summary
ServerRpcManager(T implementation, Class<T> rpcInterface)
          Create a RPC manager for an RPC target.
 
Method Summary
static void applyInvocation(RpcTarget 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.
protected  Class<T> getRpcInterface()
          Returns the RPC interface type managed by this RPC manager instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerRpcManager

public ServerRpcManager(T implementation,
                        Class<T> rpcInterface)
Create a RPC manager for an RPC target.

Parameters:
target - RPC call target (normally a Connector)
implementation - RPC interface implementation for the target
rpcInterface - RPC interface type
Method Detail

applyInvocation

public static void applyInvocation(RpcTarget target,
                                   ServerRpcMethodInvocation invocation)
                            throws RpcManager.RpcInvocationException
Invoke a method in a server side RPC target class. This method is to be used by the RPC framework and unit testing tools only.

Parameters:
target - non-null target of the RPC call
invocation - method invocation to perform
Throws:
RpcInvocationException
RpcManager.RpcInvocationException

getImplementation

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

Returns:
RPC interface implementation

getRpcInterface

protected Class<T> getRpcInterface()
Returns the RPC interface type managed by this RPC manager instance.

Returns:
RPC interface type

applyInvocation

public void applyInvocation(ServerRpcMethodInvocation invocation)
                     throws RpcManager.RpcInvocationException
Invoke a method in a server side RPC target class. This method is to be used by the RPC framework and unit testing tools only.

Specified by:
applyInvocation in interface RpcManager
Parameters:
invocation - method invocation to perform
Throws:
RpcManager.RpcInvocationException


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.