diff options
author | Martin Ritchie <ritchiem@apache.org> | 2006-12-19 16:07:12 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2006-12-19 16:07:12 +0000 |
commit | 3085b02021e10aefd23de281f1ae71189a3c2ac8 (patch) | |
tree | 69f9c2cd527d3dadb907ff9374d448d1d53269e9 /java/client | |
parent | ee05152f188034e8b3cdc9e67c9e615febbf1d42 (diff) | |
download | qpid-python-3085b02021e10aefd23de281f1ae71189a3c2ac8.tar.gz |
QPID-216
BasicConsumeMethodHandler.java - Pulled the nolocal param from the method body and passed down channel to subscription.
SubscriptionFactory.java / AMQQueue.java/AMQChannel.java - passed the nolocal parameter through to the Subscription
ConnectionStartOkMethodHandler.java - Saved the client properties so the client identifier can be used in comparison with the publisher id to implement no_local
AMQMinaProtocolSession.java - added _clientProperties to store the sent client properties.
AMQProtocolSession.java - interface changes to get/set ClientProperties
ConcurrentSelectorDeliveryManager.java - only need to do hasInterset as this will take care of the hasFilters optimisation check.
SubscriptionImpl.java - Added code to do comparison of client ids to determin insterest in a given message.
SubscriptionSet.java - tidied up code to use hasInterest as this is where the nolocal is implemented.
ConnectionStartMethodHandler.java - Moved literal values to a ClientProperties.java enumeration and a QpidProperties.java values.
QpidConnectionMetaData.java - updated to get values from QpidProperties.java
MockProtocolSession.java - null implementation of new get/set methods
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@488712 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client')
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/QpidConnectionMetaData.java | 12 | ||||
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java | 11 |
2 files changed, 13 insertions, 10 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/QpidConnectionMetaData.java b/java/client/src/main/java/org/apache/qpid/client/QpidConnectionMetaData.java index 6ab7808110..d9e946c397 100644 --- a/java/client/src/main/java/org/apache/qpid/client/QpidConnectionMetaData.java +++ b/java/client/src/main/java/org/apache/qpid/client/QpidConnectionMetaData.java @@ -20,6 +20,8 @@ */ package org.apache.qpid.client; +import org.apache.qpid.common.QpidProperties; + import java.util.Enumeration; import javax.jms.ConnectionMetaData; @@ -29,7 +31,6 @@ public class QpidConnectionMetaData implements ConnectionMetaData { - QpidConnectionMetaData(AMQConnection conn) { } @@ -46,7 +47,7 @@ public class QpidConnectionMetaData implements ConnectionMetaData public String getJMSProviderName() throws JMSException { - return "Apache Qpid"; + return "Apache " + QpidProperties.getProductName(); } public String getJMSVersion() throws JMSException @@ -71,8 +72,8 @@ public class QpidConnectionMetaData implements ConnectionMetaData public String getProviderVersion() throws JMSException { - return "QPID (Client: [" + getClientVersion() + "] ; Broker [" + getBrokerVersion() + "] ; Protocol: [ " - + getProtocolVersion() + "] )"; + return QpidProperties.getProductName() + " (Client: [" + getClientVersion() + "] ; Broker [" + getBrokerVersion() + "] ; Protocol: [ " + + getProtocolVersion() + "] )"; } private String getProtocolVersion() @@ -89,8 +90,7 @@ public class QpidConnectionMetaData implements ConnectionMetaData public String getClientVersion() { - // TODO - get client build version from properties file or similar - return "<unknown>"; + return QpidProperties.getBuildVerision(); } diff --git a/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java b/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java index 9333df3fe4..f7b0cb5331 100644 --- a/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java +++ b/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java @@ -22,6 +22,8 @@ package org.apache.qpid.client.handler; import org.apache.log4j.Logger; import org.apache.qpid.AMQException; +import org.apache.qpid.common.ClientProperties; +import org.apache.qpid.common.QpidProperties; import org.apache.qpid.client.protocol.AMQMethodEvent; import org.apache.qpid.client.protocol.AMQProtocolSession; import org.apache.qpid.client.security.AMQCallbackHandler; @@ -119,10 +121,11 @@ public class ConnectionStartMethodHandler implements StateAwareMethodListener stateManager.changeState(AMQState.CONNECTION_NOT_TUNED); FieldTable clientProperties = FieldTableFactory.newFieldTable(); - clientProperties.put("instance", ps.getClientID()); - clientProperties.put("product", "Qpid"); - clientProperties.put("version", "1.0"); - clientProperties.put("platform", getFullSystemInfo()); + + clientProperties.put(ClientProperties.instance.toString(), ps.getClientID()); + clientProperties.put(ClientProperties.product.toString(), QpidProperties.getProductName()); + clientProperties.put(ClientProperties.version.toString(), QpidProperties.getReleaseVerision()); + clientProperties.put(ClientProperties.platform.toString(), getFullSystemInfo()); ps.writeFrame(ConnectionStartOkBody.createAMQFrame(evt.getChannelId(), clientProperties, mechanism, saslResponse, selectedLocale)); } |