From: Artur Signell Date: Tue, 28 Feb 2012 16:14:03 +0000 (+0200) Subject: Renamed ClientToServerRpc -> ServerRPC X-Git-Tag: 7.0.0.alpha2~417 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d718b7ce765fb8173d1465c63ad3f36d980b7938;p=vaadin-framework.git Renamed ClientToServerRpc -> ServerRPC --- diff --git a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml index 2b8a7610c9..04f291d599 100644 --- a/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml +++ b/src/com/vaadin/terminal/gwt/DefaultWidgetSet.gwt.xml @@ -44,7 +44,7 @@ - + --> diff --git a/src/com/vaadin/terminal/gwt/client/communication/ClientToServerRpc.java b/src/com/vaadin/terminal/gwt/client/communication/ClientToServerRpc.java deleted file mode 100644 index a2b023962e..0000000000 --- a/src/com/vaadin/terminal/gwt/client/communication/ClientToServerRpc.java +++ /dev/null @@ -1,34 +0,0 @@ -/* -@VaadinApache2LicenseForJavaFiles@ - */ - -package com.vaadin.terminal.gwt.client.communication; - -import java.io.Serializable; - -import com.vaadin.terminal.gwt.client.ApplicationConnection; - -/** - * Interface to be extended by all client to server RPC interfaces. - * - * The nested interface InitializableClientToServerRpc The - * {@link #initRpc(String, ApplicationConnection)} method is created - * automatically by a GWT generator and must be called on the client side before - * generated implementations of the interface are used to perform RPC calls. - * - * @since 7.0 - */ -public interface ClientToServerRpc extends Serializable { - /** - * Initialization support for client to server RPC interfaces. - * - * This is in a separate interface instead of {@link ClientToServerRpc} - * because otherwise also server side proxies would have to implement the - * initialization method. - * - * @since 7.0 - */ - public interface InitializableClientToServerRpc extends ClientToServerRpc { - public void initRpc(String connectorId, ApplicationConnection client); - } -} diff --git a/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java b/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java new file mode 100644 index 0000000000..6f47283cf8 --- /dev/null +++ b/src/com/vaadin/terminal/gwt/client/communication/ServerRpc.java @@ -0,0 +1,34 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ + +package com.vaadin.terminal.gwt.client.communication; + +import java.io.Serializable; + +import com.vaadin.terminal.gwt.client.ApplicationConnection; + +/** + * Interface to be extended by all client to server RPC interfaces. + * + * The nested interface InitializableClientToServerRpc The + * {@link #initRpc(String, ApplicationConnection)} method is created + * automatically by a GWT generator and must be called on the client side before + * generated implementations of the interface are used to perform RPC calls. + * + * @since 7.0 + */ +public interface ServerRpc extends Serializable { + /** + * Initialization support for client to server RPC interfaces. + * + * This is in a separate interface instead of {@link ServerRpc} + * because otherwise also server side proxies would have to implement the + * initialization method. + * + * @since 7.0 + */ + public interface InitializableClientToServerRpc extends ServerRpc { + public void initRpc(String connectorId, ApplicationConnection client); + } +} diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java index 514bdb8e3d..f6419afecd 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java @@ -17,8 +17,8 @@ import com.vaadin.terminal.gwt.client.LayoutManager; import com.vaadin.terminal.gwt.client.TooltipInfo; import com.vaadin.terminal.gwt.client.UIDL; import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.communication.ClientToServerRpc; -import com.vaadin.terminal.gwt.client.communication.ClientToServerRpc.InitializableClientToServerRpc; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.communication.ServerRpc.InitializableClientToServerRpc; import com.vaadin.terminal.gwt.client.communication.SharedState; public abstract class AbstractComponentConnector extends AbstractConnector @@ -429,7 +429,7 @@ public abstract class AbstractComponentConnector extends AbstractConnector * The RPC instance to initialize. Must have been created using * GWT.create(). */ - protected T initRPC(T clientToServerRpc) { + protected T initRPC(T clientToServerRpc) { ((InitializableClientToServerRpc) clientToServerRpc).initRpc(getId(), getConnection()); return clientToServerRpc; diff --git a/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java b/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java index f0df09458a..62cc3a12d3 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/ButtonConnector.java @@ -11,7 +11,7 @@ import com.vaadin.terminal.gwt.client.ApplicationConnection; import com.vaadin.terminal.gwt.client.ComponentState; import com.vaadin.terminal.gwt.client.EventHelper; import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.communication.ClientToServerRpc; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; public class ButtonConnector extends AbstractComponentConnector { @@ -20,7 +20,7 @@ public class ButtonConnector extends AbstractComponentConnector { * * @since 7.0 */ - public interface ButtonClientToServerRpc extends ClientToServerRpc { + public interface ButtonClientToServerRpc extends ServerRpc { /** * Button click event. * diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java index 24b2999804..5c5ae10b1a 100644 --- a/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java +++ b/src/com/vaadin/terminal/gwt/widgetsetutils/RpcProxyGenerator.java @@ -18,15 +18,15 @@ import com.google.gwt.core.ext.typeinfo.TypeOracle; import com.google.gwt.user.rebind.ClassSourceFileComposerFactory; import com.google.gwt.user.rebind.SourceWriter; import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.communication.ClientToServerRpc; -import com.vaadin.terminal.gwt.client.communication.ClientToServerRpc.InitializableClientToServerRpc; +import com.vaadin.terminal.gwt.client.communication.ServerRpc; +import com.vaadin.terminal.gwt.client.communication.ServerRpc.InitializableClientToServerRpc; import com.vaadin.terminal.gwt.client.communication.MethodInvocation; /** * GWT generator that creates client side proxy classes for making RPC calls * from the client to the server. * - * GWT.create() calls for interfaces extending {@link ClientToServerRpc} are + * GWT.create() calls for interfaces extending {@link ServerRpc} are * affected, and a proxy implementation is created. Note that the init(...) * method of the proxy must be called before the proxy is used. *