Skip to content

Commit feac061

Browse files
author
Vlad Ionescu
committed
adding getServerProperties to the Connection API
1 parent cbec775 commit feac061

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/com/rabbitmq/client/Connection.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
package com.rabbitmq.client;
3232

3333
import java.io.IOException;
34+
import java.util.Map;
3435

3536
/**
3637
* Public API: Interface to an AMQ connection. See the see the <a href="http://www.amqp.org/">spec</a> for details.
@@ -111,6 +112,12 @@ public interface Connection extends ShutdownNotifier { // rename to AMQPConnecti
111112
*/
112113
Address[] getKnownHosts();
113114

115+
/**
116+
* Retrieve the server properties.
117+
* @return a map of the server properties. This typically includes the product name and version of the server.
118+
*/
119+
Map<String, Object> getServerProperties();
120+
114121
/**
115122
* Create a new channel, using an internally allocated channel number.
116123
* @return a new channel descriptor, or null if none is available

src/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ public Address[] getKnownHosts() {
168168
return _knownHosts;
169169
}
170170

171+
/** {@inheritDoc} */
172+
public Map<String, Object> getServerProperties() {
173+
return _serverProperties;
174+
}
175+
171176
/**
172177
* Construct a new connection to a broker.
173178
* @param params the initialization parameters for a connection

0 commit comments

Comments
 (0)