commit | d90a2a56c372996382389c9fb6d247a5e4c0e988 | [log] [tgz] |
---|---|---|
author | rinrinne <rinrin.ne@gmail.com> | Mon Jan 06 19:33:10 2014 +0900 |
committer | rinrinne <rinrin.ne@gmail.com> | Mon Jan 06 19:33:10 2014 +0900 |
tree | bb95611acb800392725583a61ecd73edc906d5dc | |
parent | 0a4929a998d3d063c3a6c60f4ba9dc0880330fd9 [diff] |
Add AMQPSession#isOpen
diff --git a/src/main/java/com/googlesource/gerrit/plugins/rabbitmq/AMQPSession.java b/src/main/java/com/googlesource/gerrit/plugins/rabbitmq/AMQPSession.java index 98eb583..ab45387 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/rabbitmq/AMQPSession.java +++ b/src/main/java/com/googlesource/gerrit/plugins/rabbitmq/AMQPSession.java
@@ -37,6 +37,13 @@ this.pluginName = pluginName; } + public boolean isOpen() { + if (connection != null) { + return true; + } + return false; + } + public void connect() { ConnectionFactory factory = new ConnectionFactory(); exchangeName = UUID.randomUUID().toString();