- Timestamp:
- 10/16/13 16:19:02 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/supervisor/src/main/java/omq/client/proxy/Proxymq.java
r104 r105 46 46 private static final String multi = "multi#"; 47 47 48 private String uid;48 private String reference; 49 49 private transient String exchange; 50 50 private transient String multiExchange; … … 72 72 * Proxymq Constructor. 73 73 * 74 * This constructor uses an uidto know which object will call. It also uses74 * This constructor uses an reference to know which object will call. It also uses 75 75 * Properties to set where to send the messages 76 76 * 77 * @param uid78 * The uidrepresents the unique identifier of a remote object77 * @param reference 78 * The reference represents the unique identifier of a remote object 79 79 * @param clazz 80 80 * It represents the real class of the remote object. With this … … 85 85 * @throws Exception 86 86 */ 87 public Proxymq(String uid, Class<?> clazz, Broker broker) throws Exception {88 this. uid = uid;87 public Proxymq(String reference, Class<?> clazz, Broker broker) throws Exception { 88 this.reference = reference; 89 89 this.broker = broker; 90 90 rListener = broker.getResponseListener(); … … 95 95 env = broker.getEnvironment(); 96 96 exchange = env.getProperty(ParameterQueue.RPC_EXCHANGE, ""); 97 multiExchange = multi + uid;97 multiExchange = multi + reference; 98 98 replyQueueName = env.getProperty(ParameterQueue.RPC_REPLY_QUEUE); 99 99 … … 165 165 } else { 166 166 exchange = this.exchange; 167 routingkey = uid;167 routingkey = reference; 168 168 } 169 169 170 170 // Add the correlation ID and create a replyTo property 171 BasicProperties props = new BasicProperties.Builder().appId( uid).correlationId(corrId).replyTo(replyQueueName).type(serializerType)171 BasicProperties props = new BasicProperties.Builder().appId(reference).correlationId(corrId).replyTo(replyQueueName).type(serializerType) 172 172 .deliveryMode(deliveryMode).build(); 173 173 … … 175 175 byte[] bytesRequest = serializer.serialize(serializerType, request); 176 176 broker.publishMessge(exchange, routingkey, props, bytesRequest); 177 logger.debug("Proxymq: " + uid+ " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange + ", replyQueue: "177 logger.debug("Proxymq: " + reference + " invokes '" + request.getMethod() + "' , corrID: " + corrId + ", exchange: " + exchange + ", replyQueue: " 178 178 + replyQueueName + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() + ", async call: " + request.isAsync() 179 179 + ", delivery mode: " + deliveryMode); … … 359 359 @Override 360 360 public String getRef() { 361 return uid;361 return reference; 362 362 } 363 363
Note: See TracChangeset
for help on using the changeset viewer.