protected <T> void registerRpcImplementation(T implementation,
Class<T> rpcInterfaceType) {
if (this instanceof RpcTarget) {
- rpcManagerMap.put(rpcInterfaceType, new ServerRpcManager<T>(
- (RpcTarget) this, implementation, rpcInterfaceType));
+ rpcManagerMap.put(rpcInterfaceType, new ServerRpcManager<T>(this,
+ implementation, rpcInterfaceType));
} else {
throw new RuntimeException(
"Cannot register an RPC implementation for a component that is not an RpcTarget");
import com.vaadin.terminal.gwt.client.ui.ButtonConnector;
import com.vaadin.terminal.gwt.client.ui.ButtonConnector.ButtonServerRpc;
import com.vaadin.terminal.gwt.client.ui.ButtonState;
-import com.vaadin.terminal.gwt.server.RpcTarget;
import com.vaadin.tools.ReflectTools;
import com.vaadin.ui.ClientWidget.LoadStyle;
import com.vaadin.ui.Component.Focusable;
@ClientWidget(value = ButtonConnector.class, loadStyle = LoadStyle.EAGER)
public class Button extends AbstractComponent implements
FieldEvents.BlurNotifier, FieldEvents.FocusNotifier, Focusable,
- Action.ShortcutNotifier, RpcTarget {
+ Action.ShortcutNotifier {
/**
* Creates a new push button.
import com.vaadin.terminal.Sizeable;
import com.vaadin.terminal.VariableOwner;
import com.vaadin.terminal.gwt.client.ComponentState;
+import com.vaadin.terminal.gwt.server.RpcTarget;
/**
* {@code Component} is the top-level interface that is and must be implemented
* @since 3.0
*/
public interface Component extends Paintable, VariableOwner, Sizeable,
- Serializable {
+ Serializable, RpcTarget {
/**
* Gets all user-defined CSS style names of a component. If the component