- Timestamp:
- 10/19/13 13:20:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/supervisor/src/main/java/omq/client/proxy/Proxymq.java
r105 r107 47 47 48 48 private String reference; 49 private String UID; 49 50 private transient String exchange; 50 51 private transient String multiExchange; … … 72 73 * Proxymq Constructor. 73 74 * 74 * This constructor uses an reference to know which object will call. It also uses75 * Properties to set where to send the messages75 * This constructor uses an reference to know which object will call. It 76 * also uses Properties to set where to send the messages 76 77 * 77 78 * @param reference 78 * The reference represents the unique identifier of a remote object 79 * The reference represents the unique identifier of a remote 80 * object 79 81 * @param clazz 80 82 * It represents the real class of the remote object. With this … … 119 121 return getRef(); 120 122 } 123 if (methodName.equals("getUID")) { 124 return getUID(); 125 } 126 if (methodName.equals("setUID")) { 127 setUID((String) arguments[0]); 128 return null; 129 } 121 130 if (methodName.equals("equals")) { 122 131 if (arguments[0] instanceof Remote) { … … 168 177 } 169 178 179 // TODO look this carefully 180 String appId = UID == null ? reference : UID; 181 170 182 // Add the correlation ID and create a replyTo property 171 BasicProperties props = new BasicProperties.Builder().appId( reference).correlationId(corrId).replyTo(replyQueueName).type(serializerType)172 . deliveryMode(deliveryMode).build();183 BasicProperties props = new BasicProperties.Builder().appId(appId).correlationId(corrId).replyTo(replyQueueName) 184 .type(serializerType).deliveryMode(deliveryMode).build(); 173 185 174 186 // Publish the message 175 187 byte[] bytesRequest = serializer.serialize(serializerType, request); 176 188 broker.publishMessge(exchange, routingkey, props, bytesRequest); 177 logger.debug("Proxymq: " + reference + " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange + ", replyQueue: "178 + replyQueueName + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() + ", async call: " + request.isAsync()179 + ", delivery mode: " + deliveryMode);189 logger.debug("Proxymq: " + reference + " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange 190 + ", replyQueue: " + replyQueueName + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() 191 + ", async call: " + request.isAsync() + ", delivery mode: " + deliveryMode); 180 192 } 181 193 … … 362 374 } 363 375 376 @Override 377 public String getUID() { 378 return UID; 379 } 380 381 @Override 382 public void setUID(String uID) { 383 this.UID = uID; 384 } 385 364 386 }
Note: See TracChangeset
for help on using the changeset viewer.