From 2e0d4f149a9b02e38fe32411d66b715714bd526a Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Fri, 9 Jan 2015 08:29:54 +0200 Subject: Add @BackgroundMessage annotation (#15373) Change-Id: Id5367b7b1ef4b7dbabfd58902ac6134222e641ba --- .../com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client-compiler/src') diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java index a1852d5b32..7efdf9db81 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java @@ -24,6 +24,7 @@ import com.google.gwt.core.ext.typeinfo.JClassType; import com.google.gwt.core.ext.typeinfo.JMethod; import com.google.gwt.core.ext.typeinfo.JType; import com.vaadin.client.metadata.TypeDataStore.MethodAttribute; +import com.vaadin.shared.annotations.BackgroundMessage; import com.vaadin.shared.annotations.Delayed; public class ServerRpcVisitor extends TypeVisitor { @@ -51,6 +52,11 @@ public class ServerRpcVisitor extends TypeVisitor { } } + if (method.getAnnotation(BackgroundMessage.class) != null) { + bundle.setMethodAttribute(type, method, + MethodAttribute.BACKGROUND_MESSAGE); + } + bundle.setNeedsParamTypes(type, method); JType[] parameterTypes = method.getParameterTypes(); -- cgit v1.2.3