Changeset 75 for trunk/src/main/java/omq
- Timestamp:
- 07/02/13 11:50:11 (11 years ago)
- Location:
- trunk/src/main/java/omq
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/client/proxy/MultiProxymq.java
r70 r75 4 4 import java.lang.reflect.Method; 5 5 import java.util.Properties; 6 7 import org.apache.log4j.Logger; 6 8 7 9 import com.rabbitmq.client.AMQP.BasicProperties; … … 20 22 */ 21 23 public class MultiProxymq implements InvocationHandler { 24 private static final Logger logger = Logger.getLogger(MultiProxymq.class.getName()); 22 25 private static final String multi = "multi#"; 23 26 … … 37 40 Properties env = broker.getEnvironment(); 38 41 replyQueueName = env.getProperty(ParameterQueue.RPC_REPLY_QUEUE); 39 exchange = multi + env.getProperty(ParameterQueue.RPC_EXCHANGE);42 exchange = multi + uid; 40 43 serializerType = env.getProperty(ParameterQueue.SERIALIZER_NAME, Serializer.JAVA); 41 44 } … … 55 58 broker.getChannel().basicPublish(exchange, routingkey, props, bytesRequest); 56 59 60 logger.debug("Proxymq: " + uid + " invokes " + methodName + ", corrID" + corrId + ", exchange: " + exchange + ", replyQueue: " + replyQueueName 61 + ", serializerType: " + serializerType + ", multi call: " + request.isMulti() + ", async call: " + request.isAsync()); 62 57 63 return null; 58 64 } -
trunk/src/main/java/omq/client/proxy/Proxymq.java
r72 r75 90 90 env = broker.getEnvironment(); 91 91 exchange = env.getProperty(ParameterQueue.RPC_EXCHANGE); 92 multiExchange = multi + exchange;92 multiExchange = multi + uid; 93 93 replyQueueName = env.getProperty(ParameterQueue.RPC_REPLY_QUEUE); 94 94 -
trunk/src/main/java/omq/common/message/Request.java
r58 r75 23 23 } 24 24 25 public Request(String id, String method, Object[] params) { 26 this.id = id; 27 this.method = method; 28 this.params = params; 29 } 30 31 private Request(String id, String method, boolean async, Object[] params) { 25 public Request(String id, String method, boolean async, Object[] params) { 32 26 this.id = id; 33 27 this.method = method; … … 36 30 } 37 31 38 p rivateRequest(String id, String method, boolean async, Object[] params, boolean multi) {32 public Request(String id, String method, boolean async, Object[] params, boolean multi) { 39 33 this.id = id; 40 34 this.method = method; -
trunk/src/main/java/omq/common/util/Serializers/GsonImp.java
r72 r75 33 33 String id = jsonObj.get("id").getAsString(); 34 34 String method = jsonObj.get("method").getAsString(); 35 boolean async = jsonObj.get("async").getAsBoolean(); 35 36 36 37 List<Class<?>> types = obj.getParams(method); … … 48 49 i++; 49 50 } 50 51 return new Request(id, method, arguments); 51 return new Request(id, method, async, arguments); 52 52 } catch (NullPointerException e) { 53 return new Request(id, method, null);53 return new Request(id, method, async, null); 54 54 } 55 55 } -
trunk/src/main/java/omq/server/RemoteObject.java
r74 r75 97 97 Delivery delivery = consumer.nextDelivery(); 98 98 99 logger.debug(UID + " has received a message ");99 logger.debug(UID + " has received a message, serializer: " + delivery.getProperties().getType()); 100 100 101 101 remoteWrapper.notifyDelivery(delivery); … … 219 219 String routingKey = UID; 220 220 // Multi info 221 String multiExchange = multi + exchange;221 String multiExchange = multi + UID; 222 222 223 223 boolean durable = Boolean.parseBoolean(env.getProperty(ParameterQueue.DURABLE_QUEUES, "false"));
Note: See TracChangeset
for help on using the changeset viewer.