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.NoLoadingIndicator;
import com.vaadin.shared.annotations.Delayed;
public class ServerRpcVisitor extends TypeVisitor {
}
}
- if (method.getAnnotation(BackgroundMessage.class) != null) {
+ if (method.getAnnotation(NoLoadingIndicator.class) != null) {
bundle.setMethodAttribute(type, method,
- MethodAttribute.BACKGROUND_MESSAGE);
+ MethodAttribute.NO_LOADING_INDICATOR);
}
bundle.setNeedsParamTypes(type, method);
parameterTypes = method.getParameterTypes();
showLoadingIndicator |= !TypeDataStore
- .isBackgroundMessage(method);
+ .isNoLoadingIndicator(method);
} catch (NoDataException e) {
throw new RuntimeException("No type data for "
+ invocation.toString(), e);
public class TypeDataStore {
public static enum MethodAttribute {
- DELAYED, LAST_ONLY, NO_LAYOUT, BACKGROUND_MESSAGE;
+ DELAYED, LAST_ONLY, NO_LAYOUT, NO_LOADING_INDICATOR;
}
private static final String CONSTRUCTOR_NAME = "!new";
return hasMethodAttribute(method, MethodAttribute.DELAYED);
}
- public static boolean isBackgroundMessage(Method method) {
- return hasMethodAttribute(method, MethodAttribute.BACKGROUND_MESSAGE);
+ public static boolean isNoLoadingIndicator(Method method) {
+ return hasMethodAttribute(method, MethodAttribute.NO_LOADING_INDICATOR);
}
private static boolean hasMethodAttribute(Method method,
+++ /dev/null
-/*
- * Copyright 2000-2014 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.shared.annotations;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Target;
-
-/**
- * Annotation used to mark server RPC methods that perform background tasks that
- * are transparent to the user. The framework will show a loading indicator when
- * sending requests for RPC methods that are not marked with this annotation.
- * The loading indicator is hidden once a response is received.
- *
- * @since
- * @author Vaadin Ltd
- */
-@Target(ElementType.METHOD)
-@Documented
-public @interface BackgroundMessage {
- // Just an empty marker annotation
-}
--- /dev/null
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to mark server RPC methods for which it isn't necessary to
+ * show the loading indicator. The framework will show a loading indicator when
+ * sending requests for RPC methods that are not marked with this annotation.
+ * The loading indicator is hidden once a response is received.
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+@Target(ElementType.METHOD)
+@Documented
+public @interface NoLoadingIndicator {
+ // Just an empty marker annotation
+}
package com.vaadin.shared.data;
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
import com.vaadin.shared.annotations.Delayed;
import com.vaadin.shared.communication.ServerRpc;
* @param cacheSize
* the number of cached rows
*/
- @BackgroundMessage
+ @NoLoadingIndicator
public void requestRows(int firstRowIndex, int numberOfRows,
int firstCachedRowIndex, int cacheSize);
*/
package com.vaadin.shared.ui.progressindicator;
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
import com.vaadin.shared.communication.ServerRpc;
public interface ProgressIndicatorServerRpc extends ServerRpc {
- @BackgroundMessage
+ @NoLoadingIndicator
public void poll();
}
*/
package com.vaadin.shared.ui.ui;
-import com.vaadin.shared.annotations.BackgroundMessage;
+import com.vaadin.shared.annotations.NoLoadingIndicator;
import com.vaadin.shared.annotations.Delayed;
import com.vaadin.shared.communication.ServerRpc;
import com.vaadin.shared.ui.ClickRpc;
@Delayed(lastOnly = true)
public void scroll(int scrollTop, int scrollLeft);
- @BackgroundMessage
+ @NoLoadingIndicator
@Delayed(lastOnly = true)
/*
* @Delayed just to get lastOnly semantics, sendPendingVariableChanges()