You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/12/07 19:25:46 UTC

[1/2] git commit: Add Void class for AsyncMethod to indicate void return

Updated Branches:
  refs/heads/javelin 6fd6b38b4 -> 9375ea0bb


Add Void class for AsyncMethod to indicate void return


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/9375ea0b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/9375ea0b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/9375ea0b

Branch: refs/heads/javelin
Commit: 9375ea0bbd3bb134812e34ebc7da9a10c7a0f796
Parents: e78ccf1
Author: Kelven Yang <ke...@gmail.com>
Authored: Thu Dec 6 17:46:13 2012 -0800
Committer: Kelven Yang <ke...@gmail.com>
Committed: Thu Dec 6 17:46:13 2012 -0800

----------------------------------------------------------------------
 .../messaging/AsyncCallbackDispatcher.java         |    1 +
 .../cloudstack/framework/messaging/Void.java       |   27 +++++++++++++++
 .../framework/messaging/AsyncSampleCallee.java     |    2 +-
 3 files changed, 29 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9375ea0b/framework/ipc/src/org/apache/cloudstack/framework/messaging/AsyncCallbackDispatcher.java
----------------------------------------------------------------------
diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messaging/AsyncCallbackDispatcher.java b/framework/ipc/src/org/apache/cloudstack/framework/messaging/AsyncCallbackDispatcher.java
index 5f09c13..958a765 100644
--- a/framework/ipc/src/org/apache/cloudstack/framework/messaging/AsyncCallbackDispatcher.java
+++ b/framework/ipc/src/org/apache/cloudstack/framework/messaging/AsyncCallbackDispatcher.java
@@ -24,6 +24,7 @@ import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.Map;
 
+@SuppressWarnings("rawtypes")
 public class AsyncCallbackDispatcher implements AsyncCompletionCallback {
 	private static Map<Class<?>, Method> s_handlerCache = new HashMap<Class<?>, Method>();
 	

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9375ea0b/framework/ipc/src/org/apache/cloudstack/framework/messaging/Void.java
----------------------------------------------------------------------
diff --git a/framework/ipc/src/org/apache/cloudstack/framework/messaging/Void.java b/framework/ipc/src/org/apache/cloudstack/framework/messaging/Void.java
new file mode 100644
index 0000000..8eb4dff
--- /dev/null
+++ b/framework/ipc/src/org/apache/cloudstack/framework/messaging/Void.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.cloudstack.framework.messaging;
+
+/**
+ * This is place-holder class to help AsyncMethod to indicate void return value
+ * public void AsyncMethod(Object realParam, AsyncCompletionCallback<Void> callback) {
+ *
+ */
+public class Void {
+}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9375ea0b/framework/ipc/test/org/apache/cloudstack/framework/messaging/AsyncSampleCallee.java
----------------------------------------------------------------------
diff --git a/framework/ipc/test/org/apache/cloudstack/framework/messaging/AsyncSampleCallee.java b/framework/ipc/test/org/apache/cloudstack/framework/messaging/AsyncSampleCallee.java
index 1c9cd20..62d03f8 100644
--- a/framework/ipc/test/org/apache/cloudstack/framework/messaging/AsyncSampleCallee.java
+++ b/framework/ipc/test/org/apache/cloudstack/framework/messaging/AsyncSampleCallee.java
@@ -21,7 +21,7 @@ package org.apache.cloudstack.framework.messaging;
 public class AsyncSampleCallee {
 	AsyncSampleCallee _driver;
 
-	public <T> void createVolume(Object realParam, AsyncCompletionCallback<TestVolume> callback) {
+	public void createVolume(Object realParam, AsyncCompletionCallback<TestVolume> callback) {
 		
 		// async executed logic
 		{