You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/08/11 23:29:33 UTC
svn commit: r564977 [1/8] - in /activemq/trunk:
activemq-console/src/main/java/org/apache/activemq/console/
activemq-console/src/main/java/org/apache/activemq/console/command/
activemq-console/src/main/java/org/apache/activemq/console/filter/
activemq-...
Author: chirino
Date: Sat Aug 11 14:29:21 2007
New Revision: 564977
URL: http://svn.apache.org/viewvc?view=rev&rev=564977
Log:
More checkstyle fixes
Modified:
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BrowseCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/BstatCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/Command.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ListCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/PurgeCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/QueryCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShellCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/ShutdownCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/StartCommand.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AbstractQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/AmqMessagesQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/GroupPropertiesViewFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansAttributeQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansObjectNameQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MBeansRegExQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MapTransformFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/MessagesQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/PropertiesViewFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/QueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/RegExQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/ResultTransformFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/StubQueryFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToMsgSelectorTransformFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardToRegExTransformFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/filter/WildcardTransformFilter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/CommandShellOutputFormatter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/GlobalWriter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/formatter/OutputFormatter.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/AmqMessagesUtil.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/JmxMBeansUtil.java
activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/util/SimpleConsole.java
activemq/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Consumer.java
activemq/trunk/activemq-console/src/test/java/org/apache/activemq/simple/Producer.java
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/LargeStreamletTest.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateCallback.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/CertificateLoginModule.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/GroupPrincipal.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JaasCertificateCallbackHandler.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/JassCredentialCallbackHandler.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/LDAPLoginModule.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/PropertiesLoginModule.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/TextFileCertificateLoginModule.java
activemq/trunk/activemq-jaas/src/main/java/org/apache/activemq/jaas/UserPrincipal.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/CertificateLoginModuleTest.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/GroupPrincipalTest.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/LDAPLoginModuleTest.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/PropertiesLoginModuleTest.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/StubCertificateLoginModule.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/UserPrincipalTest.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/MutableServerStartupConfiguration.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerContextFactory.java
activemq/trunk/activemq-jaas/src/test/java/org/apache/activemq/jaas/ldap/ServerStartupConfiguration.java
activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAMessageStore.java
activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAPersistenceAdapter.java
activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStore.java
activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPAReferenceStoreAdapter.java
activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPATopicMessageStore.java
activemq/trunk/activemq-jpa-store/src/main/java/org/apache/activemq/store/jpa/JPATopicReferenceStore.java
activemq/trunk/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/JPARecoveryBrokerTest.java
activemq/trunk/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/JPAStoreLoadTester.java
activemq/trunk/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreLoadTester.java
activemq/trunk/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreRecoveryBrokerTest.java
activemq/trunk/activemq-jpa-store/src/test/java/org/apache/activemq/broker/store/QuickJPAStoreXARecoveryBrokerTest.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CGeneratorTask.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CHeadersGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpClassesGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpGeneratorTask.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSharpMarshallingGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CSourcesGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppGeneratorTask.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppHeadersGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingClassesGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/CppMarshallingHeadersGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaGeneratorTask.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaMarshallingGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/JavaTestsGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/OpenWireGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/SingleSourceGenerator.java
activemq/trunk/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/TestDataGenerator.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/axis/ActiveMQVendorAdapter.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/BenchmarkSupport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Consumer.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/Producer.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/benchmark/ProducerConsumer.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/JAXPXPathEvaluator.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/filter/XMLBeansXPathEvaluator.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/AcidTestTool.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ConsumerTool.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/JndiProducerTool.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ProducerTool.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/ToolSupport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/tool/WebServer.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpClientTransport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpEmbeddedTunnelServlet.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpSpringEmbeddedTunnelServlet.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportFactory.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportServer.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTunnelServlet.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportFactory.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/https/HttpsTransportServer.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/util/TextWireFormat.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormatFactory.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppender.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JmsLogAppenderSupport.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/util/JndiJmsLogAppender.java
activemq/trunk/activemq-optional/src/main/java/org/apache/activemq/util/xstream/XStreamMessageTransformer.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsDurableTopicSendReceiveTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpJmsSendAndReceiveTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpPersistentSendAndReceiveTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/http/HttpTransportBrokerTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsJmsSendAndReceiveTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/https/HttpsTransportBrokerTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/util/JmsLogAppenderTest.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/SamplePojo.java
activemq/trunk/activemq-optional/src/test/java/org/apache/activemq/util/xstream/XStreamTransformTest.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQActivationSpec.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionFactory.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQConnectionRequestInfo.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointActivationKey.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQEndpointWorker.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnectionFactory.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQResourceAdapter.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxy.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundConnectionProxyFactory.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContext.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundContextSupport.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundMessageProducerProxy.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InboundSessionProxy.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/InvalidMessageEndpointException.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/LocalAndXATransaction.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedConnectionProxy.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedSessionProxy.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ManagedTransactionContext.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageEndpointProxy.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/MessageResourceAdapter.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionPoolImpl.java
activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/SimpleConnectionManager.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQActivationSpecTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQAsfEndpointWorkerTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQResourceAdapterJavaBeanEqualityTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionEventListenerAdapter.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ConnectionManagerAdapter.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MDBTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionFactoryTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ManagedConnectionTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/MessageEndpointProxyTest.java
activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ServerSessionImplTest.java
activemq/trunk/activemq-soaktest/src/test/java/org/apache/activemq/soaktest/MarshallingWithCachingTest.java
activemq/trunk/activemq-soaktest/src/test/java/org/apache/activemq/soaktest/PublishThenConsumeSoakTest.java
activemq/trunk/activemq-soaktest/src/test/java/org/apache/activemq/soaktest/SoakTestSupport.java
activemq/trunk/activemq-soaktest/src/test/java/org/apache/activemq/tool/Consumer.java
activemq/trunk/activemq-soaktest/src/test/java/org/apache/activemq/tool/Producer.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/Agent.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/AgentStopper.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/AgentSupport.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/BrokerAgent.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ClientAgent.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ConsumerAgent.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/DestinationFactory.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/MessageList.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ProducerAgent.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/QueueOnlyScenario.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/Scenario.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ScenarioSupport.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ScenarioTestCase.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/ScenarioTestSuite.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/TopicOnlyScenario.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/AgentMessageListener.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/BrokerAgentImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/ConsumerAgentImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/DestinationFactoryImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/DiscoveryBrokerAgentImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/JmsClientSupport.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/MessageListImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/ProducerAgentImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/RandomMessageListImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateBrokerProcessAgentImpl.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/impl/SeparateProcessAgent.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/task/ScenarioJClassStub.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/task/SystemTestGenerator.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/task/SystemTestTask.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/ProducerConsumerScenarioSupport.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/SingleBrokerScenario.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/TwoBrokerFailoverScenario.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/TwoBrokerNetworkConnectedBeforeStartScenario.java
activemq/trunk/activemq-systest/src/main/java/org/apache/activemq/systest/usecase/network/TwoBrokerNetworkScenario.java
activemq/trunk/activemq-systest/src/main/resources/org/apache/activemq/systest/task/LICENSE_HEADER.txt
activemq/trunk/activemq-test-atomikos/src/test/java/org/apache/activemq/atomikos/XATest.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/maven/MemtestMojo.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/JMSMemtest.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemConsumer.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemMessageIdList.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemProducer.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/MemoryMonitoringTool.java
activemq/trunk/activemq-tooling/maven-activemq-memtest-plugin/src/main/java/org/apache/activemq/tool/ReportGenerator.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ConsumerMojo.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ProducerMojo.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/maven/ServerMojo.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClient.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsMeasurableClient.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerClient.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsConsumerSystem.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerClient.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/JmsProducerSystem.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/AbstractObjectProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsClientSystemProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsConsumerSystemProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsFactoryProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/JmsProducerSystemProperties.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionConfigurable.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/properties/ReflectionUtil.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/AbstractPerfReportWriter.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceReportWriter.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/PerformanceStatisticsUtil.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/VerbosePerfReportWriter.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/XmlFilePerfReportWriter.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/CpuReportPlugin.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ReportPlugin.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/reports/plugins/ThroughputReportPlugin.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/sampler/MeasurableClient.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQPojoSPI.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ActiveMQReflectionSPI.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ReflectionSPIConnectionFactory.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/SPIConnectionFactory.java
activemq/trunk/activemq-tooling/maven-activemq-perf-plugin/src/test/java/org/apache/activemq/tool/ReflectionUtilTest.java
activemq/trunk/activemq-tooling/maven-activemq-plugin/src/main/java/org/apache/activemq/maven/BrokerMojo.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacade.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/BrokerFacadeSupport.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DestinationFacade.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/DurableSubscriberFacade.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/LocalBrokerFacade.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/MessageQuery.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/QueueBrowseQuery.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/RemoteJMXBrokerFacade.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SessionPool.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/SingletonBrokerFacade.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/WebConsoleStarter.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateDestination.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/CreateSubscriber.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteDestination.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteMessage.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/DeleteSubscriber.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/PurgeDestination.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/controller/SendMessage.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/filter/ApplicationContextFilter.java
activemq/trunk/activemq-web-console/src/main/java/org/apache/activemq/web/handler/BindingBeanNameUrlHandlerMapping.java
activemq/trunk/activemq-web-console/src/main/webapp/styles/site.css
activemq/trunk/activemq-web-console/src/main/webapp/styles/sorttable.css
activemq/trunk/activemq-web-console/src/main/webapp/styles/type-settings.css
activemq/trunk/activemq-web-console/src/test/java/org/apache/activemq/web/tool/Main.java
activemq/trunk/activemq-web-demo/src/main/webapp/chat.css
activemq/trunk/activemq-web-demo/src/main/webapp/chat.js
activemq/trunk/activemq-web-demo/src/main/webapp/portfolio/portfolio.js
activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/portfolio.js
activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/util.js
activemq/trunk/activemq-web-demo/src/main/webapp/sandbox/webmq.js
activemq/trunk/activemq-web-demo/src/main/webapp/style.css
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageListenerServlet.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServlet.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/MessageServletSupport.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoDestinationSuppliedException.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/NoSuchViewStyleException.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/PortfolioPublishServlet.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/QueueBrowseServlet.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SessionFilter.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/SpringBrokerContextListener.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/MessageRenderer.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/RssMessageRenderer.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/SimpleMessageRenderer.java
activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/view/XmlMessageRenderer.java
activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/_amq.js
activemq/trunk/activemq-web/src/main/resources/org/apache/activemq/web/amq.js
activemq/trunk/activemq-web/src/test/java/org/apache/activemq/web/JettyServer.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/ProtocolConverter.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransport.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportFactory.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppTransportServer.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormat.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/XmppWireFormatFactory.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/Handler.java
activemq/trunk/activemq-xmpp/src/main/java/org/apache/activemq/transport/xmpp/command/HandlerRegistry.java
activemq/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppBroker.java
activemq/trunk/activemq-xmpp/src/test/java/org/apache/activemq/transport/xmpp/XmppTest.java
activemq/trunk/assembly/src/release/example/src/CommandLineSupport.java
activemq/trunk/assembly/src/release/example/src/ConsumerTool.java
activemq/trunk/assembly/src/release/example/src/EmbeddedBroker.java
activemq/trunk/assembly/src/release/example/src/ProducerAndConsumerTool.java
activemq/trunk/assembly/src/release/example/src/ProducerTool.java
activemq/trunk/assembly/src/release/example/src/RequesterTool.java
activemq/trunk/assembly/src/release/example/src/TopicListener.java
activemq/trunk/assembly/src/release/example/src/TopicPublisher.java
activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java
activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java
activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java
activemq/trunk/assembly/src/test/java/org/apache/activemq/benchmark/ProducerConsumer.java
activemq/trunk/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java
Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java?view=diff&rev=564977&r1=564976&r2=564977
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/ConsoleCommandHandler.java Sat Aug 11 14:29:21 2007
@@ -1,4 +1,4 @@
-/*
+/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -16,16 +16,17 @@
*/
package org.apache.activemq.console;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import javax.jms.TextMessage;
+
import org.apache.activemq.broker.util.CommandHandler;
import org.apache.activemq.console.command.ShellCommand;
-import org.apache.activemq.console.formatter.GlobalWriter;
import org.apache.activemq.console.formatter.CommandShellOutputFormatter;
-
-import javax.jms.TextMessage;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-import java.io.ByteArrayOutputStream;
+import org.apache.activemq.console.formatter.GlobalWriter;
/**
* A default implementation of the @{link CommandHandler} interface
@@ -44,7 +45,7 @@
// lets turn the text into a list of arguments
String requestText = request.getText();
- List tokens = tokenize(requestText);
+ List<String> tokens = tokenize(requestText);
command.execute(tokens);
out.flush();
@@ -55,8 +56,8 @@
response.setText(answer);
}
- protected List tokenize(String text) {
- List answer = new ArrayList();
+ protected List<String> tokenize(String text) {
+ List<String> answer = new ArrayList<String>();
StringTokenizer iter = new StringTokenizer(text);
while (iter.hasMoreTokens()) {
answer.add(iter.nextToken());
Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java?view=diff&rev=564977&r1=564976&r2=564977
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java Sat Aug 11 14:29:21 2007
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,37 +29,35 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
-import java.util.HashSet;
import java.util.StringTokenizer;
/**
- * Main class that can bootstrap an ActiveMQ broker console. Handles command line
- * argument parsing to set up and run broker tasks.
- *
+ * Main class that can bootstrap an ActiveMQ broker console. Handles command
+ * line argument parsing to set up and run broker tasks.
+ *
* @version $Revision$
*/
public class Main {
- public static final String TASK_DEFAULT_CLASS = "org.apache.activemq.console.command.ShellCommand";
-
- private File activeMQHome;
- private File activeMQBase;
- private ClassLoader classLoader;
- private Set extensions = new HashSet(5);
- private Set activeMQClassPath = new HashSet(5);
-
-
+ public static final String TASK_DEFAULT_CLASS = "org.apache.activemq.console.command.ShellCommand";
private static boolean useDefExt = true;
+ private File activeMQHome;
+ private File activeMQBase;
+ private ClassLoader classLoader;
+ private Set<File> extensions = new HashSet<File>(5);
+ private Set<File> activeMQClassPath = new HashSet<File>(5);
+
public static void main(String[] args) {
Main app = new Main();
// Convert arguments to collection for easier management
- List tokens = new LinkedList(Arrays.asList(args));
+ List<String> tokens = new LinkedList<String>(Arrays.asList(args));
// Parse for extension directory option
app.parseExtensions(tokens);
@@ -69,24 +66,25 @@
// ${activemq.base}/conf
// ${activemq.base}/lib/* (only if activemq.base != activemq.home)
// ${activemq.home}/lib/*
- // ${activemq.base}/lib/optional/* (only if activemq.base != activemq.home)
+ // ${activemq.base}/lib/optional/* (only if activemq.base !=
+ // activemq.home)
// ${activemq.home}/lib/optional/*
// ${activemq.base}/lib/web/* (only if activemq.base != activemq.home)
// ${activemq.home}/lib/web/*
//
- if(useDefExt && app.canUseExtdir()) {
+ if (useDefExt && app.canUseExtdir()) {
boolean baseIsHome = app.getActiveMQBase().equals(app.getActiveMQHome());
File baseLibDir = new File(app.getActiveMQBase(), "lib");
File homeLibDir = new File(app.getActiveMQHome(), "lib");
- if(!baseIsHome) {
+ if (!baseIsHome) {
app.addExtensionDirectory(baseLibDir);
}
app.addExtensionDirectory(homeLibDir);
- if(!baseIsHome) {
+ if (!baseIsHome) {
app.addExtensionDirectory(new File(baseLibDir, "optional"));
app.addExtensionDirectory(new File(baseLibDir, "web"));
}
@@ -95,7 +93,8 @@
}
- // Add any custom classpath specified from the system property activemq.classpath
+ // Add any custom classpath specified from the system property
+ // activemq.classpath
app.addClassPathList(System.getProperty("activemq.classpath"));
try {
@@ -104,7 +103,7 @@
System.out.println("Could not load class: " + e.getMessage());
try {
ClassLoader cl = app.getClassLoader();
- if( cl!=null ) {
+ if (cl != null) {
System.out.println("Class loader setup: ");
printClassLoaderTree(cl);
}
@@ -117,14 +116,14 @@
/**
* Print out what's in the classloader tree being used.
- *
+ *
* @param cl
* @return depth
*/
private static int printClassLoaderTree(ClassLoader cl) {
int depth = 0;
- if( cl.getParent()!=null ) {
- depth = printClassLoaderTree(cl.getParent())+1;
+ if (cl.getParent() != null) {
+ depth = printClassLoaderTree(cl.getParent()) + 1;
}
StringBuffer indent = new StringBuffer();
@@ -132,21 +131,21 @@
indent.append(" ");
}
- if( cl instanceof URLClassLoader ) {
- URLClassLoader ucl = (URLClassLoader) cl;
- System.out.println(indent+cl.getClass().getName()+" {");
+ if (cl instanceof URLClassLoader) {
+ URLClassLoader ucl = (URLClassLoader)cl;
+ System.out.println(indent + cl.getClass().getName() + " {");
URL[] urls = ucl.getURLs();
for (int i = 0; i < urls.length; i++) {
- System.out.println(indent+" "+urls[i]);
+ System.out.println(indent + " " + urls[i]);
}
- System.out.println(indent+"}");
+ System.out.println(indent + "}");
} else {
- System.out.println(indent+cl.getClass().getName());
+ System.out.println(indent + cl.getClass().getName());
}
return depth;
}
- public void parseExtensions(List tokens) {
+ public void parseExtensions(List<String> tokens) {
if (tokens.isEmpty()) {
return;
}
@@ -156,15 +155,16 @@
// Parse for all --extdir and --noDefExt options
while (i < count) {
- String token = (String)tokens.get(i);
+ String token = tokens.get(i);
// If token is an extension dir option
if (token.equals("--extdir")) {
// Process token
count--;
tokens.remove(i);
- // If no extension directory is specified, or next token is another option
- if (i >= count || ((String)tokens.get(i)).startsWith("-")) {
+ // If no extension directory is specified, or next token is
+ // another option
+ if (i >= count || tokens.get(i).startsWith("-")) {
System.out.println("Extension directory not specified.");
System.out.println("Ignoring extension directory option.");
continue;
@@ -172,9 +172,9 @@
// Process extension dir token
count--;
- File extDir = new File((String)tokens.remove(i));
+ File extDir = new File(tokens.remove(i));
- if(!canUseExtdir()) {
+ if (!canUseExtdir()) {
System.out.println("Extension directory feature not available due to the system classpath being able to load: " + TASK_DEFAULT_CLASS);
System.out.println("Ignoring extension directory option.");
continue;
@@ -187,7 +187,8 @@
}
addExtensionDirectory(extDir);
- } else if (token.equals("--noDefExt")) { // If token is --noDefExt option
+ } else if (token.equals("--noDefExt")) { // If token is
+ // --noDefExt option
count--;
tokens.remove(i);
useDefExt = false;
@@ -198,19 +199,23 @@
}
- public void runTaskClass(List tokens) throws Throwable {
+ public void runTaskClass(List<String> tokens) throws Throwable {
- System.out.println("ACTIVEMQ_HOME: "+ getActiveMQHome());
- System.out.println("ACTIVEMQ_BASE: "+ getActiveMQBase());
+ System.out.println("ACTIVEMQ_HOME: " + getActiveMQHome());
+ System.out.println("ACTIVEMQ_BASE: " + getActiveMQBase());
ClassLoader cl = getClassLoader();
// Use reflection to run the task.
try {
- String[] args = (String[]) tokens.toArray(new String[tokens.size()]);
+ String[] args = tokens.toArray(new String[tokens.size()]);
Class task = cl.loadClass(TASK_DEFAULT_CLASS);
- Method runTask = task.getMethod("main", new Class[] { String[].class, InputStream.class, PrintStream.class });
- runTask.invoke(task.newInstance(), new Object[] { args, System.in, System.out });
+ Method runTask = task.getMethod("main", new Class[] {
+ String[].class, InputStream.class, PrintStream.class
+ });
+ runTask.invoke(task.newInstance(), new Object[] {
+ args, System.in, System.out
+ });
} catch (InvocationTargetException e) {
throw e.getCause();
}
@@ -234,9 +239,10 @@
}
/**
- * The extension directory feature will not work if the broker factory is already in the classpath
- * since we have to load him from a child ClassLoader we build for it to work correctly.
- *
+ * The extension directory feature will not work if the broker factory is
+ * already in the classpath since we have to load him from a child
+ * ClassLoader we build for it to work correctly.
+ *
* @return true, if extension dir can be used. false otherwise.
*/
public boolean canUseExtdir() {
@@ -249,39 +255,45 @@
}
public ClassLoader getClassLoader() throws MalformedURLException {
- if(classLoader==null) {
+ if (classLoader == null) {
// Setup the ClassLoader
classLoader = Main.class.getClassLoader();
if (!extensions.isEmpty() || !activeMQClassPath.isEmpty()) {
- ArrayList urls = new ArrayList();
+ ArrayList<URL> urls = new ArrayList<URL>();
- for (Iterator iter = activeMQClassPath.iterator(); iter.hasNext();) {
- File dir = (File) iter.next();
- // try{ System.out.println("Adding to classpath: " + dir.getCanonicalPath()); }catch(Exception e){}
+ for (Iterator<File> iter = activeMQClassPath.iterator(); iter.hasNext();) {
+ File dir = iter.next();
+ // try{ System.out.println("Adding to classpath: " +
+ // dir.getCanonicalPath()); }catch(Exception e){}
urls.add(dir.toURL());
}
- for (Iterator iter = extensions.iterator(); iter.hasNext();) {
- File dir = (File) iter.next();
- if( dir.isDirectory() ) {
+ for (Iterator<File> iter = extensions.iterator(); iter.hasNext();) {
+ File dir = iter.next();
+ if (dir.isDirectory()) {
File[] files = dir.listFiles();
- if( files!=null ) {
+ if (files != null) {
- // Sort the jars so that classpath built is consistently
- // in the same order. Also allows us to use jar names to control
+ // Sort the jars so that classpath built is
+ // consistently
+ // in the same order. Also allows us to use jar
+ // names to control
// classpath order.
- Arrays.sort(files, new Comparator(){
+ Arrays.sort(files, new Comparator() {
public int compare(Object o1, Object o2) {
- File f1 = (File) o1;
- File f2 = (File) o2;
+ File f1 = (File)o1;
+ File f2 = (File)o2;
return f1.getName().compareTo(f2.getName());
}
});
for (int j = 0; j < files.length; j++) {
- if( files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar") ) {
- // try{ System.out.println("Adding to classpath: " + files[j].getCanonicalPath()); }catch(Exception e){}
+ if (files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")) {
+ // try{ System.out.println("Adding to
+ // classpath: " +
+ // files[j].getCanonicalPath());
+ // }catch(Exception e){}
urls.add(files[j].toURL());
}
}
@@ -303,29 +315,29 @@
}
public File getActiveMQHome() {
- if(activeMQHome==null) {
- if(System.getProperty("activemq.home") != null) {
+ if (activeMQHome == null) {
+ if (System.getProperty("activemq.home") != null) {
activeMQHome = new File(System.getProperty("activemq.home"));
}
- if(activeMQHome==null){
+ if (activeMQHome == null) {
// guess from the location of the jar
URL url = Main.class.getClassLoader().getResource("org/apache/activemq/console/Main.class");
if (url != null) {
try {
- JarURLConnection jarConnection = (JarURLConnection) url.openConnection();
+ JarURLConnection jarConnection = (JarURLConnection)url.openConnection();
url = jarConnection.getJarFileURL();
URI baseURI = new URI(url.toString()).resolve("..");
activeMQHome = new File(baseURI).getCanonicalFile();
- System.setProperty("activemq.home",activeMQHome.getAbsolutePath());
+ System.setProperty("activemq.home", activeMQHome.getAbsolutePath());
} catch (Exception ignored) {
}
}
}
- if(activeMQHome==null){
+ if (activeMQHome == null) {
activeMQHome = new File("../.");
- System.setProperty("activemq.home",activeMQHome.getAbsolutePath());
+ System.setProperty("activemq.home", activeMQHome.getAbsolutePath());
}
}
@@ -333,14 +345,14 @@
}
public File getActiveMQBase() {
- if(activeMQBase==null) {
- if(System.getProperty("activemq.base") != null) {
+ if (activeMQBase == null) {
+ if (System.getProperty("activemq.base") != null) {
activeMQBase = new File(System.getProperty("activemq.base"));
}
- if(activeMQBase==null){
+ if (activeMQBase == null) {
activeMQBase = getActiveMQHome();
- System.setProperty("activemq.base",activeMQBase.getAbsolutePath());
+ System.setProperty("activemq.base", activeMQBase.getAbsolutePath());
}
}
Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java?view=diff&rev=564977&r1=564976&r2=564977
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractAmqCommand.java Sat Aug 11 14:29:21 2007
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,31 +16,36 @@
*/
package org.apache.activemq.console.command;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.console.formatter.GlobalWriter;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.Connection;
-import javax.jms.JMSException;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
+
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.console.formatter.GlobalWriter;
public abstract class AbstractAmqCommand extends AbstractCommand {
private URI brokerUrl;
private ConnectionFactory factory;
- private final List connections = new ArrayList();
+ private final List<Connection> connections = new ArrayList<Connection>();
/**
- * Establishes a connection to the remote broker specified by the broker url.
+ * Establishes a connection to the remote broker specified by the broker
+ * url.
+ *
* @return - connection to the broker
* @throws JMSException
*/
protected Connection createConnection() throws JMSException {
if (getBrokerUrl() == null) {
- GlobalWriter.printException(new IllegalStateException("You must specify a broker URL to connect to using the --amqurl option."));
+ GlobalWriter
+ .printException(new IllegalStateException("You must specify a broker "
+ + "URL to connect to using the --amqurl option."));
return null;
}
@@ -56,7 +60,9 @@
}
/**
- * Establishes a connection to the remote broker specified by the broker url.
+ * Establishes a connection to the remote broker specified by the broker
+ * url.
+ *
* @param username - username for the connection
* @param password - password for the connection
* @return - connection to the broker
@@ -64,7 +70,9 @@
*/
protected Connection createConnection(String username, String password) throws JMSException {
if (getBrokerUrl() == null) {
- GlobalWriter.printException(new IllegalStateException("You must specify a broker URL to connect to using the --amqurl option."));
+ GlobalWriter
+ .printException(new IllegalStateException(
+ "You must specify a broker URL to connect to using the --amqurl option."));
return null;
}
@@ -83,10 +91,11 @@
* Close all created connections.
*/
protected void closeAllConnections() {
- for (Iterator i=connections.iterator(); i.hasNext();) {
+ for (Iterator<Connection> i = connections.iterator(); i.hasNext();) {
try {
- ((Connection)i.next()).close();
- } catch (Exception e) { }
+ i.next().close();
+ } catch (Exception e) {
+ }
}
connections.clear();
@@ -94,6 +103,7 @@
/**
* Handle the --amqurl option.
+ *
* @param token - current option
* @param tokens - succeeding list of arguments
* @throws Exception
@@ -110,7 +120,8 @@
// If broker url already specified
if (getBrokerUrl() != null) {
- GlobalWriter.printException(new IllegalArgumentException("Multiple broker URL cannot be specified."));
+ GlobalWriter
+ .printException(new IllegalArgumentException("Multiple broker URL cannot be specified."));
tokens.clear();
return;
}
@@ -132,6 +143,7 @@
/**
* Set the broker url.
+ *
* @param brokerUrl - new broker url
*/
protected void setBrokerUrl(URI brokerUrl) {
@@ -140,6 +152,7 @@
/**
* Set the broker url.
+ *
* @param address - address of the new broker url
* @throws URISyntaxException
*/
@@ -149,6 +162,7 @@
/**
* Get the current broker url.
+ *
* @return current broker url
*/
protected URI getBrokerUrl() {
Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java?view=diff&rev=564977&r1=564976&r2=564977
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractCommand.java Sat Aug 11 14:29:21 2007
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,23 +16,25 @@
*/
package org.apache.activemq.console.command;
+import java.util.List;
+
import org.apache.activemq.ActiveMQConnectionMetaData;
import org.apache.activemq.console.formatter.GlobalWriter;
-import java.util.List;
-
public abstract class AbstractCommand implements Command {
public static final String COMMAND_OPTION_DELIMETER = ",";
- private boolean isPrintHelp = false;
- private boolean isPrintVersion = false;
+ private boolean isPrintHelp;
+ private boolean isPrintVersion;
/**
- * Exceute a generic command, which includes parsing the options for the command and running the specific task.
+ * Execute a generic command, which includes parsing the options for the
+ * command and running the specific task.
+ *
* @param tokens - command arguments
* @throws Exception
*/
- public void execute(List tokens) throws Exception {
+ public void execute(List<String> tokens) throws Exception {
// Parse the options specified by "-"
parseOptions(tokens);
@@ -41,24 +42,26 @@
if (isPrintHelp) {
printHelp();
- // Print the AMQ version
+ // Print the AMQ version
} else if (isPrintVersion) {
GlobalWriter.printVersion(ActiveMQConnectionMetaData.PROVIDER_VERSION);
- // Run the specified task
+ // Run the specified task
} else {
runTask(tokens);
}
}
/**
- * Parse any option parameters in the command arguments specified by a '-' as the first character of the token.
+ * Parse any option parameters in the command arguments specified by a '-'
+ * as the first character of the token.
+ *
* @param tokens - command arguments
* @throws Exception
*/
- protected void parseOptions(List tokens) throws Exception {
+ protected void parseOptions(List<String> tokens) throws Exception {
while (!tokens.isEmpty()) {
- String token = (String)tokens.remove(0);
+ String token = tokens.remove(0);
if (token.startsWith("-")) {
// Token is an option
handleOption(token, tokens);
@@ -71,25 +74,25 @@
}
/**
- * Handle the general options for each command, which includes -h, -?, --help, -D, --version.
+ * Handle the general options for each command, which includes -h, -?,
+ * --help, -D, --version.
+ *
* @param token - option token to handle
* @param tokens - succeeding command arguments
* @throws Exception
*/
- protected void handleOption(String token, List tokens) throws Exception {
+ protected void handleOption(String token, List<String> tokens) throws Exception {
// If token is a help option
if (token.equals("-h") || token.equals("-?") || token.equals("--help")) {
isPrintHelp = true;
tokens.clear();
- // If token is a version option
+ // If token is a version option
} else if (token.equals("--version")) {
isPrintVersion = true;
tokens.clear();
- }
-
- // If token is a system property define option
- else if (token.startsWith("-D")) {
+ } else if (token.startsWith("-D")) {
+ // If token is a system property define option
String key = token.substring(2);
String value = "";
int pos = key.indexOf("=");
@@ -98,11 +101,8 @@
key = key.substring(0, pos);
}
System.setProperty(key, value);
-
- }
-
- // Token is unrecognized
- else {
+ } else {
+ // Token is unrecognized
GlobalWriter.printInfo("Unrecognized option: " + token);
isPrintHelp = true;
}
@@ -110,13 +110,14 @@
/**
* Run the specific task.
+ *
* @param tokens - command arguments
* @throws Exception
*/
- abstract protected void runTask(List tokens) throws Exception;
+ protected abstract void runTask(List<String> tokens) throws Exception;
/**
* Print the help messages for the specific task
*/
- abstract protected void printHelp();
+ protected abstract void printHelp();
}
Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java?view=diff&rev=564977&r1=564976&r2=564977
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AbstractJmxCommand.java Sat Aug 11 14:29:21 2007
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,14 +16,15 @@
*/
package org.apache.activemq.console.command;
-import org.apache.activemq.console.formatter.GlobalWriter;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.List;
-import javax.management.remote.JMXServiceURL;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
-import java.util.List;
-import java.net.MalformedURLException;
-import java.io.IOException;
+import javax.management.remote.JMXServiceURL;
+
+import org.apache.activemq.console.formatter.GlobalWriter;
public abstract class AbstractJmxCommand extends AbstractCommand {
public static final String DEFAULT_JMX_URL = "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi";
@@ -107,7 +107,7 @@
* @param tokens - succeeding command arguments
* @throws Exception
*/
- protected void handleOption(String token, List tokens) throws Exception {
+ protected void handleOption(String token, List<String> tokens) throws Exception {
// Try to handle the options first
if (token.equals("--jmxurl")) {
// If no jmx url specified, or next token is a new option
Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java?view=diff&rev=564977&r1=564976&r2=564977
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/command/AmqBrowseCommand.java Sat Aug 11 14:29:21 2007
@@ -1,5 +1,4 @@
/**
- *
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -7,7 +6,7 @@
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -17,18 +16,19 @@
*/
package org.apache.activemq.console.command;
-import org.apache.activemq.console.util.AmqMessagesUtil;
-import org.apache.activemq.console.formatter.GlobalWriter;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-
-import javax.jms.Destination;
-import java.util.List;
import java.util.ArrayList;
-import java.util.Set;
import java.util.HashSet;
-import java.util.StringTokenizer;
import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.StringTokenizer;
+
+import javax.jms.Destination;
+
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.console.formatter.GlobalWriter;
+import org.apache.activemq.console.util.AmqMessagesUtil;
public class AmqBrowseCommand extends AbstractAmqCommand {
public static final String QUEUE_PREFIX = "queue:";
@@ -36,15 +36,49 @@
public static final String VIEW_GROUP_HEADER = "header:";
public static final String VIEW_GROUP_CUSTOM = "custom:";
- public static final String VIEW_GROUP_BODY = "body:";
+ public static final String VIEW_GROUP_BODY = "body:";
- private final List queryAddObjects = new ArrayList(10);
- private final List querySubObjects = new ArrayList(10);
- private final Set groupViews = new HashSet(10);
- private final Set queryViews = new HashSet(10);
+ protected String[] helpFile = new String[] {
+ "Task Usage: Main browse --amqurl <broker url> [browse-options] <destinations>",
+ "Description: Display selected destination's messages.",
+ "",
+ "Browse Options:",
+ " --amqurl <url> Set the broker URL to connect to.",
+ " --msgsel <msgsel1,msglsel2> Add to the search list messages matched by the query similar to",
+ " the messages selector format.",
+ " -V<header|custom|body> Predefined view that allows you to view the message header, custom",
+ " message header, or the message body.",
+ " --view <attr1>,<attr2>,... Select the specific attribute of the message to view.",
+ " --version Display the version information.",
+ " -h,-?,--help Display the browse broker help information.",
+ "",
+ "Examples:",
+ " Main browse --amqurl tcp://localhost:61616 FOO.BAR",
+ " - Print the message header, custom message header, and message body of all messages in the",
+ " queue FOO.BAR",
+ "",
+ " Main browse --amqurl tcp://localhost:61616 -Vheader,body queue:FOO.BAR",
+ " - Print only the message header and message body of all messages in the queue FOO.BAR",
+ "",
+ " Main browse --amqurl tcp://localhost:61616 -Vheader --view custom:MyField queue:FOO.BAR",
+ " - Print the message header and the custom field 'MyField' of all messages in the queue FOO.BAR",
+ "",
+ " Main browse --amqurl tcp://localhost:61616 --msgsel JMSMessageID='*:10',JMSPriority>5 FOO.BAR",
+ " - Print all the message fields that has a JMSMessageID in the header field that matches the",
+ " wildcard *:10, and has a JMSPriority field > 5 in the queue FOO.BAR",
+ " * To use wildcard queries, the field must be a string and the query enclosed in ''",
+ "",
+ };
+
+ private final List<String> queryAddObjects = new ArrayList<String>(10);
+ private final List<String> querySubObjects = new ArrayList<String>(10);
+ private final Set<String> groupViews = new HashSet<String>(10);
+ private final Set queryViews = new HashSet(10);
/**
- * Execute the browse command, which allows you to browse the messages in a given JMS destination
+ * Execute the browse command, which allows you to browse the messages in a
+ * given JMS destination
+ *
* @param tokens - command arguments
* @throws Exception
*/
@@ -63,7 +97,7 @@
}
// Display the messages for each destination
- for (Iterator i=tokens.iterator(); i.hasNext();) {
+ for (Iterator i = tokens.iterator(); i.hasNext();) {
String destName = (String)i.next();
Destination dest;
@@ -71,11 +105,11 @@
if (destName.startsWith(QUEUE_PREFIX)) {
dest = new ActiveMQQueue(destName.substring(QUEUE_PREFIX.length()));
- // If destination has been explicitly specified as a topic
+ // If destination has been explicitly specified as a topic
} else if (destName.startsWith(TOPIC_PREFIX)) {
dest = new ActiveMQTopic(destName.substring(TOPIC_PREFIX.length()));
- // By default destination is assumed to be a queue
+ // By default destination is assumed to be a queue
} else {
dest = new ActiveMQQueue(destName);
}
@@ -101,6 +135,7 @@
/**
* Handle the --msgsel, --xmsgsel, --view, -V options.
+ *
* @param token - option token to handle
* @param tokens - succeeding command arguments
* @throws Exception
@@ -110,7 +145,8 @@
// If token is an additive message selector option
if (token.startsWith("--msgsel")) {
- // If no message selector is specified, or next token is a new option
+ // If no message selector is specified, or next token is a new
+ // option
if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
GlobalWriter.printException(new IllegalArgumentException("Message selector not specified"));
return;
@@ -120,12 +156,11 @@
while (queryTokens.hasMoreTokens()) {
queryAddObjects.add(queryTokens.nextToken());
}
- }
-
- // If token is a substractive message selector option
- else if (token.startsWith("--xmsgsel")) {
+ } else if (token.startsWith("--xmsgsel")) {
+ // If token is a substractive message selector option
- // If no message selector is specified, or next token is a new option
+ // If no message selector is specified, or next token is a new
+ // option
if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
GlobalWriter.printException(new IllegalArgumentException("Message selector not specified"));
return;
@@ -136,10 +171,8 @@
querySubObjects.add(queryTokens.nextToken());
}
- }
-
- // If token is a view option
- else if (token.startsWith("--view")) {
+ } else if (token.startsWith("--view")) {
+ // If token is a view option
// If no view specified, or next token is a new option
if (tokens.isEmpty() || ((String)tokens.get(0)).startsWith("-")) {
@@ -156,46 +189,44 @@
if (viewToken.equals(VIEW_GROUP_HEADER)) {
queryViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + viewToken.substring(VIEW_GROUP_HEADER.length()));
- // If view is explicitly specified to belong to the JMS custom header
+ // If view is explicitly specified to belong to the JMS
+ // custom header
} else if (viewToken.equals(VIEW_GROUP_CUSTOM)) {
queryViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + viewToken.substring(VIEW_GROUP_CUSTOM.length()));
- // If view is explicitly specified to belong to the JMS body
+ // If view is explicitly specified to belong to the JMS body
} else if (viewToken.equals(VIEW_GROUP_BODY)) {
queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken.substring(VIEW_GROUP_BODY.length()));
- // If no view explicitly specified, let's check the view for each group
+ // If no view explicitly specified, let's check the view for
+ // each group
} else {
queryViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX + viewToken);
queryViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX + viewToken);
- queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken);
+ queryViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX + viewToken);
}
}
- }
-
- // If token is a predefined group view option
- else if (token.startsWith("-V")) {
+ } else if (token.startsWith("-V")) {
+ // If token is a predefined group view option
String viewGroup = token.substring(2);
// If option is a header group view
if (viewGroup.equals("header")) {
groupViews.add(AmqMessagesUtil.JMS_MESSAGE_HEADER_PREFIX);
- // If option is a custom header group view
+ // If option is a custom header group view
} else if (viewGroup.equals("custom")) {
groupViews.add(AmqMessagesUtil.JMS_MESSAGE_CUSTOM_PREFIX);
- // If option is a body group view
+ // If option is a body group view
} else if (viewGroup.equals("body")) {
groupViews.add(AmqMessagesUtil.JMS_MESSAGE_BODY_PREFIX);
- // Unknown group view
+ // Unknown group view
} else {
GlobalWriter.printInfo("Unknown group view: " + viewGroup + ". Ignoring group view option.");
}
- }
-
- // Let super class handle unknown option
- else {
+ } else {
+ // Let super class handle unknown option
super.handleOption(token, tokens);
}
}
@@ -207,35 +238,4 @@
GlobalWriter.printHelp(helpFile);
}
- protected String[] helpFile = new String[] {
- "Task Usage: Main browse --amqurl <broker url> [browse-options] <destinations>",
- "Description: Display selected destination's messages.",
- "",
- "Browse Options:",
- " --amqurl <url> Set the broker URL to connect to.",
- " --msgsel <msgsel1,msglsel2> Add to the search list messages matched by the query similar to",
- " the messages selector format.",
- " -V<header|custom|body> Predefined view that allows you to view the message header, custom",
- " message header, or the message body.",
- " --view <attr1>,<attr2>,... Select the specific attribute of the message to view.",
- " --version Display the version information.",
- " -h,-?,--help Display the browse broker help information.",
- "",
- "Examples:",
- " Main browse --amqurl tcp://localhost:61616 FOO.BAR",
- " - Print the message header, custom message header, and message body of all messages in the",
- " queue FOO.BAR",
- "",
- " Main browse --amqurl tcp://localhost:61616 -Vheader,body queue:FOO.BAR",
- " - Print only the message header and message body of all messages in the queue FOO.BAR",
- "",
- " Main browse --amqurl tcp://localhost:61616 -Vheader --view custom:MyField queue:FOO.BAR",
- " - Print the message header and the custom field 'MyField' of all messages in the queue FOO.BAR",
- "",
- " Main browse --amqurl tcp://localhost:61616 --msgsel JMSMessageID='*:10',JMSPriority>5 FOO.BAR",
- " - Print all the message fields that has a JMSMessageID in the header field that matches the",
- " wildcard *:10, and has a JMSPriority field > 5 in the queue FOO.BAR",
- " * To use wildcard queries, the field must be a string and the query enclosed in ''",
- "",
- };
}