jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1769407 - /jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/MessageAdmin.java
Date Sat, 12 Nov 2016 20:25:06 GMT
Author: pmouawad
Date: Sat Nov 12 20:25:06 2016
New Revision: 1769407

URL: http://svn.apache.org/viewvc?rev=1769407&view=rev
Log:
Avoid 2 classes per file

Modified:
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/MessageAdmin.java

Modified: jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/MessageAdmin.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/MessageAdmin.java?rev=1769407&r1=1769406&r2=1769407&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/MessageAdmin.java
(original)
+++ jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/MessageAdmin.java
Sat Nov 12 20:25:06 2016
@@ -32,6 +32,47 @@ import org.apache.log.Logger;
  *
  */
 public class MessageAdmin {
+
+    private static final class PlaceHolder {
+        private final CountDownLatch latch;
+        private final Object request;
+    
+        private Object reply;
+    
+        PlaceHolder(Object original, CountDownLatch latch) {
+            this.request = original;
+            this.latch = latch;
+        }
+    
+        void setReply(Object reply) {
+            this.reply = reply;
+        }
+    
+        public Object getReply() {
+            return reply;
+        }
+    
+        public Object getRequest() {
+            return request;
+        }
+    
+        boolean hasReply() {
+            return reply != null;
+        }
+    
+        @Override
+        public String toString() {
+            return "request=" + request + ", reply=" + reply;
+        }
+    
+        /**
+         * @return the latch
+         */
+        public CountDownLatch getLatch() {
+            return latch;
+        }
+    }
+
     private static final MessageAdmin SINGLETON = new MessageAdmin();
 
     private final Map<String, PlaceHolder> table = new ConcurrentHashMap<>();
@@ -120,43 +161,3 @@ public class MessageAdmin {
         return holder==null ? null : (Message) holder.getReply();
     }
 }
-
-class PlaceHolder {
-    private final CountDownLatch latch;
-    private final Object request;
-
-    private Object reply;
-
-    PlaceHolder(Object original, CountDownLatch latch) {
-        this.request = original;
-        this.latch = latch;
-    }
-
-    void setReply(Object reply) {
-        this.reply = reply;
-    }
-
-    public Object getReply() {
-        return reply;
-    }
-
-    public Object getRequest() {
-        return request;
-    }
-
-    boolean hasReply() {
-        return reply != null;
-    }
-
-    @Override
-    public String toString() {
-        return "request=" + request + ", reply=" + reply;
-    }
-
-    /**
-     * @return the latch
-     */
-    public CountDownLatch getLatch() {
-        return latch;
-    }
-}



Mime
View raw message