You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/08/25 17:25:03 UTC
svn commit: r1620344 [1/4] - in /qpid/branches/0.30/qpid/java: ./
bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/
bdbstore/src/main/java/resources/js/qpid/management/virtualhost/store/
bdbstore/src/main/java/resources/virtualhos...
Author: rgodfrey
Date: Mon Aug 25 15:25:00 2014
New Revision: 1620344
URL: http://svn.apache.org/r1620344
Log:
Merging from trunk r1618230:1618433 in the Java tree
Added:
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java
- copied unchanged from r1618414, qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPort.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPortImpl.java
- copied unchanged from r1618414, qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/RmiPortImpl.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestChildCategory.java
- copied unchanged from r1618433, qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestChildCategory.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestChildCategoryImpl.java
- copied unchanged from r1618433, qpid/trunk/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestChildCategoryImpl.java
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/metadata.js
- copied unchanged from r1618373, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/metadata.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js
- copied unchanged from r1618373, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/strings.html
- copied unchanged from r1618373, qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/strings.html
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/util/GZIPUtils.java
- copied unchanged from r1618375, qpid/trunk/qpid/java/common/src/main/java/org/apache/qpid/util/GZIPUtils.java
qpid/branches/0.30/qpid/java/common/src/test/java/org/apache/qpid/util/GZIPUtilsTest.java
- copied unchanged from r1618375, qpid/trunk/qpid/java/common/src/test/java/org/apache/qpid/util/GZIPUtilsTest.java
qpid/branches/0.30/qpid/java/systests/src/test/java/org/apache/qpid/systest/MessageCompressionTest.java
- copied unchanged from r1618375, qpid/trunk/qpid/java/systests/src/test/java/org/apache/qpid/systest/MessageCompressionTest.java
Removed:
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/store/
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhost/store/
qpid/branches/0.30/qpid/java/bdbstore/src/main/resources/
qpid/branches/0.30/qpid/java/bdbstore/systests/src/main/
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/configuration/store/factory/
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/sasl/amqplain/
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/configuration/
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/security/auth/sasl/amqplain/
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/amqp-msg-conv-0-10-to-1-0/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-0-10/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/amqp-msg-conv-0-8-to-1-0/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/store/
qpid/branches/0.30/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhost/
qpid/branches/0.30/qpid/java/broker-plugins/derby-store/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/virtualhost/
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-provider-bone/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-store/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/management-amqp/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/standard/
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/management-jmx/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/store/
qpid/branches/0.30/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/store/
qpid/branches/0.30/qpid/java/broker-plugins/memory-store/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/websocket/src/main/resources/
qpid/branches/0.30/qpid/java/broker-plugins/websocket/src/test/
qpid/branches/0.30/qpid/java/client-plugins/
qpid/branches/0.30/qpid/java/jca/src/main/resources/
qpid/branches/0.30/qpid/java/qpid-perftests-systests/src/main/
qpid/branches/0.30/qpid/java/systests/src/test/java/org/apache/qpid/server/util/
Modified:
qpid/branches/0.30/qpid/java/ (props changed)
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/consumer/ConsumerTarget.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredAutomatedAttribute.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedAttribute.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Protocol.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPort.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPort.java
qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueConsumerImpl.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/consumer/MockConsumer.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfigureObjectTypeRegistryTest.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategory.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategoryImpl.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestModel.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategory.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategoryImpl.java
qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolEngine.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQProtocolSession.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ClientDeliveryMethod.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/ConsumerTarget_0_8.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/handler/BasicGetMethodHandler.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverter.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/output/ProtocolOutputConverterImpl.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ConsumerTarget_1_0.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_to_1_0.java
qpid/branches/0.30/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
qpid/branches/0.30/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
qpid/branches/0.30/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/add.html
qpid/branches/0.30/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/add.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MessageServlet.java
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/MetaDataServlet.java
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/addBinding.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/addExchange.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/addQueue.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNodeAndVirtualHost.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/index.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addBinding.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addGroupProvider.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addQueue.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementhttp.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/plugin/managementjmx.js
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html
qpid/branches/0.30/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html
qpid/branches/0.30/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/handler/CloseWhenNoRouteSettingsHelper.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
qpid/branches/0.30/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionURL.java
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/properties/ConnectionStartProperties.java
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
qpid/branches/0.30/qpid/java/common/src/main/java/org/apache/qpid/util/ByteBufferInputStream.java
qpid/branches/0.30/qpid/java/pom.xml
Propchange: qpid/branches/0.30/qpid/java/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java:r1618230,1618234,1618287,1618373,1618375,1618414,1618418,1618422,1618433
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js Mon Aug 25 15:25:00 2014
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-define(["qpid/common/util", "dijit/registry", "dojo/_base/window", "dojo/domReady!"],
- function (util, registry, win)
+define(["qpid/common/util", "qpid/common/metadata", "dijit/registry", "dojo/_base/window", "dojo/domReady!"],
+ function (util, metadata, registry, win)
{
- var fieldNames = ["storeUnderfullSize", "storeOverfullSize"];
+ var fieldNames = ["storeUnderfullSize", "storeOverfullSize",
+ "localTransactionSynchronizationPolicy", "remoteTransactionSynchronizationPolicy"];
return {
show: function(data)
{
@@ -28,17 +29,6 @@ define(["qpid/common/util", "dijit/regis
registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
- var widget = registry.byId("editVirtualHost.localTransactionSynchronizationPolicy-" + data.data["localTransactionSynchronizationPolicy"]);
- if (widget)
- {
- widget.set("checked", true);
- }
- widget = registry.byId("editVirtualHost.remoteTransactionSynchronizationPolicy-" + data.data["remoteTransactionSynchronizationPolicy"]);
- if (widget)
- {
- widget.set("checked", true);
- }
-
var that = this;
this.permittedNodes = registry.byId("editVirtualHost.permittedNodes");
this.permittedNodesList = registry.byId("editVirtualHost.permittedNodesList");
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js Mon Aug 25 15:25:00 2014
@@ -47,8 +47,8 @@ define(["qpid/common/util", "dojo/query"
}
this["permittedNodes"].innerHTML = permittedNodesMarkup ;
- var localSyncPolicy = data[localTransactionSynchronizationPolicy].toLowerCase();
- var remoteSyncPolicy = data[remoteTransactionSynchronizationPolicy].toLowerCase();
+ var localSyncPolicy = data[localTransactionSynchronizationPolicy] ? data[localTransactionSynchronizationPolicy].toLowerCase() : "";
+ var remoteSyncPolicy = data[remoteTransactionSynchronizationPolicy] ? data[remoteTransactionSynchronizationPolicy].toLowerCase() : "";
for(var i=0; i<this[localTransactionSynchronizationPolicy].children.length;i++)
{
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html Mon Aug 25 15:25:00 2014
@@ -27,7 +27,8 @@
name: 'storeOverfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"/>
+ title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
+ promptMessage: 'Ceiling (in bytes) at which store will begin to throttle sessions producing messages'"/>
</div>
</div>
<div class="clear">
@@ -39,7 +40,8 @@
name: 'storeUnderfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"/>
+ title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
+ promptMessage: 'Floor (in bytes) at which store will cease to throttle sessions producing messages'"/>
</div>
</div>
@@ -74,8 +76,9 @@
data-dojo-props="
name: 'permittedNode',
placeHolder: 'host:port',
- title: 'Enter address',
- intermediateChanges: true" />
+ intermediateChanges: true,
+ title: 'Enter address of node to be permitted into the group',
+ promptMessage: 'Address of node to be permitted into the group'" />
</div>
<button data-dojo-type="dijit/form/Button" id="editVirtualHost.permittedNodeAdd" data-dojo-props="label: '+'"></button>
</div>
@@ -86,42 +89,30 @@
<div class="formBox clear">
<fieldset>
- <legend>High availability durability</legend>
- <div>
- <div class="haOptionLabel">Master transaction sync policy</div>
+ <legend>High availability durability</legend>
<div>
- <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-SYNC"/>
- <label>SYNC (the transaction will be written and synchronized to the disk; highest durability)</label>
- </div>
-
- <div>
- <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="WRITE_NO_SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-WRITE_NO_SYNC"/>
- <label>WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</label>
- </div>
+ <div class="haOptionLabel">Master transaction sync policy</div>
- <div>
- <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="NO_SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-NO_SYNC"/>
- <label>NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</label>
- </div>
- </div>
- <br/>
- <div>
- <div class="haOptionLabel">Replica transaction sync policy</div>
- <div>
- <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="SYNC" id="editVirtualHost.remoteTransactionSynchronizationPolicy-SYNC"/>
- <label>SYNC (the transaction will be written and synchronized to the disk; highest durability)</label>
+ <select id="editVirtualHost.localTransactionSynchronizationPolicy"
+ name="localTransactionSynchronizationPolicy"
+ data-dojo-type="dojox/form/CheckedMultiSelect">
+ <option value="SYNC">SYNC (the transaction will be written and synchronized to the disk; highest durability)</option>
+ <option value="WRITE_NO_SYNC">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</option>
+ <option value="NO_SYNC">NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</option>
+ </select>
+ </div>
+ <br/>
+ <div>
+ <div class="haOptionLabel">Replica transaction sync policy</div>
+
+ <select id="editVirtualHost.remoteTransactionSynchronizationPolicy"
+ name="remoteTransactionSynchronizationPolicy"
+ data-dojo-type="dojox/form/CheckedMultiSelect">
+ <option value="SYNC">SYNC (the transaction will be written and synchronized to the disk; highest durability)</option>
+ <option value="WRITE_NO_SYNC">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</option>
+ <option value="NO_SYNC">NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</option>
+ </select>
</div>
-
- <div>
- <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="WRITE_NO_SYNC" id="editVirtualHost.remoteTransactionSynchronizationPolicy-WRITE_NO_SYNC"/>
- <label>WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</label>
- </div>
-
- <div>
- <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="NO_SYNC" id="editVirtualHost.remoteTransactionSynchronizationPolicy-NO_SYNC"/>
- <label>NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</label>
- </div>
- </div>
</fieldset>
</div>
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html Mon Aug 25 15:25:00 2014
@@ -27,7 +27,8 @@
data-dojo-props="
name: 'storePath',
placeHolder: 'path/to/store',
- title: 'Enter store path'" />
+ title: 'Enter store path',
+ promptMessage: 'File system location for the configuration store.'"/>
</div>
</div>
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html Mon Aug 25 15:25:00 2014
@@ -31,7 +31,9 @@
data-dojo-props="store:groupStore,
searchAttr:'name',
required: true,
- placeHolder: 'choose new or existing'"
+ placeHolder: 'choose new or existing',
+ promptMessage: 'Create a new group or join to an existing one',
+ title: 'Choose whether to create a new group or join to an existing one'"
name="group"
id="addVirtualHostNode.group" />
</div>
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html Mon Aug 25 15:25:00 2014
@@ -30,8 +30,8 @@
name: 'groupName',
placeHolder: 'group name',
required: true,
- missingMessage: 'The group name must be supplied',
- title: 'Enter the group name'" />
+ promptMessage: 'Name of the existing group',
+ title: 'Enter name of the existing group'," />
</div>
</div>
<div class="clear">
@@ -43,8 +43,8 @@
name: 'helperNodeName',
placeHolder: 'node name from group',
required: true,
- missingMessage: 'A node name must be supplied',
- title: 'Enter a node name'" />
+ promptMessage: 'Node name of an existing group member.',
+ title: 'Enter node name of an existing member of the group'" />
</div>
</div>
<div class="clear">
@@ -56,8 +56,8 @@
name: 'helperAddress',
placeHolder: 'node address from group',
required: true,
- missingMessage: 'Node host and port must be supplied',
- title: 'Enter address'" />
+ promptMessage: 'Node address of the existing group member.',
+ title: 'Enter node address of the existing group member'" />
</div>
</div>
</fieldset>
@@ -76,8 +76,8 @@
name: 'address',
placeHolder: 'host:port',
required: true,
- missingMessage: 'Node host and port must be supplied',
- title: 'Enter address'" />
+ promptMessage: 'Node hostname and port number that new node will use.<br/>Other nodes will use connect to this address to replicate messages',
+ title: 'Enter node hostname and port number that new node will use'" />
</div>
</div>
<div class="clear">
@@ -88,7 +88,8 @@
data-dojo-props="
name: 'storePath',
placeHolder: 'path/to/store',
- title: 'Enter store path'" />
+ promptMessage: 'File system location for the store',
+ title: 'Enter file system location for the store'" />
</div>
</div>
</fieldset>
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html Mon Aug 25 15:25:00 2014
@@ -27,8 +27,8 @@
name: 'groupName',
placeHolder: 'group name',
required: true,
- missingMessage: 'A group name must be supplied',
- title: 'Enter a group name'" />
+ title: 'Enter name to identify the new group',
+ promptMessage: 'Name to identify the new group.'"/>
</div>
</div>
<div class="clear">
@@ -40,8 +40,8 @@
name: 'address',
placeHolder: 'host:port',
required: true,
- missingMessage: 'Node host and port must be supplied',
- title: 'Enter address'" />
+ title: 'Enter node hostname and port number that new node will use',
+ promptMessage: 'Node hostname and port number that new node will use.<br/>Other nodes will use connect to this address to replicate messages'" />
</div>
</div>
<div class="clear">
@@ -52,7 +52,8 @@
data-dojo-props="
name: 'storePath',
placeHolder: 'path/to/store',
- title: 'Enter store path'" />
+ title: 'Enter file system location for the store',
+ promptMessage: 'File system location for the store'" />
</div>
</div>
<div class="clear formBox">
@@ -66,7 +67,7 @@
data-dojo-props="
name: 'permittedNodesList',
readOnly : 'true',
- title: 'Enter permitted nodes'">
+ title: 'Enter list of the other node address that will form the group'">
</select> <!-- must use closing tag rather than shorthand - dojo bug? -->
</div>
<button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
@@ -81,8 +82,9 @@
data-dojo-props="
name: 'permittedNode',
placeHolder: 'host:port',
- title: 'Enter address',
- intermediateChanges: true" />
+ intermediateChanges: true,
+ title: 'Enter address of node to be permitted into the group',
+ promptMessage: 'Address of node to be permitted into the group'" />
</div>
<button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeAdd" data-dojo-props="label: '+'"></button>
</div>
Modified: qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html (original)
+++ qpid/branches/0.30/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html Mon Aug 25 15:25:00 2014
@@ -25,8 +25,7 @@
placeHolder: 'Group Name',
required: true,
disabled: true,
- missingMessage: 'A group name must be supplied',
- title: 'Enter group name'" />
+ title: 'Name of the group'" />
</div>
</div>
<div class="clear">
@@ -39,9 +38,7 @@
placeHolder: 'host:port',
required: true,
disabled: true,
- missingMessage: 'A Host and Port must be supplied',
- invalidMessage: 'Must be of the form host:port',
- title: 'Enter Host and Port name'" />
+ title: 'Node address of the group member'" />
</div>
</div>
<div class="clear">
@@ -51,8 +48,9 @@
data-dojo-type="dijit/form/ValidationTextBox"
data-dojo-props="
name: 'storePath',
- placeHolder: 'path/to/store',
- title: 'Enter configuration store path'" />
+ title: 'File system location for the store',
+ promptMessage: 'File system location for the store'" />
+
</div>
</div>
<div class="clear">
@@ -63,7 +61,8 @@
data-dojo-props="
name: 'designatedPrimary',
required: false,
- title: 'Designate node as primary. It is applicable only to 2-nodes cluster'" />
+ title: 'Designate node as primary allowing it to operate solo in a group of two.',
+ promptMessage: 'Designate node as primary allowing it to operate solo operate solo in a group of two'" />
</div>
</div>
<div class="clear">
@@ -80,8 +79,9 @@
data-dojo-props="
name: 'priority',
required: false,
- title: 'Select node priority for election as a Master',
store: nodePriorityStore,
+ title: 'Set the election priority associated with this node',
+ promptMessage: 'Election priority associated with this node.<br/>Elections will choose the node with the most recent transactions.<br/>If there is a tie, priority is used as a tie-breaker.',
searchAttr: 'name'" />
</div>
</div>
@@ -95,7 +95,8 @@
data-dojo-props="
name: 'quorumOverride',
required: false,
- title: 'Enter quorum override. 0 signifies simple majority',
+ title: 'Select minimum required number of nodes or choose Majority',
+ promptMessage: 'Modifies the minimum number of nodes required to be present to elect a master or commit transactions.<br/>Majority signifies that a natural majority of nodes must be present.',
store: nodeQuorumOverrideStore,
searchAttr: 'name'" />
</div>
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/consumer/ConsumerTarget.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/consumer/ConsumerTarget.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/consumer/ConsumerTarget.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/consumer/ConsumerTarget.java Mon Aug 25 15:25:00 2014
@@ -50,7 +50,7 @@ public interface ConsumerTarget
AMQSessionModel getSessionModel();
- void send(MessageInstance entry, boolean batch);
+ long send(MessageInstance entry, boolean batch);
void flushBatched();
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java Mon Aug 25 15:25:00 2014
@@ -1431,15 +1431,22 @@ public abstract class AbstractConfigured
static String interpolate(ConfiguredObject<?> object, String value)
{
- Map<String,String> inheritedContext = new HashMap<String, String>();
- generateInheritedContext(object.getModel(), object, inheritedContext);
- return Strings.expand(value, false,
- JSON_SUBSTITUTION_RESOLVER,
- getOwnAttributeResolver(object),
- new Strings.MapResolver(inheritedContext),
- Strings.JAVA_SYS_PROPS_RESOLVER,
- Strings.ENV_VARS_RESOLVER,
- object.getModel().getTypeRegistry().getDefaultContextResolver());
+ if(object == null)
+ {
+ return value;
+ }
+ else
+ {
+ Map<String, String> inheritedContext = new HashMap<String, String>();
+ generateInheritedContext(object.getModel(), object, inheritedContext);
+ return Strings.expand(value, false,
+ JSON_SUBSTITUTION_RESOLVER,
+ getOwnAttributeResolver(object),
+ new Strings.MapResolver(inheritedContext),
+ Strings.JAVA_SYS_PROPS_RESOLVER,
+ Strings.ENV_VARS_RESOLVER,
+ object.getModel().getTypeRegistry().getDefaultContextResolver());
+ }
}
private static OwnAttributeResolver getOwnAttributeResolver(final ConfiguredObject<?> object)
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java Mon Aug 25 15:25:00 2014
@@ -128,6 +128,18 @@ public interface Broker<X extends Broker
@ManagedAttribute( defaultValue = "false")
boolean getStatisticsReportingResetEnabled();
+ String BROKER_MESSAGE_COMPRESSION_ENABLED = "broker.messageCompressionEnabled";
+ @ManagedContextDefault(name = BROKER_MESSAGE_COMPRESSION_ENABLED)
+ boolean DEFAULT_MESSAGE_COMPRESSION_ENABLED = true;
+
+ @ManagedAttribute( defaultValue = "${"+ BROKER_MESSAGE_COMPRESSION_ENABLED +"}")
+ boolean isMessageCompressionEnabled();
+
+ String MESSAGE_COMPRESSION_THRESHOLD_SIZE = "connection.messageCompressionThresholdSize";
+ @ManagedContextDefault(name = MESSAGE_COMPRESSION_THRESHOLD_SIZE)
+ int DEFAULT_MESSAGE_COMPRESSION_THRESHOLD_SIZE = 102400;
+
+
@DerivedAttribute( persist = true )
String getModelVersion();
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredAutomatedAttribute.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredAutomatedAttribute.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredAutomatedAttribute.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ConfiguredAutomatedAttribute.java Mon Aug 25 15:25:00 2014
@@ -20,11 +20,23 @@
*/
package org.apache.qpid.server.model;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.log4j.Logger;
public class ConfiguredAutomatedAttribute<C extends ConfiguredObject, T> extends ConfiguredObjectAttribute<C,T>
{
+ private static final Logger LOGGER = Logger.getLogger(ConfiguredAutomatedAttribute.class);
+
private final ManagedAttribute _annotation;
+ private final Method _validValuesMethod;
ConfiguredAutomatedAttribute(final Class<C> clazz,
final Method getter,
@@ -32,6 +44,53 @@ public class ConfiguredAutomatedAttribut
{
super(clazz, getter);
_annotation = annotation;
+ Method validValuesMethod = null;
+
+ if(_annotation.validValues().length == 1)
+ {
+ String validValue = _annotation.validValues()[0];
+
+ validValuesMethod = getValidValuesMethod(validValue, clazz);
+ }
+ _validValuesMethod = validValuesMethod;
+ }
+
+ private Method getValidValuesMethod(final String validValue, final Class<C> clazz)
+ {
+ if(validValue.matches("([\\w][\\w\\d_]+\\.)+[\\w][\\w\\d_\\$]*#[\\w\\d_]+\\s*\\(\\s*\\)"))
+ {
+ String function = validValue;
+ try
+ {
+ String className = function.split("#")[0].trim();
+ String methodName = function.split("#")[1].split("\\(")[0].trim();
+ Class<?> validValueCalculatingClass = Class.forName(className);
+ Method method = validValueCalculatingClass.getMethod(methodName);
+ if (Modifier.isStatic(method.getModifiers()) && Modifier.isPublic(method.getModifiers()))
+ {
+ if (Collection.class.isAssignableFrom(method.getReturnType()))
+ {
+ if (method.getGenericReturnType() instanceof ParameterizedType)
+ {
+ Type parameterizedType =
+ ((ParameterizedType) method.getGenericReturnType()).getActualTypeArguments()[0];
+ if (parameterizedType == String.class)
+ {
+ return method;
+ }
+ }
+ }
+ }
+
+ }
+ catch (ClassNotFoundException | NoSuchMethodException e)
+ {
+ LOGGER.warn("The validValues of the " + getName() + " attribute in class " + clazz.getSimpleName()
+ + " has value '" + validValue + "' which looks like it should be a method,"
+ + " but no such method could be used.", e );
+ }
+ }
+ return null;
}
public boolean isAutomated()
@@ -69,4 +128,21 @@ public class ConfiguredAutomatedAttribut
return _annotation.description();
}
+ public Collection<String> validValues()
+ {
+ if(_validValuesMethod != null)
+ {
+ try
+ {
+ return (Collection<String>) _validValuesMethod.invoke(null);
+ }
+ catch (InvocationTargetException | IllegalAccessException e)
+ {
+ LOGGER.warn("Could not execute the validValues generation method " + _validValuesMethod.getName(), e);
+ return Collections.emptySet();
+ }
+ }
+ return Arrays.asList(_annotation.validValues());
+ }
+
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Connection.java Mon Aug 25 15:25:00 2014
@@ -43,6 +43,7 @@ public interface Connection<X extends Co
String TRANSPORT = "transport";
String PORT = "port";
+
@DerivedAttribute
String getClientId();
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedAttribute.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedAttribute.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedAttribute.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/ManagedAttribute.java Mon Aug 25 15:25:00 2014
@@ -34,4 +34,5 @@ public @interface ManagedAttribute
boolean persist() default true;
String defaultValue() default "";
String description() default "";
+ String[] validValues() default {};
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Protocol.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Protocol.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Protocol.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/Protocol.java Mon Aug 25 15:25:00 2014
@@ -87,6 +87,6 @@ public enum Protocol
public static enum ProtocolType
{
- AMQP, HTTP, JMX, RMI;
+ AMQP, HTTP, JMX, RMI
}
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java Mon Aug 25 15:25:00 2014
@@ -92,6 +92,8 @@ public class BrokerAdapter extends Abstr
private int _statisticsReportingPeriod;
@ManagedAttributeField
private boolean _statisticsReportingResetEnabled;
+ @ManagedAttributeField
+ private boolean _messageCompressionEnabled;
private State _state = State.UNINITIALIZED;
@@ -360,6 +362,12 @@ public class BrokerAdapter extends Abstr
}
@Override
+ public boolean isMessageCompressionEnabled()
+ {
+ return _messageCompressionEnabled;
+ }
+
+ @Override
public String getModelVersion()
{
return BrokerModel.MODEL_VERSION;
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPort.java Mon Aug 25 15:25:00 2014
@@ -20,10 +20,14 @@
*/
package org.apache.qpid.server.model.port;
+import java.util.Set;
+
import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.ManagedAttribute;
import org.apache.qpid.server.model.ManagedObject;
import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Protocol;
+import org.apache.qpid.server.model.Transport;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
@ManagedObject( category = false, type = "AMQP")
@@ -57,5 +61,13 @@ public interface AmqpPort<X extends Amqp
@ManagedAttribute( mandatory = true )
AuthenticationProvider getAuthenticationProvider();
+
+ @ManagedAttribute( defaultValue = "TCP",
+ validValues = {"org.apache.qpid.server.model.port.AmqpPortImpl#getAllAvailableTransportCombinations()"})
+ Set<Transport> getTransports();
+
+ @ManagedAttribute( validValues = {"org.apache.qpid.server.model.port.AmqpPortImpl#getAllAvailableProtocolCombinations()"} )
+ Set<Protocol> getProtocols();
+
VirtualHostImpl getVirtualHost(String name);
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AmqpPortImpl.java Mon Aug 25 15:25:00 2014
@@ -19,9 +19,12 @@
*/
package org.apache.qpid.server.model.port;
+import java.io.IOException;
+import java.io.StringWriter;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Map;
@@ -32,6 +35,8 @@ import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
+import org.codehaus.jackson.map.ObjectMapper;
+
import org.apache.qpid.server.configuration.BrokerProperties;
import org.apache.qpid.server.configuration.IllegalConfigurationException;
import org.apache.qpid.server.logging.messages.BrokerMessages;
@@ -43,6 +48,7 @@ import org.apache.qpid.server.model.Prot
import org.apache.qpid.server.model.State;
import org.apache.qpid.server.model.Transport;
import org.apache.qpid.server.model.TrustStore;
+import org.apache.qpid.server.plugin.ProtocolEngineCreator;
import org.apache.qpid.server.plugin.QpidServiceLoader;
import org.apache.qpid.server.plugin.TransportProviderFactory;
import org.apache.qpid.server.transport.AcceptingTransport;
@@ -275,4 +281,87 @@ public class AmqpPortImpl extends Abstra
return null;
}
+ public static Set<Protocol> getInstalledProtocols()
+ {
+ Set<Protocol> protocols = new HashSet<>();
+ for(ProtocolEngineCreator installedEngine : (new QpidServiceLoader<ProtocolEngineCreator>()).instancesOf(ProtocolEngineCreator.class))
+ {
+ protocols.add(installedEngine.getVersion());
+ }
+ return protocols;
+ }
+
+ @SuppressWarnings("unused")
+ public static Collection<String> getAllAvailableProtocolCombinations()
+ {
+ Set<Protocol> protocols = getInstalledProtocols();
+
+ Set<Set<String>> last = new HashSet<>();
+ for(Protocol protocol : protocols)
+ {
+ last.add(Collections.singleton(protocol.name()));
+ }
+
+ Set<Set<String>> protocolCombinations = new HashSet<>(last);
+ for(int i = 1; i < protocols.size(); i++)
+ {
+ Set<Set<String>> current = new HashSet<>();
+ for(Set<String> set : last)
+ {
+ for(Protocol p : protocols)
+ {
+ if(!set.contains(p.name()))
+ {
+ Set<String> potential = new HashSet<>(set);
+ potential.add(p.name());
+ current.add(potential);
+ }
+ }
+ }
+ protocolCombinations.addAll(current);
+ last = current;
+ }
+ Set<String> combinationsAsString = new HashSet<>(protocolCombinations.size());
+ ObjectMapper mapper = new ObjectMapper();
+ for(Set<String> combination : protocolCombinations)
+ {
+ try(StringWriter writer = new StringWriter())
+ {
+ mapper.writeValue(writer, combination);
+ combinationsAsString.add(writer.toString());
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("Unexpected IO Exception generating JSON string", e);
+ }
+ }
+ return Collections.unmodifiableSet(combinationsAsString);
+ }
+
+ @SuppressWarnings("unused")
+ public static Collection<String> getAllAvailableTransportCombinations()
+ {
+ Set<Set<Transport>> combinations = new HashSet<>();
+
+ for(TransportProviderFactory providerFactory : (new QpidServiceLoader<TransportProviderFactory>()).instancesOf(TransportProviderFactory.class))
+ {
+ combinations.addAll(providerFactory.getSupportedTransports());
+ }
+
+ Set<String> combinationsAsString = new HashSet<>(combinations.size());
+ ObjectMapper mapper = new ObjectMapper();
+ for(Set<Transport> combination : combinations)
+ {
+ try(StringWriter writer = new StringWriter())
+ {
+ mapper.writeValue(writer, combination);
+ combinationsAsString.add(writer.toString());
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("Unexpected IO Exception generating JSON string", e);
+ }
+ }
+ return Collections.unmodifiableSet(combinationsAsString);
+ }
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPort.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPort.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPort.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/HttpPort.java Mon Aug 25 15:25:00 2014
@@ -20,10 +20,14 @@
*/
package org.apache.qpid.server.model.port;
+import java.util.Set;
+
import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.ManagedAttribute;
import org.apache.qpid.server.model.ManagedObject;
import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Protocol;
+import org.apache.qpid.server.model.Transport;
@ManagedObject( category = false, type = "HTTP")
public interface HttpPort<X extends HttpPort<X>> extends Port<X>
@@ -42,5 +46,13 @@ public interface HttpPort<X extends Http
@ManagedAttribute( mandatory = true )
AuthenticationProvider getAuthenticationProvider();
+
+ @ManagedAttribute( defaultValue = "TCP",
+ validValues = {"[ \"TCP\" ]", "[ \"SSL\" ]", "[ \"TCP\", \"SSL\" ]"})
+ Set<Transport> getTransports();
+
+ @ManagedAttribute( validValues = { "[ \"HTTP\"]"} )
+ Set<Protocol> getProtocols();
+
void setPortManager(PortManager manager);
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPort.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPort.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPort.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/JmxPort.java Mon Aug 25 15:25:00 2014
@@ -20,10 +20,14 @@
*/
package org.apache.qpid.server.model.port;
+import java.util.Set;
+
import org.apache.qpid.server.model.AuthenticationProvider;
import org.apache.qpid.server.model.ManagedAttribute;
import org.apache.qpid.server.model.ManagedObject;
import org.apache.qpid.server.model.Port;
+import org.apache.qpid.server.model.Protocol;
+import org.apache.qpid.server.model.Transport;
@ManagedObject( category = false, type = "JMX")
public interface JmxPort<X extends JmxPort<X>> extends Port<X>
@@ -42,5 +46,13 @@ public interface JmxPort<X extends JmxPo
@ManagedAttribute( mandatory = true )
AuthenticationProvider getAuthenticationProvider();
+
+ @ManagedAttribute( defaultValue = "TCP",
+ validValues = {"[ \"TCP\" ]", "[ \"SSL\" ]"})
+ Set<Transport> getTransports();
+
+ @ManagedAttribute( validValues = { "[ \"JMX_RMI\"]"} )
+ Set<Protocol> getProtocols();
+
void setPortManager(PortManager manager);
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueConsumerImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueConsumerImpl.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueConsumerImpl.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/main/java/org/apache/qpid/server/queue/QueueConsumerImpl.java Mon Aug 25 15:25:00 2014
@@ -471,9 +471,8 @@ class QueueConsumerImpl
public final void send(final QueueEntry entry, final boolean batch)
{
_deliveredCount.incrementAndGet();
- ServerMessage message = entry.getMessage();
- _deliveredBytes.addAndGet(message.getSize());
- _target.send(entry, batch);
+ long size = _target.send(entry, batch);
+ _deliveredBytes.addAndGet(size);
}
@Override
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/consumer/MockConsumer.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/consumer/MockConsumer.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/consumer/MockConsumer.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/consumer/MockConsumer.java Mon Aug 25 15:25:00 2014
@@ -167,13 +167,15 @@ public class MockConsumer implements Con
{
}
- public void send(MessageInstance entry, boolean batch)
+ public long send(MessageInstance entry, boolean batch)
{
+ long size = entry.getMessage().getSize();
if (messages.contains(entry))
{
entry.setRedelivered();
}
messages.add(entry);
+ return size;
}
public void flushBatched()
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfigureObjectTypeRegistryTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfigureObjectTypeRegistryTest.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfigureObjectTypeRegistryTest.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/ConfigureObjectTypeRegistryTest.java Mon Aug 25 15:25:00 2014
@@ -20,12 +20,14 @@
*/
package org.apache.qpid.server.model;
+import java.util.Arrays;
import java.util.Collection;
import junit.framework.TestCase;
import org.apache.qpid.server.model.testmodel.Test2RootCategory;
import org.apache.qpid.server.model.testmodel.Test2RootCategoryImpl;
+import org.apache.qpid.server.model.testmodel.TestChildCategory;
import org.apache.qpid.server.model.testmodel.TestModel;
import org.apache.qpid.server.model.testmodel.TestRootCategory;
import org.apache.qpid.server.model.testmodel.TestRootCategoryImpl;
@@ -76,6 +78,21 @@ public class ConfigureObjectTypeRegistry
Test2RootCategory.DEFAULTED_VALUE_DEFAULT);
}
+ public void testValidValues()
+ {
+ checkValidValues("validValue",_typeRegistry.getAttributes((Class) TestRootCategoryImpl.class),
+ Arrays.asList( TestRootCategory.VALID_VALUE1, TestRootCategory.VALID_VALUE2 ) );
+
+ checkValidValues("validValue", _typeRegistry.getAttributes((Class) Test2RootCategoryImpl.class),
+ Test2RootCategoryImpl.functionGeneratedValidValues());
+
+
+ checkValidValues("validValueNotInterpolated", _typeRegistry.getAttributes((Class) TestChildCategory.class),
+ Arrays.asList(TestChildCategory.NON_INTERPOLATED_VALID_VALUE));
+
+
+ }
+
private void checkDefaultedValue(final Collection<ConfiguredObjectAttribute<?, ?>> attrs,
final String defaultedValueDefault)
{
@@ -92,4 +109,24 @@ public class ConfigureObjectTypeRegistry
}
assertTrue("Could not find attribute defaultedValue", found);
}
+
+ private void checkValidValues(final String attrName, final Collection<ConfiguredObjectAttribute<?, ?>> attrs,
+ final Collection<String> validValues)
+ {
+ boolean found = false;
+ for(ConfiguredObjectAttribute<?, ?> attr : attrs)
+ {
+ if(attr.getName().equals(attrName))
+ {
+ Collection<String> foundValues = ((ConfiguredAutomatedAttribute<?, ?>) attr).validValues();
+ assertEquals("Valid values not as expected, counts differ", validValues.size(), foundValues.size());
+ assertTrue("Valid values do not include all expected values", foundValues.containsAll(validValues));
+ assertTrue("Valid values contain unexpected addtional values", validValues.containsAll(foundValues));
+ found = true;
+ break;
+ }
+
+ }
+ assertTrue("Could not find attribute " + attrName, found);
+ }
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategory.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategory.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategory.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategory.java Mon Aug 25 15:25:00 2014
@@ -26,10 +26,15 @@ import org.apache.qpid.server.model.Mana
public interface Test2RootCategory<X extends Test2RootCategory<X>> extends TestRootCategory<X>
{
String DEFAULTED_VALUE_DEFAULT = "differentDefault";
+
@Override
@ManagedAttribute( defaultValue = DEFAULTED_VALUE_DEFAULT)
String getDefaultedValue();
+ @Override
+ @ManagedAttribute( validValues = {"org.apache.qpid.server.model.testmodel.Test2RootCategoryImpl#functionGeneratedValidValues()"})
+ String getValidValue();
+
@DerivedAttribute
public int getDerivedAttribute();
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategoryImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategoryImpl.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategoryImpl.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/Test2RootCategoryImpl.java Mon Aug 25 15:25:00 2014
@@ -20,6 +20,8 @@
*/
package org.apache.qpid.server.model.testmodel;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Map;
import org.apache.qpid.server.configuration.updater.CurrentThreadTaskExecutor;
@@ -49,6 +51,9 @@ public class Test2RootCategoryImpl exten
@ManagedAttributeField
private Map<String,String> _mapValue;
+ @ManagedAttributeField
+ private String _validValue;
+
@ManagedObjectFactoryConstructor
public Test2RootCategoryImpl(final Map<String, Object> attributes)
{
@@ -93,6 +98,12 @@ public class Test2RootCategoryImpl exten
}
@Override
+ public String getValidValue()
+ {
+ return _validValue;
+ }
+
+ @Override
public int getDerivedAttribute()
{
return 0;
@@ -115,4 +126,9 @@ public class Test2RootCategoryImpl exten
{
return null;
}
+
+ public static Collection<String> functionGeneratedValidValues()
+ {
+ return Collections.singleton("generated");
+ }
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestModel.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestModel.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestModel.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestModel.java Mon Aug 25 15:25:00 2014
@@ -36,7 +36,8 @@ public class TestModel extends Model
private static final Model INSTANCE = new TestModel();
private Class<? extends ConfiguredObject>[] _supportedClasses =
new Class[] {
- TestRootCategory.class
+ TestRootCategory.class,
+ TestChildCategory.class
};
private final ConfiguredObjectFactory _objectFactory;
@@ -77,7 +78,9 @@ public class TestModel extends Model
@Override
public Collection<Class<? extends ConfiguredObject>> getChildTypes(final Class<? extends ConfiguredObject> parent)
{
- return Collections.emptySet();
+ return TestRootCategory.class.isAssignableFrom(parent)
+ ? Collections.<Class<? extends ConfiguredObject>>singleton(TestChildCategory.class)
+ : Collections.<Class<? extends ConfiguredObject>>emptySet();
}
@Override
@@ -89,7 +92,9 @@ public class TestModel extends Model
@Override
public Collection<Class<? extends ConfiguredObject>> getParentTypes(final Class<? extends ConfiguredObject> child)
{
- return Collections.emptySet();
+ return TestChildCategory.class.isAssignableFrom(child)
+ ? Collections.<Class<? extends ConfiguredObject>>singleton(TestRootCategory.class)
+ : Collections.<Class<? extends ConfiguredObject>>emptySet();
}
@Override
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategory.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategory.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategory.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategory.java Mon Aug 25 15:25:00 2014
@@ -42,9 +42,15 @@ public interface TestRootCategory<X exte
String getAutomatedNonPersistedValue();
String DEFAULTED_VALUE_DEFAULT = "myDefaultVar";
+ String VALID_VALUE1 = "FOO";
+ String VALID_VALUE2 = "BAR";
+
@ManagedAttribute( defaultValue = DEFAULTED_VALUE_DEFAULT)
String getDefaultedValue();
+ @ManagedAttribute(validValues = {VALID_VALUE1, VALID_VALUE2} )
+ String getValidValue();
+
@ManagedAttribute
String getStringValue();
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategoryImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategoryImpl.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategoryImpl.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/model/testmodel/TestRootCategoryImpl.java Mon Aug 25 15:25:00 2014
@@ -49,6 +49,10 @@ public class TestRootCategoryImpl extend
@ManagedAttributeField
private Map<String,String> _mapValue;
+ @ManagedAttributeField
+ private String _validValue;
+
+
@ManagedObjectFactoryConstructor
public TestRootCategoryImpl(final Map<String, Object> attributes)
{
@@ -109,4 +113,10 @@ public class TestRootCategoryImpl extend
{
return null;
}
+
+ @Override
+ public String getValidValue()
+ {
+ return _validValue;
+ }
}
Modified: qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java (original)
+++ qpid/branches/0.30/qpid/java/broker-core/src/test/java/org/apache/qpid/server/queue/StandardQueueTest.java Mon Aug 25 15:25:00 2014
@@ -208,10 +208,11 @@ public class StandardQueueTest extends A
* @param entry
* @param batch
*/
- public void send(MessageInstance entry, boolean batch)
+ public long send(MessageInstance entry, boolean batch)
{
- super.send(entry, batch);
+ long size = super.send(entry, batch);
latch.countDown();
+ return size;
}
};
Modified: qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java (original)
+++ qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ConsumerTarget_0_10.java Mon Aug 25 15:25:00 2014
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.server.protocol.v0_10;
+import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -51,6 +52,7 @@ import org.apache.qpid.transport.Message
import org.apache.qpid.transport.MessageTransfer;
import org.apache.qpid.transport.Method;
import org.apache.qpid.transport.Option;
+import org.apache.qpid.util.GZIPUtils;
public class ConsumerTarget_0_10 extends AbstractConsumerTarget implements FlowCreditManager.FlowCreditManagerListener
{
@@ -198,7 +200,7 @@ public class ConsumerTarget_0_10 extends
private final AddMessageDispositionListenerAction _postIdSettingAction;
- public void send(final MessageInstance entry, boolean batch)
+ public long send(final MessageInstance entry, boolean batch)
{
ServerMessage serverMsg = entry.getMessage();
@@ -264,11 +266,44 @@ public class ConsumerTarget_0_10 extends
deliveryProps.setRedelivered(entry.isRedelivered());
- Header header = new Header(deliveryProps, messageProps, msg.getHeader() == null ? null : msg.getHeader().getNonStandardProperties());
+ boolean msgCompressed = messageProps != null && GZIPUtils.GZIP_CONTENT_ENCODING.equals(messageProps.getContentEncoding());
+
+ ByteBuffer body = msg.getBody();
- xfr = batch ? new MessageTransfer(getConsumer().getName(),_acceptMode,_acquireMode,header,msg.getBody(), BATCHED)
- : new MessageTransfer(getConsumer().getName(),_acceptMode,_acquireMode,header,msg.getBody());
+ boolean compressionSupported = _session.getConnection().getConnectionDelegate().isCompressionSupported();
+
+ if(msgCompressed && !compressionSupported)
+ {
+ byte[] uncompressed = GZIPUtils.uncompressBufferToArray(body);
+ if(uncompressed != null)
+ {
+ messageProps.setContentEncoding(null);
+ body = ByteBuffer.wrap(uncompressed);
+ }
+ }
+ else if(!msgCompressed
+ && compressionSupported
+ && (messageProps == null || messageProps.getContentEncoding()==null)
+ && body.remaining() > _session.getConnection().getMessageCompressionThreshold())
+ {
+ byte[] compressed = GZIPUtils.compressBufferToArray(body);
+ if(compressed != null)
+ {
+ if(messageProps == null)
+ {
+ messageProps = new MessageProperties();
+ }
+ messageProps.setContentEncoding(GZIPUtils.GZIP_CONTENT_ENCODING);
+ body = ByteBuffer.wrap(compressed);
+ }
+ }
+ long size = body == null ? 0 : body.remaining();
+
+ Header header = new Header(deliveryProps, messageProps, msg.getHeader() == null ? null : msg.getHeader().getNonStandardProperties());
+
+ xfr = batch ? new MessageTransfer(getConsumer().getName(),_acceptMode,_acquireMode,header, body, BATCHED)
+ : new MessageTransfer(getConsumer().getName(),_acceptMode,_acquireMode,header, body);
if(_acceptMode == MessageAcceptMode.NONE && _acquireMode != MessageAcquireMode.PRE_ACQUIRED)
{
@@ -311,7 +346,7 @@ public class ConsumerTarget_0_10 extends
{
recordUnacknowledged(entry);
}
-
+ return size;
}
void recordUnacknowledged(MessageInstance entry)
Modified: qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java (original)
+++ qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java Mon Aug 25 15:25:00 2014
@@ -74,7 +74,7 @@ public class ServerConnection extends Co
private final StatisticsCounter _messagesDelivered, _dataDelivered, _messagesReceived, _dataReceived;
private final long _connectionId;
private final Object _reference = new Object();
- private VirtualHostImpl _virtualHost;
+ private VirtualHostImpl<?,?,?> _virtualHost;
private Port<?> _port;
private AtomicLong _lastIoTime = new AtomicLong();
private boolean _blocking;
@@ -87,6 +87,7 @@ public class ServerConnection extends Co
new CopyOnWriteArrayList<SessionModelListener>();
private volatile boolean _stopped;
+ private int _messageCompressionThreshold;
public ServerConnection(final long connectionId, Broker broker)
{
@@ -172,14 +173,22 @@ public class ServerConnection extends Co
super.setConnectionDelegate(delegate);
}
- public VirtualHostImpl getVirtualHost()
+ public VirtualHostImpl<?,?,?> getVirtualHost()
{
return _virtualHost;
}
- public void setVirtualHost(VirtualHostImpl virtualHost)
+ public void setVirtualHost(VirtualHostImpl<?,?,?> virtualHost)
{
_virtualHost = virtualHost;
+ _messageCompressionThreshold =
+ virtualHost.getContextValue(Integer.class,
+ Broker.MESSAGE_COMPRESSION_THRESHOLD_SIZE);
+
+ if(_messageCompressionThreshold <= 0)
+ {
+ _messageCompressionThreshold = Integer.MAX_VALUE;
+ }
}
@Override
@@ -639,4 +648,9 @@ public class ServerConnection extends Co
{
_taskList.remove(task);
}
+
+ public int getMessageCompressionThreshold()
+ {
+ return _messageCompressionThreshold;
+ }
}
Modified: qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java?rev=1620344&r1=1620343&r2=1620344&view=diff
==============================================================================
--- qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java (original)
+++ qpid/branches/0.30/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnectionDelegate.java Mon Aug 25 15:25:00 2014
@@ -64,6 +64,8 @@ public class ServerConnectionDelegate ex
private final SubjectCreator _subjectCreator;
private int _maximumFrameSize;
+ private boolean _compressionSupported;
+
public ServerConnectionDelegate(Broker<?> broker, String localFQDN, SubjectCreator subjectCreator)
{
this(createConnectionProperties(broker), Collections.singletonList((Object)"en_US"), broker, localFQDN, subjectCreator);
@@ -111,6 +113,7 @@ public class ServerConnectionDelegate ex
map.put(ServerPropertyNames.VERSION, QpidProperties.getReleaseVersion());
map.put(ServerPropertyNames.QPID_BUILD, QpidProperties.getBuildVersion());
map.put(ServerPropertyNames.QPID_INSTANCE_NAME, broker.getName());
+ map.put(ConnectionStartProperties.QPID_MESSAGE_COMPRESSION_SUPPORTED, String.valueOf(broker.isMessageCompressionEnabled()));
return map;
}
@@ -366,6 +369,16 @@ public class ServerConnectionDelegate ex
public void connectionStartOk(Connection conn, ConnectionStartOk ok)
{
_clientProperties = ok.getClientProperties();
+ if(_clientProperties != null)
+ {
+ Object compressionSupported =
+ _clientProperties.get(ConnectionStartProperties.QPID_MESSAGE_COMPRESSION_SUPPORTED);
+ if (compressionSupported != null)
+ {
+ _compressionSupported = Boolean.parseBoolean(String.valueOf(compressionSupported));
+
+ }
+ }
super.connectionStartOk(conn, ok);
}
@@ -400,4 +413,9 @@ public class ServerConnectionDelegate ex
int delay = (Integer)_broker.getAttribute(Broker.CONNECTION_HEART_BEAT_DELAY);
return delay == 0 ? super.getHeartbeatMax() : delay;
}
+
+ public boolean isCompressionSupported()
+ {
+ return _compressionSupported && _broker.isMessageCompressionEnabled();
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org