Changeset 82 for trunk/src/main/java/omq/client/proxy/Proxymq.java
- Timestamp:
- 07/05/13 16:51:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/client/proxy/Proxymq.java
r77 r82 27 27 28 28 /** 29 * EvoProxy class. This class inherits from InvocationHandler and gives you a 30 * proxy with a server using an environment 29 * Proxymq class. This class inherits from InvocationHandler, for this reason 30 * each proxymq instance has an associated invocation handler. When a method is 31 * invoked on a proxymq instance, the method invocation is encoded and 32 * dispatched to the invoke method of its invocation handler. 31 33 * 32 34 * @author Sergi Toda <sergi.toda@estudiants.urv.cat> … … 66 68 67 69 /** 68 * EvoProxyConstructor.70 * Proxymq Constructor. 69 71 * 70 72 * This constructor uses an uid to know which object will call. It also uses … … 131 133 } 132 134 135 /** 136 * This method publishes a request 137 * 138 * @param request 139 * - this request contains which method and which params will be 140 * invoked in the server side. 141 * @param replyQueueName 142 * - this param indicates where the responseListener will be 143 * listen to. 144 * @throws Exception 145 */ 133 146 private void publishMessage(Request request, String replyQueueName) throws Exception { 134 147 String corrId = request.getId(); … … 158 171 } 159 172 173 /** 174 * This method publishes a synchronous request 175 * 176 * @param request 177 * - this request contains which method and which params will be 178 * invoked in the server side. 179 * @param type 180 * - indicates which return type we are waiting for 181 * @return serverResponse 182 * @throws Exception 183 */ 160 184 private Object publishSyncRequest(Request request, Class<?> type) throws Exception { 161 185 String corrId = request.getId(); … … 170 194 publishMessage(request, replyQueueName); 171 195 if (request.isMulti()) { 172 return getResults(corrId, 2, timeout, type);196 return getResults(corrId, request.getWait(), timeout, type); 173 197 } else { 174 198 return getResult(corrId, timeout, type); … … 183 207 } 184 208 209 /** 210 * This method creates a request using the annotations of the Remote 211 * interface 212 * 213 * @param method 214 * - method to invoke in the server side 215 * @param arguments 216 * - arguments of the method 217 * @return new Request 218 */ 185 219 private Request createRequest(Method method, Object[] arguments) { 186 220 String corrId = java.util.UUID.randomUUID().toString();
Note: See TracChangeset
for help on using the changeset viewer.