Changeset 10
- Timestamp:
- 05/16/13 13:13:14 (12 years ago)
- Location:
- trunk/objectmq/src/omq
- Files:
-
- 7 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/objectmq/src/omq/client/proxy/Proxymq.java
r9 r10 9 9 import java.util.Map; 10 10 import java.util.Properties; 11 import java.util.Vector;12 11 13 12 import omq.Remote; … … 159 158 String corrId = java.util.UUID.randomUUID().toString(); 160 159 String methodName = method.getName(); 161 Vector<Object> args = new Vector<Object>();162 163 if (arguments != null) {164 for (Object o : arguments) {165 args.add(o);166 }167 }168 160 169 161 // Since we need to know whether the method is async and if it has to -
trunk/objectmq/src/omq/common/util/Serializer.java
r9 r10 11 11 * 12 12 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> 13 * @author Guillermo Guerrero <guillermo.guerrero@estudiants.urv.cat>14 13 * 15 14 */ -
trunk/objectmq/src/omq/common/util/Serializers/GsonImp.java
r9 r10 36 36 List<Class<?>> types = obj.getParams(method); 37 37 38 JsonArray jsonArgs = (JsonArray) jsonObj.get("arguments"); 38 try { 39 JsonArray jsonArgs = (JsonArray) jsonObj.get("arguments"); 39 40 40 // TODO: if (jsonArgs.size() == types.size())41 int length = jsonArgs.size();42 Object[] arguments = new Object[length];41 // TODO: if (jsonArgs.size() == types.size()) 42 int length = jsonArgs.size(); 43 Object[] arguments = new Object[length]; 43 44 44 int i = 0; 45 for (JsonElement element : jsonArgs) { 46 arguments[i] = gson.fromJson(element, types.get(i)); 47 i++; 45 int i = 0; 46 for (JsonElement element : jsonArgs) { 47 arguments[i] = gson.fromJson(element, types.get(i)); 48 i++; 49 } 50 51 return new Request(id, method, arguments); 52 } catch (NullPointerException e) { 53 return new Request(id, method, null); 48 54 } 49 50 return new Request(id, method, arguments);51 55 } 52 56 -
trunk/objectmq/src/omq/server/remote/request/InvocationThread.java
r9 r10 54 54 killed = true; 55 55 } catch (Exception e) { 56 System.out.println("Error a l'Invocation Thread \nException: " + e); 56 57 e.printStackTrace(); 57 System.out.println("Error a l'Invocation Thread \nException: " + e);58 58 } 59 59 -
trunk/objectmq/src/omq/server/remote/request/RemoteObject.java
r9 r10 126 126 } 127 127 128 public Object invokeMethod(String methodName, Object[] arguments) throws Exception {128 public Object invokeMethod(String methodName, Object[] arguments) throws Exception { 129 129 130 130 // Get the specific method identified by methodName and its arguments … … 134 134 } 135 135 136 private Method loadMethod(String methodName, Object[] args) throws NoSuchMethodException {136 private Method loadMethod(String methodName, Object[] args) throws NoSuchMethodException { 137 137 Method m = null; 138 138 139 139 // Obtain the class reference 140 140 Class<?> clazz = this.getClass(); 141 Class<?>[] argArray = n ew Class<?>[args.length];141 Class<?>[] argArray = null; 142 142 143 for (int i = 0; i < args.length; i++) { 144 argArray[i] = args[i].getClass(); 143 if (args != null) { 144 argArray = new Class<?>[args.length]; 145 for (int i = 0; i < args.length; i++) { 146 argArray[i] = args[i].getClass(); 147 } 145 148 } 146 149
Note: See TracChangeset
for help on using the changeset viewer.