diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2007-01-25 21:00:22 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2007-01-25 21:00:22 +0000 |
| commit | 58f37a88b1cf6e6a3fa27d184238885a875cbb9f (patch) | |
| tree | aaad64c2879a64275a41097c58cfff609b603e8f /java/systests/src/test | |
| parent | 3335bfa2ddc5c83890b967792fb2442ee0680b83 (diff) | |
| download | qpid-python-58f37a88b1cf6e6a3fa27d184238885a875cbb9f.tar.gz | |
Added mechanism to track connection ids for logging and debugging purposes. Changed format of log/debug messages for RequestManager and ResponseManager.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@499968 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/systests/src/test')
| -rw-r--r-- | java/systests/src/test/java/org/apache/qpid/server/queue/MockProtocolSession.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/systests/src/test/java/org/apache/qpid/server/queue/MockProtocolSession.java b/java/systests/src/test/java/org/apache/qpid/server/queue/MockProtocolSession.java index 12ae522370..292ce6a834 100644 --- a/java/systests/src/test/java/org/apache/qpid/server/queue/MockProtocolSession.java +++ b/java/systests/src/test/java/org/apache/qpid/server/queue/MockProtocolSession.java @@ -35,6 +35,7 @@ import org.apache.qpid.server.store.MessageStore; import javax.security.sasl.SaslServer; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; /** * A protocol session that can be used for testing purposes. @@ -45,8 +46,13 @@ public class MockProtocolSession implements AMQProtocolSession private Map<Integer, AMQChannel> _channelMap = new HashMap<Integer, AMQChannel>(); + // Keeps a tally of connections for logging and debugging + private static AtomicInteger _ConnectionId; + static { _ConnectionId = new AtomicInteger(0); } + public MockProtocolSession(MessageStore messageStore) { + _ConnectionId.incrementAndGet(); _messageStore = messageStore; } @@ -221,4 +227,9 @@ public class MockProtocolSession implements AMQProtocolSession // TODO Auto-generated method stub } + + public int getConnectionId() + { + return _ConnectionId.get(); + } } |
