Changeset 54 for trunk/src/main/java/omq/common
- Timestamp:
- 06/21/13 12:42:25 (11 years ago)
- Location:
- trunk/src/main/java/omq/common
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/main/java/omq/common/broker/Broker.java
r53 r54 176 176 if (responseListener == null) { 177 177 responseListener = new ResponseListener(this); 178 responseListener.start(); 178 179 } 179 180 if (eventDispatcher == null) { 180 181 eventDispatcher = new EventDispatcher(this); 182 eventDispatcher.start(); 181 183 } 182 184 } … … 197 199 byte[] bytesResponse = serializer.serialize(wrapper); 198 200 channel.basicPublish(UID, "", null, bytesResponse); 199 200 // Log.saveLog("Server-Serialize", bytesResponse);201 201 } 202 202 -
trunk/src/main/java/omq/common/event/EventDispatcher.java
r53 r54 56 56 boolean durable = Boolean.parseBoolean(env.getProperty(ParameterQueue.DURABLE_QUEUES, "false")); 57 57 channel.queueDeclare(event_queue, durable, false, false, null); 58 logger.info("EventDispatcher creating queue: " + event_queue + ", durable: " + durable); 58 59 59 60 // Declare a new consumer … … 72 73 @Override 73 74 public void run() { 75 logger.info("EventDispatcher started"); 74 76 Delivery delivery; 75 77 Event event; … … 84 86 85 87 logger.info("Event received -> Topic: " + event.getTopic() + "CorrId: " + event.getCorrId()); 86 // Log.saveLog("Client-Deserialize", delivery.getBody());87 88 // long timeEnd = (new Date()).getTime();89 // Log.saveTimeSendRequestLog("Client-time-response",90 // event.getCorrId(), "Event!", timeEnd);91 88 92 89 // Dispatch it -
trunk/src/main/java/omq/common/message/Request.java
r44 r54 15 15 private boolean async = false; 16 16 17 private transient boolean multi; 17 18 private transient long timeout; 18 19 private transient int retries; … … 34 35 } 35 36 37 public Request(String id2, String method2, boolean b, Object[] params2, boolean multi2) { 38 // TODO Auto-generated constructor stub 39 } 40 36 41 public static Request newSyncRequest(String id, String method, Object[] params) { 37 42 return new Request(id, method, false, params); … … 45 50 } 46 51 47 public static Request newAsyncRequest(String id, String method, Object[] params ) {48 return new Request(id, method, true, params );52 public static Request newAsyncRequest(String id, String method, Object[] params, boolean multi) { 53 return new Request(id, method, true, params, multi); 49 54 } 50 55 … … 97 102 } 98 103 104 public boolean isMulti() { 105 return multi; 106 } 107 108 public void setMulti(boolean multi) { 109 this.multi = multi; 110 } 99 111 }
Note: See TracChangeset
for help on using the changeset viewer.