From 25ae47245524d05a6eb0804ec7c96309cbbe2a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 6 Dec 2015 01:27:35 +0200 Subject: [PATCH] Add missing @Override annotations --- .../apache/activemq/artemis/boot/Artemis.java | 1 + .../artemis/cli/commands/ActionAbstract.java | 3 + .../activemq/artemis/cli/commands/Create.java | 1 + .../activemq/artemis/cli/commands/Run.java | 1 + .../cli/commands/tools/DecodeJournal.java | 1 + .../cli/commands/tools/EncodeJournal.java | 11 ++ .../cli/commands/util/ProducerThread.java | 1 + .../artemis/cli/process/ProcessBuilder.java | 1 + .../artemis/integration/FileBroker.java | 1 + .../activemq/artemis/util/ServerUtil.java | 1 + .../artemis/api/core/ActiveMQBuffer.java | 12 ++ .../artemis/api/core/SimpleString.java | 4 + .../buffers/impl/ChannelBufferWrapper.java | 96 +++++++++++ .../artemis/utils/ActiveMQThreadFactory.java | 2 + .../artemis/utils/ConcurrentHashSet.java | 1 + .../utils/DefaultSensitiveStringCodec.java | 2 + .../activemq/artemis/utils/FactoryFinder.java | 1 + .../artemis/utils/PasswordMaskingUtil.java | 1 + .../activemq/artemis/utils/UUIDGenerator.java | 1 + .../artemis/utils/ReferenceCounterTest.java | 3 + .../api/core/JGroupsBroadcastEndpoint.java | 6 + .../core/JGroupsFileBroadcastEndpoint.java | 1 + .../api/core/UDPBroadcastEndpointFactory.java | 7 + .../api/core/client/ClientConsumer.java | 1 + .../api/core/client/ClientMessage.java | 22 +++ .../api/core/client/ClientProducer.java | 1 + .../api/core/client/ClientSession.java | 1 + .../api/core/client/ClientSessionFactory.java | 1 + .../api/core/client/ServerLocator.java | 1 + ...tElementConnectionLoadBalancingPolicy.java | 1 + .../RandomConnectionLoadBalancingPolicy.java | 1 + ...omStickyConnectionLoadBalancingPolicy.java | 1 + ...undRobinConnectionLoadBalancingPolicy.java | 1 + .../core/management/CoreNotificationType.java | 1 + .../core/client/impl/AddressQueryImpl.java | 3 + .../core/client/impl/ClientConsumerImpl.java | 33 ++++ .../client/impl/ClientLargeMessageImpl.java | 4 + .../impl/ClientProducerCreditManagerImpl.java | 18 ++ .../impl/ClientProducerCreditsImpl.java | 10 ++ .../core/client/impl/ClientProducerImpl.java | 11 ++ .../client/impl/ClientSessionFactoryImpl.java | 39 +++++ .../core/client/impl/ClientSessionImpl.java | 100 +++++++++++ .../CompressedLargeMessageControllerImpl.java | 70 ++++++++ .../core/client/impl/DelegatingSession.java | 92 +++++++++++ .../impl/LargeMessageControllerImpl.java | 71 ++++++++ .../core/client/impl/QueueQueryImpl.java | 9 + .../core/client/impl/ServerLocatorImpl.java | 99 +++++++++++ .../client/impl/ServerLocatorInternal.java | 1 + .../artemis/core/client/impl/Topology.java | 4 + .../core/client/impl/TopologyMemberImpl.java | 2 + .../artemis/core/cluster/DiscoveryGroup.java | 4 + .../core/message/impl/MessageImpl.java | 87 ++++++++++ .../impl/ActiveMQClientProtocolManager.java | 11 ++ .../ActiveMQClientProtocolManagerFactory.java | 1 + .../core/impl/ActiveMQSessionContext.java | 39 +++++ .../core/protocol/core/impl/ChannelImpl.java | 25 +++ .../core/protocol/core/impl/PacketImpl.java | 8 + .../core/impl/RemotingConnectionImpl.java | 19 +++ .../core/impl/wireformat/MessagePacket.java | 2 + .../SessionQueueQueryResponseMessage_V2.java | 1 + .../impl/TransportConfigurationUtil.java | 1 + .../remoting/impl/netty/NettyConnection.java | 15 ++ .../remoting/impl/netty/NettyConnector.java | 16 ++ .../impl/netty/NettyConnectorFactory.java | 1 + .../core/remoting/impl/ssl/SSLSupport.java | 1 + .../core/transaction/impl/XidImpl.java | 3 + .../core/version/impl/VersionImpl.java | 7 + .../protocol/AbstractRemotingConnection.java | 17 ++ .../activemq/artemis/utils/FutureLatch.java | 1 + .../artemis/utils/InflaterReader.java | 1 + .../artemis/utils/LinkedListImpl.java | 13 ++ .../artemis/utils/LinkedListIterator.java | 1 + .../artemis/utils/OrderedExecutorFactory.java | 4 + .../artemis/utils/PriorityLinkedListImpl.java | 12 ++ .../artemis/utils/SimpleIDGenerator.java | 2 + .../artemis/utils/SoftValueHashMap.java | 16 ++ .../utils/TimeAndCounterIDGenerator.java | 2 + .../artemis/utils/TokenBucketLimiterImpl.java | 3 + .../activemq/artemis/utils/VersionLoader.java | 1 + .../activemq/artemis/utils/XMLUtil.java | 1 + .../api/jms/management/JMSQueueControl.java | 1 + .../jms/client/ActiveMQBytesMessage.java | 27 +++ .../jms/client/ActiveMQConnection.java | 18 ++ .../jms/client/ActiveMQConnectionFactory.java | 8 + .../ActiveMQConnectionForContextImpl.java | 3 + .../client/ActiveMQConnectionMetaData.java | 8 + .../jms/client/ActiveMQDestination.java | 1 + .../jms/client/ActiveMQMapMessage.java | 25 +++ .../artemis/jms/client/ActiveMQMessage.java | 44 +++++ .../jms/client/ActiveMQMessageConsumer.java | 10 ++ .../jms/client/ActiveMQMessageProducer.java | 24 +++ .../jms/client/ActiveMQObjectMessage.java | 2 + .../artemis/jms/client/ActiveMQQueue.java | 1 + .../jms/client/ActiveMQQueueBrowser.java | 6 + .../ActiveMQQueueConnectionFactory.java | 1 + .../artemis/jms/client/ActiveMQSession.java | 36 ++++ .../jms/client/ActiveMQStreamMessage.java | 24 +++ .../jms/client/ActiveMQTextMessage.java | 2 + .../artemis/jms/client/ActiveMQTopic.java | 1 + .../ActiveMQTopicConnectionFactory.java | 1 + .../ActiveMQXAQueueConnectionFactory.java | 1 + .../ActiveMQXATopicConnectionFactory.java | 1 + .../jms/client/JMSMessageListenerWrapper.java | 1 + .../ConnectionFactoryObjectFactory.java | 1 + .../DestinationObjectFactory.java | 1 + .../jndi/ActiveMQInitialContextFactory.java | 3 + .../artemis/jndi/LazyCreateContext.java | 1 + .../activemq/artemis/jndi/NameParserImpl.java | 1 + .../artemis/jndi/ReadOnlyContext.java | 36 ++++ .../jms/bridge/impl/JMSBridgeControlImpl.java | 33 ++++ .../jms/bridge/impl/JMSBridgeImpl.java | 49 ++++++ .../impl/JNDIConnectionFactoryFactory.java | 1 + .../bridge/impl/JNDIDestinationFactory.java | 1 + .../impl/JMSConnectionFactoryControlImpl.java | 69 ++++++++ .../management/impl/JMSQueueControlImpl.java | 42 +++++ .../management/impl/JMSServerControlImpl.java | 38 +++++ .../management/impl/JMSTopicControlImpl.java | 24 +++ .../config/PersistedDestination.java | 3 + .../journal/JMSJournalStorageManagerImpl.java | 7 + .../artemis/jms/server/JMSServerManager.java | 1 + .../ConnectionFactoryConfigurationImpl.java | 72 ++++++++ .../config/impl/JMSConfigurationImpl.java | 8 + .../impl/JMSQueueConfigurationImpl.java | 8 + .../config/impl/TopicConfigurationImpl.java | 4 + .../jms/server/impl/JMSServerManagerImpl.java | 45 +++++ .../impl/JMSManagementServiceImpl.java | 9 + .../core/io/AbstractSequentialFile.java | 19 +++ .../io/AbstractSequentialFileFactory.java | 9 + .../artemis/core/io/DummyCallback.java | 2 + .../core/io/aio/AIOSequentialFile.java | 13 ++ .../core/io/aio/AIOSequentialFileFactory.java | 13 ++ .../artemis/core/io/buffer/TimedBuffer.java | 1 + .../core/io/nio/NIOSequentialFile.java | 14 ++ .../core/io/nio/NIOSequentialFileFactory.java | 9 + .../artemis/core/journal/TestableJournal.java | 3 + .../core/journal/impl/JournalBase.java | 27 +++ .../core/journal/impl/JournalCompactor.java | 10 ++ .../core/journal/impl/JournalFileImpl.java | 10 ++ .../journal/impl/JournalFilesRepository.java | 1 + .../core/journal/impl/JournalImpl.java | 67 ++++++++ .../impl/JournalReaderCallbackAbstract.java | 10 ++ .../journal/impl/SimpleWaitIOCallback.java | 2 + .../journal/impl/TransactionCallback.java | 2 + .../impl/dataformat/ByteArrayEncoding.java | 3 + .../impl/dataformat/JournalDeleteRecord.java | 1 + .../dataformat/JournalInternalRecord.java | 2 + .../artemis/maven/ArtemisAbstractPlugin.java | 1 + .../artemis/maven/ArtemisCLIPlugin.java | 2 + .../maven/ArtemisDependencyScanPlugin.java | 1 + .../artemis/jlibaio/LibaioContext.java | 1 + .../artemis/jlibaio/test/LibaioTest.java | 1 + .../jlibaio/test/OpenCloseContextTest.java | 2 + .../ActiveMQProtonRemotingConnection.java | 1 + .../converter/jms/ServerJMSBytesMessage.java | 2 + .../converter/jms/ServerJMSMapMessage.java | 27 +++ .../converter/jms/ServerJMSMessage.java | 1 + .../converter/jms/ServerJMSStreamMessage.java | 26 +++ .../converter/jms/ServerJMSTextMessage.java | 4 + .../ActiveMQProtonConnectionCallback.java | 1 + .../client/HornetQClientProtocolManager.java | 2 + .../client/HornetQClientSessionContext.java | 4 + .../core/protocol/mqtt/MQTTConnection.java | 1 + .../core/protocol/mqtt/MQTTMessageInfo.java | 1 + .../protocol/mqtt/MQTTProtocolHandler.java | 1 + .../openwire/OpenWireMessageConverter.java | 1 + .../openwire/OpenWireProtocolManager.java | 3 + .../OpenWireProtocolManagerFactory.java | 1 + .../AMQCompositeConsumerBrokerExchange.java | 3 + .../openwire/amq/AMQServerSession.java | 1 + .../amq/AMQSingleConsumerBrokerExchange.java | 3 + .../context/AbstractConnectionContext.java | 7 + .../context/AbstractProtonContextSender.java | 2 + .../context/AbstractProtonSessionContext.java | 1 + .../context/ProtonTransactionHandler.java | 1 + .../client/ProtonClientConnectionContext.java | 2 + .../ProtonClientConnectionContextFactory.java | 1 + .../context/client/ProtonClientContext.java | 1 + .../client/ProtonClientReceiverContext.java | 2 + .../client/ProtonClientSessionContext.java | 2 + .../server/ProtonServerConnectionContext.java | 2 + .../ProtonServerConnectionContextFactory.java | 1 + .../server/ProtonServerReceiverContext.java | 2 + .../server/ProtonServerSenderContext.java | 5 + .../server/ProtonServerSessionContext.java | 1 + .../plug/handler/impl/ProtonHandlerImpl.java | 2 + .../org/proton/plug/sasl/ClientSASLPlain.java | 2 + .../org/proton/plug/util/FutureRunnable.java | 1 + .../proton/plug/util/ProtonServerMessage.java | 1 + .../java/org/proton/plug/test/ProtonTest.java | 1 + .../proton/plug/test/invm/ProtonINVMSPI.java | 4 + .../test/minimalclient/AMQPClientSPI.java | 2 + .../minimalclient/SimpleAMQPConnector.java | 3 + .../minimalserver/MinimalConnectionSPI.java | 2 + .../test/minimalserver/MinimalSessionSPI.java | 2 + .../SimpleServerThreadFactory.java | 3 + .../plug/test/util/CreditsSemaphoreTest.java | 1 + .../core/protocol/stomp/StompConnection.java | 13 ++ .../protocol/stomp/StompProtocolManager.java | 6 + .../stomp/StompProtocolManagerFactory.java | 1 + .../core/protocol/stomp/StompSession.java | 8 + .../core/protocol/stomp/StompVersions.java | 1 + .../stomp/v11/StompFrameHandlerV11.java | 1 + .../stomp/v12/StompFrameHandlerV12.java | 1 + .../artemis/ra/ActiveMQRABytesMessage.java | 27 +++ .../ra/ActiveMQRAConnectionFactoryImpl.java | 14 ++ .../ra/ActiveMQRAConnectionManager.java | 1 + .../ra/ActiveMQRAConnectionMetaData.java | 8 + .../artemis/ra/ActiveMQRACredential.java | 1 + .../ra/ActiveMQRALocalTransaction.java | 3 + .../ra/ActiveMQRAManagedConnection.java | 12 ++ .../ActiveMQRAManagedConnectionFactory.java | 8 + .../artemis/ra/ActiveMQRAMapMessage.java | 25 +++ .../artemis/ra/ActiveMQRAMessage.java | 45 +++++ .../artemis/ra/ActiveMQRAMessageConsumer.java | 7 + .../artemis/ra/ActiveMQRAMessageListener.java | 1 + .../artemis/ra/ActiveMQRAMessageProducer.java | 16 ++ .../artemis/ra/ActiveMQRAMetaData.java | 4 + .../artemis/ra/ActiveMQRAObjectMessage.java | 2 + .../artemis/ra/ActiveMQRAQueueReceiver.java | 1 + .../artemis/ra/ActiveMQRAQueueSender.java | 3 + .../artemis/ra/ActiveMQRASession.java | 40 +++++ .../ra/ActiveMQRASessionFactoryImpl.java | 14 ++ .../artemis/ra/ActiveMQRAStreamMessage.java | 24 +++ .../artemis/ra/ActiveMQRATextMessage.java | 2 + .../artemis/ra/ActiveMQRATopicPublisher.java | 5 + .../artemis/ra/ActiveMQRATopicSubscriber.java | 2 + .../artemis/ra/ActiveMQRAXAResource.java | 10 ++ .../activemq/artemis/ra/ActiveMQRaUtils.java | 2 + .../artemis/ra/ActiveMQResourceAdapter.java | 5 + .../artemis/ra/inflow/ActiveMQActivation.java | 3 + .../ra/inflow/ActiveMQActivationSpec.java | 3 + .../ra/inflow/ActiveMQMessageHandler.java | 1 + .../ActiveMQBootstrapListener.java | 2 + .../RestMessagingBootstrapListener.java | 2 + .../ServletContextBindingRegistry.java | 4 + .../rest/queue/AcknowledgedQueueConsumer.java | 1 + .../artemis/rest/queue/ConsumersResource.java | 2 + .../rest/queue/push/ActiveMQPushStrategy.java | 1 + .../rest/queue/push/FilePushStore.java | 5 + .../artemis/rest/queue/push/UriStrategy.java | 5 + .../rest/queue/push/UriTemplateStrategy.java | 1 + .../AcknowledgedSubscriptionResource.java | 6 + .../rest/topic/SubscriptionResource.java | 6 + .../rest/topic/SubscriptionsResource.java | 2 + .../rest/topic/TopicServiceManager.java | 2 + .../rest/util/CustomHeaderLinkStrategy.java | 1 + .../rest/util/LinkHeaderLinkStrategy.java | 1 + .../artemis/rest/util/TimeoutTask.java | 1 + .../artemis/rest/test/AutoAckTopicTest.java | 2 + .../activemq/artemis/rest/test/JMSTest.java | 1 + .../artemis/rest/test/TransformTest.java | 1 + .../selector/filter/ArithmeticExpression.java | 11 ++ .../selector/filter/BinaryExpression.java | 3 + .../selector/filter/ComparisonExpression.java | 16 ++ .../selector/filter/ConstantExpression.java | 5 + .../selector/filter/LogicExpression.java | 6 + .../selector/filter/PropertyExpression.java | 4 + .../selector/filter/UnaryExpression.java | 14 ++ .../selector/filter/XPathExpression.java | 4 + .../selector/filter/XQueryExpression.java | 3 + .../selector/filter/XalanXPathEvaluator.java | 1 + .../artemis/selector/impl/LRUCache.java | 1 + .../artemis/selector/SelectorTest.java | 3 + .../core/config/impl/ConfigurationImpl.java | 155 ++++++++++++++++++ .../artemis/core/config/impl/Validators.java | 12 ++ .../impl/FileConfigurationParser.java | 1 + .../artemis/core/filter/impl/FilterImpl.java | 2 + .../management/impl/AcceptorControlImpl.java | 6 + .../impl/ActiveMQServerControlImpl.java | 99 +++++++++++ .../management/impl/AddressControlImpl.java | 10 ++ .../management/impl/BridgeControlImpl.java | 15 ++ .../impl/BroadcastGroupControlImpl.java | 10 ++ .../impl/ClusterConnectionControlImpl.java | 15 ++ .../management/impl/DivertControlImpl.java | 7 + .../management/impl/QueueControlImpl.java | 51 ++++++ .../core/messagecounter/MessageCounter.java | 1 + .../impl/MessageCounterManagerImpl.java | 12 ++ .../artemis/core/paging/cursor/PageCache.java | 1 + .../paging/cursor/PagedReferenceImpl.java | 6 + .../paging/cursor/impl/PageCacheImpl.java | 6 + .../cursor/impl/PageCursorProviderImpl.java | 18 ++ .../paging/cursor/impl/PagePositionImpl.java | 7 + .../impl/PageSubscriptionCounterImpl.java | 9 + .../cursor/impl/PageSubscriptionImpl.java | 35 ++++ .../artemis/core/paging/impl/Page.java | 1 + .../core/paging/impl/PageSyncTimer.java | 1 + .../paging/impl/PageTransactionInfoImpl.java | 17 ++ .../core/paging/impl/PagedMessageImpl.java | 7 + .../core/paging/impl/PagingManagerImpl.java | 13 ++ .../paging/impl/PagingStoreFactoryNIO.java | 5 + .../core/paging/impl/PagingStoreImpl.java | 38 +++++ .../impl/journal/BatchingIDGenerator.java | 5 + .../impl/journal/DescribeJournal.java | 11 ++ .../impl/journal/JournalStorageManager.java | 131 +++++++++++++++ .../impl/journal/LargeServerMessageImpl.java | 12 ++ .../impl/journal/OperationContextImpl.java | 8 + .../nullpm/NullStorageLargeServerMessage.java | 1 + .../impl/nullpm/NullStorageManager.java | 3 + .../core/postoffice/impl/AddressImpl.java | 7 + .../core/postoffice/impl/BindingsImpl.java | 7 + .../core/postoffice/impl/DivertBinding.java | 13 ++ .../postoffice/impl/DuplicateIDCacheImpl.java | 6 + .../postoffice/impl/LocalQueueBinding.java | 16 ++ .../core/postoffice/impl/PostOfficeImpl.java | 37 +++++ .../postoffice/impl/SimpleAddressManager.java | 7 + .../core/ServerSessionPacketHandler.java | 3 + .../core/impl/ActiveMQPacketHandler.java | 1 + .../core/impl/CoreProtocolManager.java | 8 + .../core/impl/CoreProtocolManagerFactory.java | 1 + .../core/impl/CoreSessionCallback.java | 7 + .../core/registry/JndiBindingRegistry.java | 4 + .../core/registry/MapBindingRegistry.java | 4 + .../core/remoting/impl/invm/InVMAcceptor.java | 15 ++ .../impl/invm/InVMAcceptorFactory.java | 1 + .../remoting/impl/invm/InVMConnection.java | 17 ++ .../remoting/impl/invm/InVMConnector.java | 11 ++ .../impl/invm/InVMConnectorFactory.java | 1 + .../impl/netty/HttpAcceptorHandler.java | 1 + .../impl/netty/HttpKeepAliveRunnable.java | 1 + .../remoting/impl/netty/NettyAcceptor.java | 16 ++ .../impl/netty/NettyAcceptorFactory.java | 1 + .../server/impl/RemotingServiceImpl.java | 16 ++ .../core/replication/ReplicatedJournal.java | 30 ++++ .../core/replication/ReplicationEndpoint.java | 3 + .../core/replication/ReplicationManager.java | 6 + .../core/security/impl/SecurityStoreImpl.java | 4 + .../core/server/LargeServerMessage.java | 3 + .../artemis/core/server/MemoryManager.java | 4 + .../artemis/core/server/NodeManager.java | 2 + .../artemis/core/server/ServerSession.java | 1 + .../core/server/cluster/BackupManager.java | 7 + .../artemis/core/server/cluster/Bridge.java | 1 + .../core/server/cluster/ClusterControl.java | 1 + .../core/server/cluster/ClusterManager.java | 3 + .../server/cluster/ha/ColocatedHAManager.java | 3 + .../core/server/cluster/ha/ReplicaPolicy.java | 3 + .../server/cluster/ha/ReplicatedPolicy.java | 1 + .../core/server/cluster/impl/BridgeImpl.java | 27 +++ .../cluster/impl/BroadcastGroupImpl.java | 10 ++ .../cluster/impl/ClusterConnectionBridge.java | 1 + .../cluster/impl/ClusterConnectionImpl.java | 30 ++++ .../server/cluster/impl/Redistributor.java | 10 ++ .../cluster/impl/RemoteQueueBindingImpl.java | 18 ++ .../server/cluster/qourum/BooleanVote.java | 1 + .../group/impl/GroupHandlingAbstract.java | 4 + .../group/impl/LocalGroupingHandler.java | 14 ++ .../group/impl/RemoteGroupingHandler.java | 9 + .../core/server/impl/ActiveMQServerImpl.java | 61 +++++++ .../impl/AutoCreatedQueueManagerImpl.java | 1 + .../core/server/impl/ConnectorsService.java | 3 + .../artemis/core/server/impl/DivertImpl.java | 6 + .../core/server/impl/LastValueQueue.java | 14 ++ .../core/server/impl/LiveOnlyActivation.java | 2 + .../server/impl/MessageReferenceImpl.java | 15 ++ .../server/impl/PostOfficeJournalLoader.java | 3 + .../core/server/impl/QueueFactoryImpl.java | 2 + .../artemis/core/server/impl/QueueImpl.java | 97 +++++++++++ .../core/server/impl/RoutingContextImpl.java | 11 ++ .../impl/ScheduledDeliveryHandlerImpl.java | 7 + .../core/server/impl/ServerConsumerImpl.java | 29 ++++ .../core/server/impl/ServerMessageImpl.java | 22 +++ .../core/server/impl/ServerSessionImpl.java | 57 +++++++ .../core/server/impl/ServiceRegistryImpl.java | 4 + .../impl/SharedNothingBackupActivation.java | 2 + .../impl/SharedNothingLiveActivation.java | 5 + .../impl/SharedStoreBackupActivation.java | 4 + .../impl/SharedStoreLiveActivation.java | 2 + .../impl/TransientQueueManagerImpl.java | 1 + .../impl/ManagementServiceImpl.java | 35 ++++ .../core/settings/impl/AddressSettings.java | 1 + .../impl/HierarchicalObjectRepository.java | 13 ++ .../TransactionOperationAbstract.java | 6 + .../impl/BindingsTransactionImpl.java | 1 + .../transaction/impl/ResourceManagerImpl.java | 11 ++ .../transaction/impl/TransactionImpl.java | 27 +++ .../security/ActiveMQSecurityManagerImpl.java | 2 + .../core/security/jaas/PropertiesLoader.java | 2 + ...MAcceptorTransportConfigurationSchema.java | 1 + ...PAcceptorTransportConfigurationSchema.java | 1 + .../security/jaas/GuestLoginModuleTest.java | 2 + .../security/jaas/LDAPLoginModuleTest.java | 2 + .../jaas/LDAPModuleRoleExpansionTest.java | 1 + .../jaas/PropertiesLoginModuleTest.java | 3 + .../jaas/StubCertificateLoginModule.java | 2 + .../security/jaas/StubX509Certificate.java | 16 ++ .../group/impl/ClusteredResetMockTest.java | 1 + .../impl/ScheduledDeliveryHandlerTest.java | 1 + .../artemis/core/settings/RepositoryTest.java | 1 + .../artemis/tests/util/ActiveMQTestBase.java | 12 ++ .../artemis/tests/util/RemoveFolder.java | 1 + .../recovery/ActiveMQXAResourceWrapper.java | 12 ++ .../artemis/component/WebServerComponent.java | 3 + .../cli/test/WebServerComponentTest.java | 1 + .../ApplicationLayerFailoverExample.java | 1 + .../ClientSideFailoverListerExample.java | 1 + .../artemis/jms/example/PerfBase.java | 1 + .../jms/soak/example/SoakReceiver.java | 2 + .../artemis/jms/soak/example/SoakSender.java | 1 + .../example/HatColourChangeTransformer.java | 1 + .../example/AddForwardingTimeTransformer.java | 1 + .../jms/example/SimpleInterceptor.java | 1 + .../jms/example/SimpleInterceptor.java | 1 + .../ManagementNotificationExample.java | 1 + .../jms/example/MessageGroupExample.java | 1 + .../jms/example/MessageGroup2Example.java | 1 + .../jms/example/MessagePriorityExample.java | 1 + .../jms/example/TextReverserService.java | 1 + .../jms/example/QueueSelectorExample.java | 1 + .../jms/example/RequestReplyExample.java | 1 + .../example/SendAcknowledgementsExample.java | 1 + .../artemis/jms/example/ExampleListener.java | 1 + .../jms/example/StaticSelectorExample.java | 1 + .../jms/example/TopicSelectorExample2.java | 1 + .../artemis/jms/example/DummyXid.java | 3 + .../jms/example/XAHeuristicExample.java | 1 + .../artemis/jms/example/DummyXid.java | 3 + .../artemis/jms/example/DummyXid.java | 3 + .../artemis/jms/example/XASendExample.java | 1 + .../artemis/openwire/example/Chat.java | 1 + .../jms/example/MyStompInterceptor.java | 1 + .../spring/SpringBindingRegistry.java | 4 + .../spring/SpringJmsBootstrap.java | 1 + .../broker/artemiswrapper/InVMNameParser.java | 1 + .../artemiswrapper/InVMNamingContext.java | 34 ++++ .../NonSerializableFactory.java | 1 + .../broker/region/policy/PolicyMap.java | 1 + .../transport/tcp/TcpTransportFactory.java | 3 + .../activemq/ActiveMQMessageAuditTest.java | 2 + .../ActiveMQXAConnectionFactoryTest.java | 3 + .../activemq/ConnectionCleanupTest.java | 2 + ...ctionCloseMultipleTimesConcurrentTest.java | 2 + .../ConnectionCloseMultipleTimesTest.java | 2 + .../ConsumerReceiveWithTimeoutTest.java | 3 + .../activemq/EmbeddedBrokerTestSupport.java | 2 + .../org/apache/activemq/ExpiryHogTest.java | 2 + .../JMSDurableTopicRedeliverTest.java | 1 + .../activemq/JMSQueueRedeliverTest.java | 1 + .../apache/activemq/JMSXAConsumerTest.java | 4 + .../activemq/JmsAutoAckListenerTest.java | 3 + .../org/apache/activemq/JmsAutoAckTest.java | 2 + .../activemq/JmsClientAckListenerTest.java | 3 + .../org/apache/activemq/JmsClientAckTest.java | 2 + .../JmsConsumerResetActiveListenerTest.java | 4 + .../JmsCreateConsumerInOnMessageTest.java | 3 + ...msDurableQueueWildcardSendReceiveTest.java | 3 + .../activemq/JmsDurableTopicSelectorTest.java | 1 + .../JmsDurableTopicSendReceiveTest.java | 1 + .../JmsDurableTopicTransactionTest.java | 1 + ...msDurableTopicWildcardSendReceiveTest.java | 3 + .../JmsMultipleBrokersTestSupport.java | 5 + .../JmsMultipleClientsTestSupport.java | 1 + .../JmsQueueCompositeSendReceiveTest.java | 4 + .../activemq/JmsQueueRequestReplyTest.java | 1 + .../apache/activemq/JmsQueueSelectorTest.java | 1 + .../activemq/JmsQueueSendReceiveTest.java | 1 + ...veTwoConnectionsStartBeforeBrokerTest.java | 4 + ...sQueueSendReceiveUsingTwoSessionsTest.java | 1 + ...JmsQueueTopicCompositeSendReceiveTest.java | 4 + .../JmsQueueWildcardSendReceiveTest.java | 3 + .../apache/activemq/JmsRedeliveredTest.java | 4 + .../activemq/JmsSendReceiveTestSupport.java | 2 + ...sSendReceiveWithMessageExpirationTest.java | 2 + .../activemq/JmsSessionRecoverTest.java | 4 + .../org/apache/activemq/JmsTestSupport.java | 2 + .../JmsTopicCompositeSendReceiveTest.java | 4 + .../activemq/JmsTopicRedeliverTest.java | 4 + .../activemq/JmsTopicRequestReplyTest.java | 4 + .../apache/activemq/JmsTopicSelectorTest.java | 2 + .../JmsTopicSendReceiveSubscriberTest.java | 1 + .../activemq/JmsTopicSendReceiveTest.java | 2 + ...opicSendReceiveWithTwoConnectionsTest.java | 3 + ...dReceiveWithTwoConnectionsWithJMXTest.java | 1 + .../activemq/JmsTopicSendSameMessageTest.java | 1 + .../activemq/JmsTopicTransactionTest.java | 1 + .../JmsTopicWildcardSendReceiveTest.java | 3 + .../activemq/LargeMessageTestSupport.java | 3 + .../org/apache/activemq/LoadTestBurnIn.java | 5 + .../activemq/MessageTransformationTest.java | 2 + .../OnePrefetchAsyncConsumerTest.java | 2 + .../PerDestinationStoreLimitTest.java | 4 + .../ProducerFlowControlSendFailTest.java | 2 + .../activemq/ProducerFlowControlTest.java | 6 + .../ReconnectWithSameClientIDTest.java | 2 + .../advisory/ConsumerListenerTest.java | 4 + .../advisory/DestinationListenerTest.java | 3 + .../activemq/advisory/TempDestDeleteTest.java | 4 + .../apache/activemq/blob/FTPTestSupport.java | 2 + .../apache/activemq/broker/AMQ4351Test.java | 1 + .../activemq/broker/BrokerBenchmark.java | 2 + .../activemq/broker/BrokerRedeliveryTest.java | 1 + ...eateDestinationsOnStartupViaXBeanTest.java | 1 + .../broker/DedicatedTaskRunnerBrokerTest.java | 1 + .../broker/DoubleSubscriptionTest.java | 1 + .../broker/MarshallingBrokerTest.java | 3 + .../broker/MessageExpirationTest.java | 2 + .../broker/QueueMbeanRestartTest.java | 2 + .../broker/ReconnectWithJMXEnabledTest.java | 3 + .../apache/activemq/broker/SpringTest.java | 2 + .../apache/activemq/broker/StubBroker.java | 2 + .../activemq/broker/StubConnection.java | 4 + .../broker/TopicSubscriptionTest.java | 10 ++ .../AdvisoryDuplexNetworkBridgeTest.java | 1 + .../broker/advisory/AdvisoryJmxTest.java | 1 + ...tJDBCQueueMasterSlaveLeaseQuiesceTest.java | 1 + .../ft/DbRestartJDBCQueueMasterSlaveTest.java | 3 + .../broker/ft/DbRestartJDBCQueueTest.java | 6 + .../broker/ft/JDBCQueueMasterSlaveTest.java | 4 + ...eueMasterSlaveTestUsingSharedFileTest.java | 4 + .../broker/ft/SyncCreateDataSource.java | 1 + .../kahaDbJdbcLeaseQueueMasterSlaveTest.java | 4 + .../ft/mKahaDbQueueMasterSlaveTest.java | 3 + .../apache/activemq/broker/jmx/PurgeTest.java | 4 + .../broker/mKahaDBXARecoveryBrokerTest.java | 1 + .../broker/mLevelDBXARecoveryBrokerTest.java | 3 + .../security/MessageAuthenticationTest.java | 1 + .../broker/policy/DeadLetterTest.java | 4 + .../broker/policy/DeadLetterTestSupport.java | 2 + .../IndividualDeadLetterViaXmlTest.java | 2 + .../policy/MessageListenerDeadLetterTest.java | 5 + .../policy/NoConsumerDeadLetterTest.java | 5 + .../policy/RoundRobinDispatchPolicyTest.java | 8 + .../activemq/broker/policy/SecureDLQTest.java | 2 + .../region/QueueDuplicatesFromStoreTest.java | 2 + .../broker/region/QueuePurgeTest.java | 2 + .../region/QueueResendDuringShutdownTest.java | 1 + .../SubscriptionAddRemoveQueueTest.java | 37 +++++ .../region/cursors/CursorDurableTest.java | 4 + .../region/cursors/CursorQueueStoreTest.java | 4 + .../broker/region/cursors/CursorSupport.java | 3 + .../region/cursors/StoreBasedCursorTest.java | 2 + .../StoreQueueCursorJDBCNoDuplicateTest.java | 1 + ...StoreQueueCursorMemoryNoDuplicateTest.java | 1 + .../group/MessageGroupHashBucketTest.java | 1 + .../region/group/MessageGroupMapTest.java | 1 + .../broker/store/DefaultStoreBrokerTest.java | 1 + .../store/DefaultStoreRecoveryBrokerTest.java | 2 + .../broker/util/PluginBrokerTest.java | 4 + .../util/TimeStampingBrokerPluginTest.java | 2 + .../util/TraceBrokerPathPluginTest.java | 2 + .../broker/virtual/CompositeQueueTest.java | 2 + .../broker/virtual/CompositeTopicTest.java | 4 + .../DestinationInterceptorDurableSubTest.java | 6 + .../MirroredQueueCorrectMemoryUsageTest.java | 2 + .../broker/virtual/VirtualTopicDLQTest.java | 6 + .../VirtualTopicDisconnectSelectorTest.java | 3 + .../virtual/VirtualTopicPubSubTest.java | 2 + .../VirtualTopicPubSubUsingXBeanTest.java | 3 + .../virtual/VirtualTopicSelectorTest.java | 3 + .../VirtualTopicsAndDurableSubsTest.java | 6 + .../org/apache/activemq/bugs/AMQ1687Test.java | 2 + .../org/apache/activemq/bugs/AMQ1853Test.java | 4 + .../org/apache/activemq/bugs/AMQ1866.java | 1 + .../org/apache/activemq/bugs/AMQ1893Test.java | 1 + .../org/apache/activemq/bugs/AMQ1917Test.java | 5 + .../org/apache/activemq/bugs/AMQ2084Test.java | 2 + .../org/apache/activemq/bugs/AMQ2149Test.java | 10 ++ .../org/apache/activemq/bugs/AMQ2171Test.java | 1 + .../org/apache/activemq/bugs/AMQ2314Test.java | 5 + .../org/apache/activemq/bugs/AMQ2439Test.java | 2 + .../org/apache/activemq/bugs/AMQ2489Test.java | 4 + .../org/apache/activemq/bugs/AMQ2512Test.java | 1 + .../org/apache/activemq/bugs/AMQ2528Test.java | 1 + .../org/apache/activemq/bugs/AMQ2571Test.java | 1 + .../org/apache/activemq/bugs/AMQ2580Test.java | 2 + .../bugs/AMQ2584ConcurrentDlqTest.java | 4 + .../org/apache/activemq/bugs/AMQ2645Test.java | 1 + .../org/apache/activemq/bugs/AMQ2751Test.java | 1 + .../org/apache/activemq/bugs/AMQ3014Test.java | 1 + .../org/apache/activemq/bugs/AMQ3274Test.java | 4 + .../org/apache/activemq/bugs/AMQ3436Test.java | 1 + .../org/apache/activemq/bugs/AMQ3465Test.java | 3 + .../org/apache/activemq/bugs/AMQ3678Test.java | 1 + .../org/apache/activemq/bugs/AMQ3932Test.java | 3 + .../org/apache/activemq/bugs/AMQ4083Test.java | 3 + .../org/apache/activemq/bugs/AMQ4092Test.java | 1 + .../org/apache/activemq/bugs/AMQ4160Test.java | 2 + .../org/apache/activemq/bugs/AMQ4221Test.java | 1 + .../bugs/AMQ4485LowLimitLevelDBTest.java | 1 + .../activemq/bugs/AMQ4485LowLimitTest.java | 1 + ...rokersWithNDestsFanoutTransactionTest.java | 1 + .../org/apache/activemq/bugs/AMQ4485Test.java | 3 + .../org/apache/activemq/bugs/AMQ4607Test.java | 2 + .../org/apache/activemq/bugs/AMQ4636Test.java | 1 + .../org/apache/activemq/bugs/AMQ4930Test.java | 2 + .../org/apache/activemq/bugs/AMQ4950Test.java | 3 + .../activemq/bugs/AMQ5266SingleDestTest.java | 2 + .../bugs/AMQ5266StarvedConsumerTest.java | 2 + .../org/apache/activemq/bugs/AMQ5266Test.java | 2 + .../org/apache/activemq/bugs/AMQ5567Test.java | 1 + .../bugs/ConnectionPerMessageTest.java | 4 + .../apache/activemq/bugs/CraigsBugTest.java | 2 + .../activemq/bugs/DoubleExpireTest.java | 1 + .../activemq/bugs/DurableConsumerTest.java | 6 + .../bugs/JMSDurableTopicNoLocalTest.java | 1 + .../bugs/JmsDurableTopicSlowReceiveTest.java | 4 + .../apache/activemq/bugs/JmsTimeoutTest.java | 3 + .../activemq/bugs/MemoryUsageBrokerTest.java | 2 + ...ptimizeAcknowledgeWithExpiredMsgsTest.java | 2 + .../activemq/bugs/OutOfOrderTestCase.java | 2 + .../bugs/QueueWorkerPrefetchTest.java | 4 + .../activemq/bugs/SlowConsumerTest.java | 2 + .../bugs/TransactionNotStartedErrorTest.java | 9 + .../bugs/TrapMessageInJDBCStoreTest.java | 2 + .../activemq/bugs/VMTransportClosureTest.java | 5 + .../activemq/bugs/amq1974/TryJmsClient.java | 2 + .../activemq/bugs/amq1974/TryJmsManager.java | 2 + .../command/ActiveMQBytesMessageTest.java | 2 + .../command/ActiveMQDestinationTest.java | 3 + .../command/ActiveMQMapMessageTest.java | 2 + .../command/ActiveMQObjectMessageTest.java | 2 + .../command/ActiveMQStreamMessageTest.java | 2 + .../command/DataStructureTestSupport.java | 1 + .../command/MessageCompressionTest.java | 2 + .../activemq/config/BrokerXmlConfigTest.java | 1 + .../activemq/console/command/AMQ3410Test.java | 2 + .../activemq/console/command/AMQ3411Test.java | 2 + .../activemq/filter/DummyPolicyEntry.java | 1 + .../jndi/XAConnectionFactoryTest.java | 1 + .../activemq/joramtests/ActiveMQAdmin.java | 16 ++ .../org/apache/activemq/load/LoadClient.java | 1 + .../org/apache/activemq/load/LoadTest.java | 2 + .../management/BoundedRangeStatisticTest.java | 1 + .../activemq/memory/buffer/DummyMessage.java | 2 + .../buffer/MemoryBufferTestSupport.java | 1 + .../buffer/OrderBasedMemoryBufferTest.java | 1 + .../buffer/SizeBasedMessageBufferTest.java | 1 + .../DemandForwardingBridgeFilterTest.java | 2 + .../network/ForwardingBridgeTest.java | 2 + .../network/MulticastNetworkTest.java | 2 + .../activemq/network/NetworkLoadTest.java | 4 + .../network/NetworkReconnectTest.java | 3 + .../activemq/network/NetworkRestartTest.java | 2 + .../activemq/network/jms/QueueBridgeTest.java | 3 + .../network/jms/QueueBridgeXBeanTest.java | 1 + .../network/jms/TopicBridgeSpringTest.java | 3 + .../network/jms/TopicBridgeXBeanTest.java | 1 + .../activemq/openwire/BrokerInfoData.java | 1 + .../activemq/openwire/WireFormatInfoData.java | 1 + .../openwire/v1/ActiveMQBytesMessageTest.java | 2 + .../v1/ActiveMQDestinationTestSupport.java | 1 + .../openwire/v1/ActiveMQMapMessageTest.java | 2 + .../openwire/v1/ActiveMQMessageTest.java | 2 + .../v1/ActiveMQObjectMessageTest.java | 2 + .../openwire/v1/ActiveMQQueueTest.java | 2 + .../v1/ActiveMQStreamMessageTest.java | 2 + .../ActiveMQTempDestinationTestSupport.java | 1 + .../openwire/v1/ActiveMQTempQueueTest.java | 2 + .../openwire/v1/ActiveMQTempTopicTest.java | 2 + .../openwire/v1/ActiveMQTextMessageTest.java | 2 + .../openwire/v1/ActiveMQTopicTest.java | 2 + .../openwire/v1/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v1/BrokerIdTest.java | 2 + .../activemq/openwire/v1/BrokerInfoTest.java | 2 + .../openwire/v1/ConnectionControlTest.java | 2 + .../openwire/v1/ConnectionErrorTest.java | 2 + .../openwire/v1/ConnectionIdTest.java | 2 + .../openwire/v1/ConnectionInfoTest.java | 2 + .../openwire/v1/ConsumerControlTest.java | 2 + .../activemq/openwire/v1/ConsumerIdTest.java | 2 + .../openwire/v1/ConsumerInfoTest.java | 2 + .../openwire/v1/ControlCommandTest.java | 2 + .../openwire/v1/DataArrayResponseTest.java | 2 + .../openwire/v1/DataResponseTest.java | 2 + .../openwire/v1/DestinationInfoTest.java | 2 + .../openwire/v1/DiscoveryEventTest.java | 2 + .../openwire/v1/ExceptionResponseTest.java | 2 + .../openwire/v1/FlushCommandTest.java | 2 + .../openwire/v1/IntegerResponseTest.java | 2 + .../openwire/v1/JournalQueueAckTest.java | 2 + .../openwire/v1/JournalTopicAckTest.java | 2 + .../openwire/v1/JournalTraceTest.java | 2 + .../openwire/v1/JournalTransactionTest.java | 2 + .../openwire/v1/KeepAliveInfoTest.java | 2 + .../openwire/v1/LastPartialCommandTest.java | 2 + .../openwire/v1/LocalTransactionIdTest.java | 2 + .../activemq/openwire/v1/MessageAckTest.java | 2 + .../v1/MessageDispatchNotificationTest.java | 2 + .../openwire/v1/MessageDispatchTest.java | 2 + .../activemq/openwire/v1/MessageIdTest.java | 2 + .../openwire/v1/MessageTestSupport.java | 1 + .../openwire/v1/NetworkBridgeFilterTest.java | 2 + .../openwire/v1/PartialCommandTest.java | 2 + .../activemq/openwire/v1/ProducerIdTest.java | 2 + .../openwire/v1/ProducerInfoTest.java | 2 + .../activemq/openwire/v1/RemoveInfoTest.java | 2 + .../v1/RemoveSubscriptionInfoTest.java | 2 + .../openwire/v1/ReplayCommandTest.java | 2 + .../activemq/openwire/v1/ResponseTest.java | 2 + .../activemq/openwire/v1/SessionIdTest.java | 2 + .../activemq/openwire/v1/SessionInfoTest.java | 2 + .../openwire/v1/ShutdownInfoTest.java | 2 + .../openwire/v1/SubscriptionInfoTest.java | 2 + .../openwire/v1/TransactionIdTestSupport.java | 1 + .../openwire/v1/TransactionInfoTest.java | 2 + .../openwire/v1/WireFormatInfoTest.java | 2 + .../openwire/v1/XATransactionIdTest.java | 2 + .../openwire/v2/ActiveMQBytesMessageTest.java | 2 + .../v2/ActiveMQDestinationTestSupport.java | 1 + .../openwire/v2/ActiveMQMapMessageTest.java | 2 + .../openwire/v2/ActiveMQMessageTest.java | 2 + .../v2/ActiveMQObjectMessageTest.java | 2 + .../openwire/v2/ActiveMQQueueTest.java | 2 + .../v2/ActiveMQStreamMessageTest.java | 2 + .../ActiveMQTempDestinationTestSupport.java | 1 + .../openwire/v2/ActiveMQTempQueueTest.java | 2 + .../openwire/v2/ActiveMQTempTopicTest.java | 2 + .../openwire/v2/ActiveMQTextMessageTest.java | 2 + .../openwire/v2/ActiveMQTopicTest.java | 2 + .../openwire/v2/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v2/BrokerIdTest.java | 2 + .../activemq/openwire/v2/BrokerInfoTest.java | 2 + .../openwire/v2/ConnectionControlTest.java | 2 + .../openwire/v2/ConnectionErrorTest.java | 2 + .../openwire/v2/ConnectionIdTest.java | 2 + .../openwire/v2/ConnectionInfoTest.java | 2 + .../openwire/v2/ConsumerControlTest.java | 2 + .../activemq/openwire/v2/ConsumerIdTest.java | 2 + .../openwire/v2/ConsumerInfoTest.java | 2 + .../openwire/v2/ControlCommandTest.java | 2 + .../openwire/v2/DataArrayResponseTest.java | 2 + .../openwire/v2/DataResponseTest.java | 2 + .../openwire/v2/DestinationInfoTest.java | 2 + .../openwire/v2/DiscoveryEventTest.java | 2 + .../openwire/v2/ExceptionResponseTest.java | 2 + .../openwire/v2/FlushCommandTest.java | 2 + .../openwire/v2/IntegerResponseTest.java | 2 + .../openwire/v2/JournalQueueAckTest.java | 2 + .../openwire/v2/JournalTopicAckTest.java | 2 + .../openwire/v2/JournalTraceTest.java | 2 + .../openwire/v2/JournalTransactionTest.java | 2 + .../openwire/v2/KeepAliveInfoTest.java | 2 + .../openwire/v2/LastPartialCommandTest.java | 2 + .../openwire/v2/LocalTransactionIdTest.java | 2 + .../activemq/openwire/v2/MessageAckTest.java | 2 + .../v2/MessageDispatchNotificationTest.java | 2 + .../openwire/v2/MessageDispatchTest.java | 2 + .../activemq/openwire/v2/MessageIdTest.java | 2 + .../activemq/openwire/v2/MessagePullTest.java | 2 + .../openwire/v2/MessageTestSupport.java | 1 + .../openwire/v2/NetworkBridgeFilterTest.java | 2 + .../openwire/v2/PartialCommandTest.java | 2 + .../activemq/openwire/v2/ProducerIdTest.java | 2 + .../openwire/v2/ProducerInfoTest.java | 2 + .../activemq/openwire/v2/RemoveInfoTest.java | 2 + .../v2/RemoveSubscriptionInfoTest.java | 2 + .../openwire/v2/ReplayCommandTest.java | 2 + .../activemq/openwire/v2/ResponseTest.java | 2 + .../activemq/openwire/v2/SessionIdTest.java | 2 + .../activemq/openwire/v2/SessionInfoTest.java | 2 + .../openwire/v2/ShutdownInfoTest.java | 2 + .../openwire/v2/SubscriptionInfoTest.java | 2 + .../openwire/v2/TransactionIdTestSupport.java | 1 + .../openwire/v2/TransactionInfoTest.java | 2 + .../openwire/v2/WireFormatInfoTest.java | 2 + .../openwire/v2/XATransactionIdTest.java | 2 + .../openwire/v3/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v3/BrokerIdTest.java | 2 + .../activemq/openwire/v3/BrokerInfoTest.java | 2 + .../openwire/v3/ConnectionControlTest.java | 2 + .../openwire/v3/ConnectionErrorTest.java | 2 + .../openwire/v3/ConnectionIdTest.java | 2 + .../openwire/v3/ConnectionInfoTest.java | 2 + .../openwire/v3/ConsumerControlTest.java | 2 + .../activemq/openwire/v3/ConsumerIdTest.java | 2 + .../openwire/v3/ConsumerInfoTest.java | 2 + .../openwire/v3/ControlCommandTest.java | 2 + .../openwire/v3/DataArrayResponseTest.java | 2 + .../openwire/v3/DataResponseTest.java | 2 + .../openwire/v3/DestinationInfoTest.java | 2 + .../openwire/v3/DiscoveryEventTest.java | 2 + .../openwire/v3/ExceptionResponseTest.java | 2 + .../openwire/v3/FlushCommandTest.java | 2 + .../openwire/v3/IntegerResponseTest.java | 2 + .../openwire/v3/JournalQueueAckTest.java | 2 + .../openwire/v3/JournalTopicAckTest.java | 2 + .../openwire/v3/JournalTraceTest.java | 2 + .../openwire/v3/JournalTransactionTest.java | 2 + .../openwire/v3/KeepAliveInfoTest.java | 2 + .../openwire/v3/LastPartialCommandTest.java | 2 + .../openwire/v3/LocalTransactionIdTest.java | 2 + .../activemq/openwire/v3/MessageAckTest.java | 2 + .../v3/MessageDispatchNotificationTest.java | 2 + .../openwire/v3/MessageDispatchTest.java | 2 + .../activemq/openwire/v3/MessageIdTest.java | 2 + .../activemq/openwire/v3/MessagePullTest.java | 2 + .../openwire/v3/MessageTestSupport.java | 1 + .../openwire/v3/NetworkBridgeFilterTest.java | 2 + .../openwire/v3/PartialCommandTest.java | 2 + .../activemq/openwire/v3/ProducerAckTest.java | 2 + .../activemq/openwire/v3/ProducerIdTest.java | 2 + .../openwire/v3/ProducerInfoTest.java | 2 + .../activemq/openwire/v3/RemoveInfoTest.java | 2 + .../v3/RemoveSubscriptionInfoTest.java | 2 + .../openwire/v3/ReplayCommandTest.java | 2 + .../activemq/openwire/v3/ResponseTest.java | 2 + .../activemq/openwire/v3/SessionIdTest.java | 2 + .../activemq/openwire/v3/SessionInfoTest.java | 2 + .../openwire/v3/ShutdownInfoTest.java | 2 + .../openwire/v3/SubscriptionInfoTest.java | 2 + .../openwire/v3/TransactionIdTestSupport.java | 1 + .../openwire/v3/TransactionInfoTest.java | 2 + .../openwire/v3/XATransactionIdTest.java | 2 + .../openwire/v4/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v4/BrokerIdTest.java | 2 + .../activemq/openwire/v4/BrokerInfoTest.java | 2 + .../openwire/v4/ConnectionControlTest.java | 2 + .../openwire/v4/ConnectionErrorTest.java | 2 + .../openwire/v4/ConnectionIdTest.java | 2 + .../openwire/v4/ConnectionInfoTest.java | 2 + .../openwire/v4/ConsumerControlTest.java | 2 + .../activemq/openwire/v4/ConsumerIdTest.java | 2 + .../openwire/v4/ConsumerInfoTest.java | 2 + .../openwire/v4/ControlCommandTest.java | 2 + .../openwire/v4/DataArrayResponseTest.java | 2 + .../openwire/v4/DataResponseTest.java | 2 + .../openwire/v4/DestinationInfoTest.java | 2 + .../openwire/v4/DiscoveryEventTest.java | 2 + .../openwire/v4/ExceptionResponseTest.java | 2 + .../openwire/v4/FlushCommandTest.java | 2 + .../openwire/v4/IntegerResponseTest.java | 2 + .../openwire/v4/JournalQueueAckTest.java | 2 + .../openwire/v4/JournalTopicAckTest.java | 2 + .../openwire/v4/JournalTraceTest.java | 2 + .../openwire/v4/JournalTransactionTest.java | 2 + .../openwire/v4/KeepAliveInfoTest.java | 2 + .../openwire/v4/LastPartialCommandTest.java | 2 + .../openwire/v4/LocalTransactionIdTest.java | 2 + .../activemq/openwire/v4/MessageAckTest.java | 2 + .../v4/MessageDispatchNotificationTest.java | 2 + .../openwire/v4/MessageDispatchTest.java | 2 + .../activemq/openwire/v4/MessageIdTest.java | 2 + .../activemq/openwire/v4/MessagePullTest.java | 2 + .../openwire/v4/MessageTestSupport.java | 1 + .../openwire/v4/NetworkBridgeFilterTest.java | 2 + .../openwire/v4/PartialCommandTest.java | 2 + .../activemq/openwire/v4/ProducerAckTest.java | 2 + .../activemq/openwire/v4/ProducerIdTest.java | 2 + .../openwire/v4/ProducerInfoTest.java | 2 + .../activemq/openwire/v4/RemoveInfoTest.java | 2 + .../v4/RemoveSubscriptionInfoTest.java | 2 + .../openwire/v4/ReplayCommandTest.java | 2 + .../activemq/openwire/v4/ResponseTest.java | 2 + .../activemq/openwire/v4/SessionIdTest.java | 2 + .../activemq/openwire/v4/SessionInfoTest.java | 2 + .../openwire/v4/ShutdownInfoTest.java | 2 + .../openwire/v4/SubscriptionInfoTest.java | 2 + .../openwire/v4/TransactionIdTestSupport.java | 1 + .../openwire/v4/TransactionInfoTest.java | 2 + .../openwire/v4/XATransactionIdTest.java | 2 + .../openwire/v5/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v5/BrokerIdTest.java | 2 + .../activemq/openwire/v5/BrokerInfoTest.java | 2 + .../openwire/v5/ConnectionControlTest.java | 2 + .../openwire/v5/ConnectionErrorTest.java | 2 + .../openwire/v5/ConnectionIdTest.java | 2 + .../openwire/v5/ConnectionInfoTest.java | 2 + .../openwire/v5/ConsumerControlTest.java | 2 + .../activemq/openwire/v5/ConsumerIdTest.java | 2 + .../openwire/v5/ConsumerInfoTest.java | 2 + .../openwire/v5/ControlCommandTest.java | 2 + .../openwire/v5/DataArrayResponseTest.java | 2 + .../openwire/v5/DataResponseTest.java | 2 + .../openwire/v5/DestinationInfoTest.java | 2 + .../openwire/v5/DiscoveryEventTest.java | 2 + .../openwire/v5/ExceptionResponseTest.java | 2 + .../openwire/v5/FlushCommandTest.java | 2 + .../openwire/v5/IntegerResponseTest.java | 2 + .../openwire/v5/JournalQueueAckTest.java | 2 + .../openwire/v5/JournalTopicAckTest.java | 2 + .../openwire/v5/JournalTraceTest.java | 2 + .../openwire/v5/JournalTransactionTest.java | 2 + .../openwire/v5/KeepAliveInfoTest.java | 2 + .../openwire/v5/LastPartialCommandTest.java | 2 + .../openwire/v5/LocalTransactionIdTest.java | 2 + .../activemq/openwire/v5/MessageAckTest.java | 2 + .../v5/MessageDispatchNotificationTest.java | 2 + .../openwire/v5/MessageDispatchTest.java | 2 + .../activemq/openwire/v5/MessageIdTest.java | 2 + .../activemq/openwire/v5/MessagePullTest.java | 2 + .../openwire/v5/MessageTestSupport.java | 1 + .../openwire/v5/NetworkBridgeFilterTest.java | 2 + .../openwire/v5/PartialCommandTest.java | 2 + .../activemq/openwire/v5/ProducerAckTest.java | 2 + .../activemq/openwire/v5/ProducerIdTest.java | 2 + .../openwire/v5/ProducerInfoTest.java | 2 + .../activemq/openwire/v5/RemoveInfoTest.java | 2 + .../v5/RemoveSubscriptionInfoTest.java | 2 + .../openwire/v5/ReplayCommandTest.java | 2 + .../activemq/openwire/v5/ResponseTest.java | 2 + .../activemq/openwire/v5/SessionIdTest.java | 2 + .../activemq/openwire/v5/SessionInfoTest.java | 2 + .../openwire/v5/ShutdownInfoTest.java | 2 + .../openwire/v5/SubscriptionInfoTest.java | 2 + .../openwire/v5/TransactionIdTestSupport.java | 1 + .../openwire/v5/TransactionInfoTest.java | 2 + .../openwire/v5/XATransactionIdTest.java | 2 + .../openwire/v6/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v6/BrokerIdTest.java | 2 + .../activemq/openwire/v6/BrokerInfoTest.java | 2 + .../openwire/v6/ConnectionControlTest.java | 2 + .../openwire/v6/ConnectionErrorTest.java | 2 + .../openwire/v6/ConnectionIdTest.java | 2 + .../openwire/v6/ConnectionInfoTest.java | 2 + .../openwire/v6/ConsumerControlTest.java | 2 + .../activemq/openwire/v6/ConsumerIdTest.java | 2 + .../openwire/v6/ConsumerInfoTest.java | 2 + .../openwire/v6/ControlCommandTest.java | 2 + .../openwire/v6/DataArrayResponseTest.java | 2 + .../openwire/v6/DataResponseTest.java | 2 + .../openwire/v6/DestinationInfoTest.java | 2 + .../openwire/v6/DiscoveryEventTest.java | 2 + .../openwire/v6/ExceptionResponseTest.java | 2 + .../openwire/v6/FlushCommandTest.java | 2 + .../openwire/v6/IntegerResponseTest.java | 2 + .../openwire/v6/JournalQueueAckTest.java | 2 + .../openwire/v6/JournalTopicAckTest.java | 2 + .../openwire/v6/JournalTraceTest.java | 2 + .../openwire/v6/JournalTransactionTest.java | 2 + .../openwire/v6/KeepAliveInfoTest.java | 2 + .../openwire/v6/LastPartialCommandTest.java | 2 + .../openwire/v6/LocalTransactionIdTest.java | 2 + .../activemq/openwire/v6/MessageAckTest.java | 2 + .../v6/MessageDispatchNotificationTest.java | 2 + .../openwire/v6/MessageDispatchTest.java | 2 + .../activemq/openwire/v6/MessageIdTest.java | 2 + .../activemq/openwire/v6/MessagePullTest.java | 2 + .../openwire/v6/MessageTestSupport.java | 1 + .../openwire/v6/NetworkBridgeFilterTest.java | 2 + .../openwire/v6/PartialCommandTest.java | 2 + .../activemq/openwire/v6/ProducerAckTest.java | 2 + .../activemq/openwire/v6/ProducerIdTest.java | 2 + .../openwire/v6/ProducerInfoTest.java | 2 + .../activemq/openwire/v6/RemoveInfoTest.java | 2 + .../v6/RemoveSubscriptionInfoTest.java | 2 + .../openwire/v6/ReplayCommandTest.java | 2 + .../activemq/openwire/v6/ResponseTest.java | 2 + .../activemq/openwire/v6/SessionIdTest.java | 2 + .../activemq/openwire/v6/SessionInfoTest.java | 2 + .../openwire/v6/ShutdownInfoTest.java | 2 + .../openwire/v6/SubscriptionInfoTest.java | 2 + .../openwire/v6/TransactionIdTestSupport.java | 1 + .../openwire/v6/TransactionInfoTest.java | 2 + .../openwire/v6/XATransactionIdTest.java | 2 + .../openwire/v7/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v7/BrokerIdTest.java | 2 +- .../activemq/openwire/v7/BrokerInfoTest.java | 2 +- .../openwire/v7/ConnectionControlTest.java | 2 +- .../openwire/v7/ConnectionErrorTest.java | 2 +- .../openwire/v7/ConnectionIdTest.java | 2 +- .../openwire/v7/ConnectionInfoTest.java | 2 +- .../openwire/v7/ConsumerControlTest.java | 2 +- .../activemq/openwire/v7/ConsumerIdTest.java | 2 +- .../openwire/v7/ConsumerInfoTest.java | 2 +- .../openwire/v7/ControlCommandTest.java | 2 +- .../openwire/v7/DataArrayResponseTest.java | 2 +- .../openwire/v7/DataResponseTest.java | 2 +- .../openwire/v7/DestinationInfoTest.java | 2 +- .../openwire/v7/DiscoveryEventTest.java | 2 +- .../openwire/v7/ExceptionResponseTest.java | 2 +- .../openwire/v7/FlushCommandTest.java | 2 +- .../openwire/v7/IntegerResponseTest.java | 2 +- .../openwire/v7/JournalQueueAckTest.java | 2 +- .../openwire/v7/JournalTopicAckTest.java | 2 +- .../openwire/v7/JournalTraceTest.java | 2 +- .../openwire/v7/JournalTransactionTest.java | 2 +- .../openwire/v7/KeepAliveInfoTest.java | 2 +- .../openwire/v7/LastPartialCommandTest.java | 2 +- .../openwire/v7/LocalTransactionIdTest.java | 2 +- .../activemq/openwire/v7/MessageAckTest.java | 2 +- .../v7/MessageDispatchNotificationTest.java | 2 +- .../openwire/v7/MessageDispatchTest.java | 2 +- .../activemq/openwire/v7/MessageIdTest.java | 2 +- .../activemq/openwire/v7/MessagePullTest.java | 2 +- .../openwire/v7/MessageTestSupport.java | 2 +- .../openwire/v7/NetworkBridgeFilterTest.java | 2 +- .../openwire/v7/PartialCommandTest.java | 2 +- .../activemq/openwire/v7/ProducerAckTest.java | 2 +- .../activemq/openwire/v7/ProducerIdTest.java | 2 +- .../openwire/v7/ProducerInfoTest.java | 2 +- .../activemq/openwire/v7/RemoveInfoTest.java | 2 +- .../v7/RemoveSubscriptionInfoTest.java | 2 +- .../openwire/v7/ReplayCommandTest.java | 2 +- .../activemq/openwire/v7/ResponseTest.java | 2 +- .../activemq/openwire/v7/SessionIdTest.java | 2 +- .../activemq/openwire/v7/SessionInfoTest.java | 2 +- .../openwire/v7/ShutdownInfoTest.java | 2 +- .../openwire/v7/SubscriptionInfoTest.java | 2 +- .../openwire/v7/TransactionIdTestSupport.java | 2 +- .../openwire/v7/TransactionInfoTest.java | 2 +- .../openwire/v7/XATransactionIdTest.java | 2 +- .../openwire/v8/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v8/BrokerIdTest.java | 2 +- .../activemq/openwire/v8/BrokerInfoTest.java | 2 +- .../openwire/v8/ConnectionControlTest.java | 2 +- .../openwire/v8/ConnectionErrorTest.java | 2 +- .../openwire/v8/ConnectionIdTest.java | 2 +- .../openwire/v8/ConnectionInfoTest.java | 2 +- .../openwire/v8/ConsumerControlTest.java | 2 +- .../activemq/openwire/v8/ConsumerIdTest.java | 2 +- .../openwire/v8/ConsumerInfoTest.java | 2 +- .../openwire/v8/ControlCommandTest.java | 2 +- .../openwire/v8/DataArrayResponseTest.java | 2 +- .../openwire/v8/DataResponseTest.java | 2 +- .../openwire/v8/DestinationInfoTest.java | 2 +- .../openwire/v8/DiscoveryEventTest.java | 2 +- .../openwire/v8/ExceptionResponseTest.java | 2 +- .../openwire/v8/FlushCommandTest.java | 2 +- .../openwire/v8/IntegerResponseTest.java | 2 +- .../openwire/v8/JournalQueueAckTest.java | 2 +- .../openwire/v8/JournalTopicAckTest.java | 2 +- .../openwire/v8/JournalTraceTest.java | 2 +- .../openwire/v8/JournalTransactionTest.java | 2 +- .../openwire/v8/KeepAliveInfoTest.java | 2 +- .../openwire/v8/LastPartialCommandTest.java | 2 +- .../openwire/v8/LocalTransactionIdTest.java | 2 +- .../activemq/openwire/v8/MessageAckTest.java | 2 +- .../v8/MessageDispatchNotificationTest.java | 2 +- .../openwire/v8/MessageDispatchTest.java | 2 +- .../activemq/openwire/v8/MessageIdTest.java | 2 +- .../activemq/openwire/v8/MessagePullTest.java | 2 +- .../openwire/v8/MessageTestSupport.java | 2 +- .../openwire/v8/NetworkBridgeFilterTest.java | 2 +- .../openwire/v8/PartialCommandTest.java | 2 +- .../activemq/openwire/v8/ProducerAckTest.java | 2 +- .../activemq/openwire/v8/ProducerIdTest.java | 2 +- .../openwire/v8/ProducerInfoTest.java | 2 +- .../activemq/openwire/v8/RemoveInfoTest.java | 2 +- .../v8/RemoveSubscriptionInfoTest.java | 2 +- .../openwire/v8/ReplayCommandTest.java | 2 +- .../activemq/openwire/v8/ResponseTest.java | 2 +- .../activemq/openwire/v8/SessionIdTest.java | 2 +- .../activemq/openwire/v8/SessionInfoTest.java | 2 +- .../openwire/v8/ShutdownInfoTest.java | 2 +- .../openwire/v8/SubscriptionInfoTest.java | 2 +- .../openwire/v8/TransactionIdTestSupport.java | 2 +- .../openwire/v8/TransactionInfoTest.java | 2 +- .../openwire/v8/XATransactionIdTest.java | 2 +- .../openwire/v9/BaseCommandTestSupport.java | 1 + .../activemq/openwire/v9/BrokerIdTest.java | 2 +- .../activemq/openwire/v9/BrokerInfoTest.java | 2 +- .../openwire/v9/ConnectionControlTest.java | 2 +- .../openwire/v9/ConnectionErrorTest.java | 2 +- .../openwire/v9/ConnectionIdTest.java | 2 +- .../openwire/v9/ConnectionInfoTest.java | 2 +- .../openwire/v9/ConsumerControlTest.java | 2 +- .../activemq/openwire/v9/ConsumerIdTest.java | 2 +- .../openwire/v9/ConsumerInfoTest.java | 2 +- .../openwire/v9/ControlCommandTest.java | 2 +- .../openwire/v9/DataArrayResponseTest.java | 2 +- .../openwire/v9/DataResponseTest.java | 2 +- .../openwire/v9/DestinationInfoTest.java | 2 +- .../openwire/v9/DiscoveryEventTest.java | 2 +- .../openwire/v9/ExceptionResponseTest.java | 2 +- .../openwire/v9/FlushCommandTest.java | 2 +- .../openwire/v9/IntegerResponseTest.java | 2 +- .../openwire/v9/JournalQueueAckTest.java | 2 +- .../openwire/v9/JournalTopicAckTest.java | 2 +- .../openwire/v9/JournalTraceTest.java | 2 +- .../openwire/v9/JournalTransactionTest.java | 2 +- .../openwire/v9/KeepAliveInfoTest.java | 2 +- .../openwire/v9/LastPartialCommandTest.java | 2 +- .../openwire/v9/LocalTransactionIdTest.java | 2 +- .../activemq/openwire/v9/MessageAckTest.java | 2 +- .../v9/MessageDispatchNotificationTest.java | 2 +- .../openwire/v9/MessageDispatchTest.java | 2 +- .../activemq/openwire/v9/MessageIdTest.java | 2 +- .../activemq/openwire/v9/MessagePullTest.java | 2 +- .../openwire/v9/MessageTestSupport.java | 2 +- .../openwire/v9/NetworkBridgeFilterTest.java | 2 +- .../openwire/v9/PartialCommandTest.java | 2 +- .../activemq/openwire/v9/ProducerAckTest.java | 2 +- .../activemq/openwire/v9/ProducerIdTest.java | 2 +- .../openwire/v9/ProducerInfoTest.java | 2 +- .../activemq/openwire/v9/RemoveInfoTest.java | 2 +- .../v9/RemoveSubscriptionInfoTest.java | 2 +- .../openwire/v9/ReplayCommandTest.java | 2 +- .../activemq/openwire/v9/ResponseTest.java | 2 +- .../activemq/openwire/v9/SessionIdTest.java | 2 +- .../activemq/openwire/v9/SessionInfoTest.java | 2 +- .../openwire/v9/ShutdownInfoTest.java | 2 +- .../openwire/v9/SubscriptionInfoTest.java | 2 +- .../openwire/v9/TransactionIdTestSupport.java | 2 +- .../openwire/v9/TransactionInfoTest.java | 2 +- .../openwire/v9/XATransactionIdTest.java | 2 +- .../apache/activemq/perf/KahaQueueTest.java | 1 + .../activemq/perf/LevelDBStoreQueueTest.java | 1 + .../apache/activemq/perf/PerfConsumer.java | 1 + .../apache/activemq/perf/PerfProducer.java | 1 + .../perf/SimpleDurableTopicNetworkTest.java | 3 + .../activemq/perf/SimpleNetworkTest.java | 2 + .../SimpleNonPersistentQueueNetworkTest.java | 6 + .../perf/SimpleNonPersistentTopicTest.java | 1 + .../apache/activemq/perf/SlowConsumer.java | 1 + .../activemq/perf/SlowConsumerTopicTest.java | 5 + .../TemporaryTopicMemoryAllocationTest.java | 1 + ...TwoConnectionsWithSenderUsingPoolTest.java | 3 + .../activemq/proxy/ProxyConnectorTest.java | 1 + .../activemq/proxy/ProxyTestSupport.java | 4 + ...ractCachedLDAPAuthorizationModuleTest.java | 1 + ...AuthorizationModuleLegacyOpenLDAPTest.java | 6 + ...chedLDAPAuthorizationModuleLegacyTest.java | 4 + ...edLDAPAuthorizationModuleOpenLDAPTest.java | 1 + .../CachedLDAPAuthorizationModuleTest.java | 1 + .../org/apache/activemq/security/DoSTest.java | 2 + .../activemq/security/JaasNetworkTest.java | 2 + .../security/SecurityTestSupport.java | 1 + ...mpleAuthenticationPluginSeparatorTest.java | 9 + .../security/SimpleAuthorizationMapTest.java | 1 + .../SimpleSecurityBrokerSystemTest.java | 3 + .../StubDoNothingCallbackHandler.java | 1 + .../security/StubDualJaasConfiguration.java | 2 + .../security/StubJaasConfiguration.java | 2 + .../security/StubSecurityContext.java | 1 + .../activemq/security/XBeanSecurityTest.java | 1 + ...ecurityWithGuestNoCredentialsOnlyTest.java | 1 + .../security/XBeanSecurityWithGuestTest.java | 1 + .../activemq/spring/SpringConsumer.java | 1 + .../activemq/spring/SpringProducer.java | 1 + .../store/AutoStorePerDestinationTest.java | 1 + .../apache/activemq/store/StoreOrderTest.java | 1 + .../jdbc/JDBCIOExceptionHandlerTest.java | 2 + .../store/jdbc/JDBCNegativeQueueTest.java | 2 + .../jdbc/JDBCNetworkBrokerDetachTest.java | 1 + .../jdbc/JDBCPersistenceAdapterTest.java | 1 + .../store/jdbc/JDBCStoreBrokerTest.java | 1 + .../activemq/store/jdbc/JDBCTestMemory.java | 4 + .../kahadb/KahaDBPersistenceAdapterTest.java | 1 + .../store/kahadb/KahaDBStoreBrokerTest.java | 2 + .../store/kahadb/KahaDBStoreTest.java | 2 + .../kahadb/TempKahaDBStoreBrokerTest.java | 1 + .../perf/KahaStoreDurableTopicTest.java | 1 + .../store/kahadb/perf/KahaStoreQueueTest.java | 1 + .../kahadb/perf/TempKahaStoreQueueTest.java | 1 + .../store/leveldb/LevelDBStoreBrokerTest.java | 2 + .../test/JmsSendReceiveTestSupport.java | 2 + .../test/JmsTopicSendReceiveTest.java | 2 + ...WithTwoConnectionsAndByteSelectorTest.java | 2 + ...thTwoConnectionsAndEmbeddedBrokerTest.java | 3 + ...opicSendReceiveWithTwoConnectionsTest.java | 3 + .../test/retroactive/DummyMessageQuery.java | 2 + ...merTestWithDestinationBasedBufferTest.java | 1 + ...stWithLastImagePolicyWithWildcardTest.java | 4 + ...oactiveConsumerTestWithTimePolicyTest.java | 1 + .../CloseRollbackRedeliveryQueueTest.java | 4 + ...elegatingTransactionalMessageListener.java | 1 + ...RollbacksWhileConsumingLargeQueueTest.java | 5 + .../activemq/transport/QueueClusterTest.java | 2 + .../transport/SoWriteTimeoutClientTest.java | 1 + .../transport/SoWriteTimeoutTest.java | 1 + .../transport/StubCompositeTransport.java | 2 + .../activemq/transport/StubTransport.java | 5 + .../activemq/transport/TopicClusterTest.java | 3 + .../transport/TransportBrokerTestSupport.java | 4 + .../DiscoveryTransportBrokerTest.java | 5 + .../ZeroconfDiscoverTransportTest.java | 1 + .../transport/failover/AMQ1925Test.java | 5 + .../transport/failover/BadConnectionTest.java | 6 + ...FailoverConsumerOutstandingCommitTest.java | 6 + .../FailoverConsumerUnconsumedTest.java | 10 ++ .../failover/FailoverPrefetchZeroTest.java | 2 + .../failover/FailoverRandomTest.java | 2 + .../failover/FailoverTransactionTest.java | 19 +++ .../failover/FailoverTransportTest.java | 12 ++ .../transport/failover/ReconnectTest.java | 7 + .../failover/SlowConnectionTest.java | 3 + .../activemq/transport/fanout/FanoutTest.java | 2 + .../fanout/FanoutTransportBrokerTest.java | 4 + .../multicast/MulticastTransportTest.java | 2 + .../NIOJmsDurableTopicSendReceiveTest.java | 3 + .../nio/NIOJmsSendAndReceiveTest.java | 3 + .../nio/NIOPersistentSendAndReceiveTest.java | 2 + .../transport/nio/NIOSSLLoadTest.java | 1 + .../nio/NIOSSLTransportBrokerTest.java | 2 + .../transport/nio/NIOTransportBrokerTest.java | 1 + .../reliable/ReliableTransportTest.java | 1 + .../UnreliableCommandDatagramChannel.java | 1 + .../UnreliableCommandDatagramSocket.java | 1 + .../reliable/UnreliableUdpTransport.java | 1 + .../transport/tcp/InactivityMonitorTest.java | 17 ++ .../transport/tcp/ServerSocketTstFactory.java | 3 + .../transport/tcp/SslBrokerServiceTest.java | 2 + .../transport/tcp/SslTransportBrokerTest.java | 2 + .../tcp/SslTransportFactoryTest.java | 2 + .../transport/tcp/SslTransportServerTest.java | 2 + .../transport/tcp/SslTransportTest.java | 2 + .../transport/tcp/StubSSLServerSocket.java | 14 ++ .../transport/tcp/StubSSLSession.java | 21 +++ .../activemq/transport/tcp/StubSSLSocket.java | 18 ++ .../transport/tcp/StubSSLSocketFactory.java | 5 + .../transport/tcp/StubX509Certificate.java | 26 +++ .../transport/tcp/TcpFaultyTransport.java | 1 + .../tcp/TcpFaultyTransportFactory.java | 4 + .../tcp/TcpFaultyTransportServer.java | 1 + .../transport/tcp/TcpTransportBrokerTest.java | 2 + .../tcp/WireformatNegociationTest.java | 12 ++ ...ithTwoConnectionsAndLargeMessagesTest.java | 1 + .../UdpSendReceiveWithTwoConnectionsTest.java | 3 + .../transport/udp/UdpTestSupport.java | 12 ++ .../transport/udp/UdpTransportTest.java | 2 + .../udp/UdpTransportUsingServerTest.java | 3 + .../transport/udp/UpdTransportBindTest.java | 1 + .../transport/vm/VMTransportBrokerTest.java | 1 + .../vm/VMTransportEmbeddedBrokerTest.java | 3 + .../CompositeMessageCursorUsageTest.java | 5 + .../apache/activemq/usage/StoreUsageTest.java | 2 + .../AuthorizationFromAdminViewTest.java | 3 + .../usecases/BacklogNetworkCrossTalkTest.java | 1 + .../usecases/ClientRebalanceTest.java | 1 + .../usecases/CompositeConsumeTest.java | 2 + .../ConcurrentDestinationCreationTest.java | 1 + .../ConcurrentProducerQueueConsumerTest.java | 2 + .../usecases/ConsumeQueuePrefetchTest.java | 1 + .../usecases/ConsumeTopicPrefetchTest.java | 2 + .../CreateTemporaryQueueBeforeStartTest.java | 3 + ...rableConsumerCloseAndReconnectTcpTest.java | 8 + .../DurableConsumerCloseAndReconnectTest.java | 1 + .../DurableSubDelayedUnsubscribeTest.java | 1 + .../DurableSubInBrokerNetworkTest.java | 2 + .../usecases/DurableSubProcessTest.java | 2 + ...urableSubsOfflineSelectorIndexUseTest.java | 5 + ...leSubscriberWithNetworkDisconnectTest.java | 3 + ...rableSubscriberWithNetworkRestartTest.java | 3 + .../DurableSubscriptionActivationTest.java | 4 + .../DurableSubscriptionReactivationTest.java | 3 + .../DurableSubscriptionRemoveOfflineTest.java | 3 + .../usecases/DurableUnsubscribeTest.java | 4 + .../usecases/ExceptionListenerTest.java | 1 + .../usecases/JDBCDurableSubscriptionTest.java | 1 + .../JournalDurableSubscriptionTest.java | 1 + .../KahaDBDurableSubscriptionTest.java | 1 + .../LevelDBDurableSubscriptionTest.java | 1 + .../ManagedDurableSubscriptionTest.java | 1 + .../usecases/MessageGroupCloseTest.java | 3 + .../usecases/MessageGroupNewConsumerTest.java | 3 + .../usecases/MessageReroutingTest.java | 1 + .../MultiBrokersMultiClientsTest.java | 2 + .../MultiBrokersMultiClientsUsingTcpTest.java | 1 + ...MulticastDiscoveryOnFaultyNetworkTest.java | 1 + .../usecases/NetworkAsyncStartTest.java | 1 + .../usecases/NetworkOfTwentyBrokersTest.java | 4 + .../NoDuplicateOnTopicNetworkTest.java | 6 + .../ObjectMessageNotSerializableTest.java | 8 + .../usecases/ProducerConsumerTestSupport.java | 2 + ...lishOnDurableTopicConsumedMessageTest.java | 1 + ...QueueConsumedMessageInTransactionTest.java | 3 + .../PublishOnQueueConsumedMessageTest.java | 1 + ...ueConsumedMessageUsingActivemqXMLTest.java | 3 + ...shOnTemporaryQueueConsumedMessageTest.java | 1 + .../PublishOnTopicConsumedMessageTest.java | 2 + ...icConsumerMessageUsingActivemqXMLTest.java | 3 + .../QueueConsumerCloseAndReconnectTest.java | 1 + .../usecases/QueueDuplicatesTest.java | 4 + .../QueueMemoryFullMultiBrokersTest.java | 1 + .../activemq/usecases/QueueRedeliverTest.java | 1 + .../activemq/usecases/QueueRepeaterTest.java | 2 + .../usecases/ReliableReconnectTest.java | 4 + ...dBrokerDoesNotLeaveThreadsRunningTest.java | 2 + .../usecases/ThreeBrokerQueueNetworkTest.java | 4 + ...eBrokerVirtualTopicNetworkLevelDBTest.java | 1 + .../ThreeBrokerVirtualTopicNetworkTest.java | 1 + .../TopicProducerFlowControlTest.java | 5 + .../activemq/usecases/TopicRedeliverTest.java | 2 + .../TopicSubscriptionSlowConsumerTest.java | 2 + .../TransactionRollbackOrderTest.java | 2 + .../usecases/TransientQueueRedeliverTest.java | 1 + ...sageNotSentToRemoteWhenNoConsumerTest.java | 1 + .../usecases/TwoBrokerMulticastQueueTest.java | 2 + ...ardDynamicallyIncludedDestinationTest.java | 1 + ...cardStaticallyIncludedDestinationTest.java | 1 + .../TwoBrokerNetworkLoadBalanceTest.java | 2 + .../TwoBrokerQueueSendReceiveTest.java | 1 + ...SendReceiveLotsOfMessagesUsingTcpTest.java | 1 + ...SendReceiveUsingJavaConfigurationTest.java | 3 + ...TwoBrokerTopicSendReceiveUsingTcpTest.java | 4 + ...irtualDestDinamicallyIncludedDestTest.java | 1 + .../TwoBrokerVirtualTopicForwardingTest.java | 1 + ...stDiscoveryBrokerTopicSendReceiveTest.java | 3 + .../TwoSecureBrokerRequestReplyTest.java | 1 + .../usecases/UnlimitedEnqueueTest.java | 1 + .../VerifyNetworkConsumersDisconnectTest.java | 2 + .../apache/activemq/util/ProducerThread.java | 1 + .../activemq/util/ReflectionSupportTest.java | 1 + ...JDBCPersistenceAdapterXBeanConfigTest.java | 2 + .../xbean/JDBCPersistenceXBeanConfigTest.java | 2 + ...sWithEmbeddedBrokerAndPersistenceTest.java | 1 + ...ultipleTestsWithSpringFactoryBeanTest.java | 2 + ...leTestsWithSpringXBeanFactoryBeanTest.java | 2 + ...MultipleTestsWithXBeanFactoryBeanTest.java | 1 + .../apache/activemq/xbean/XBeanXmlTest.java | 1 + .../byteman/ActiveMQMessageHandlerTest.java | 4 + .../byteman/ConcurrentDeliveryCancelTest.java | 2 + .../InterruptedMessageHandlerTest.java | 4 + .../tests/extras/byteman/PagingLeakTest.java | 1 + .../byteman/ScaleDownGroupedFailoverTest.java | 1 + .../byteman/ScaleDownGroupedFailureTest.java | 1 + .../tests/extras/byteman/TimeoutXATest.java | 2 + .../extras/jms/bridge/BridgeTestBase.java | 9 + .../jms/bridge/ClusteredBridgeTestBase.java | 2 + .../jms/bridge/JMSBridgeReconnectionTest.java | 1 + .../extras/jms/bridge/JMSBridgeTest.java | 1 + ...BMultipleHandlersServerDisconnectTest.java | 8 + .../extras/jms/xa/JMSXDeliveryCountTest.java | 11 ++ .../artemis/tests/extras/jms/xa/XATest.java | 10 ++ .../hornetq/HornetQProtocolManagerTest.java | 2 + .../hornetq/HornetQProtocolTest.java | 2 + .../SimpleNotificationService.java | 5 + .../integration/client/AcknowledgeTest.java | 3 + .../integration/client/ActiveMQCrashTest.java | 2 + .../client/AutoCreateJmsQueueTest.java | 1 + .../integration/client/AutogroupIdTest.java | 1 + .../client/CommitRollbackTest.java | 2 + .../ConcurrentCreateDeleteProduceTest.java | 2 + .../integration/client/ConsumerCloseTest.java | 5 + .../integration/client/ConsumerStuckTest.java | 3 + .../integration/client/ConsumerTest.java | 6 + .../client/ConsumerWindowSizeTest.java | 3 + .../client/DeadLetterAddressTest.java | 1 + .../integration/client/DeliveryOrderTest.java | 1 + .../client/FailureDeadlockTest.java | 1 + .../integration/client/HangConsumerTest.java | 1 + .../client/InterruptedLargeMessageTest.java | 2 + .../integration/client/LargeMessageTest.java | 1 + .../client/MessageConcurrencyTest.java | 2 + .../client/MessageConsumerRollbackTest.java | 2 + .../client/MessageDurabilityTest.java | 2 + .../MessageGroupingConnectionFactoryTest.java | 1 + .../client/MessageGroupingTest.java | 1 + .../client/MessageHandlerTest.java | 4 + .../integration/client/MessageRateTest.java | 1 + .../client/MultipleThreadFilterOneTest.java | 2 + .../integration/client/NIOvsOIOTest.java | 1 + .../tests/integration/client/PagingTest.java | 12 ++ .../integration/client/ProducerCloseTest.java | 1 + .../client/ProducerFlowControlTest.java | 2 + .../integration/client/ProducerTest.java | 2 + .../client/ReceiveImmediateTest.java | 1 + .../tests/integration/client/ReceiveTest.java | 1 + .../client/RedeliveryConsumerTest.java | 5 + .../integration/client/RequestorTest.java | 4 + .../client/ServerLocatorConnectTest.java | 1 + .../integration/client/SessionCloseTest.java | 17 ++ ...SessionSendAcknowledgementHandlerTest.java | 1 + .../client/SessionStopStartTest.java | 4 + .../tests/integration/client/SessionTest.java | 1 + .../client/TemporaryQueueTest.java | 5 + .../client/TransientQueueTest.java | 1 + .../clientcrash/DummyInterceptor.java | 1 + .../clientcrash/DummyInterceptorB.java | 1 + .../integration/cluster/NodeManagerTest.java | 1 + .../cluster/bridge/BridgeTest.java | 2 + .../cluster/bridge/SimpleTransformer.java | 1 + .../cluster/distribution/ClusterTestBase.java | 1 + .../distribution/ClusteredGroupingTest.java | 9 + .../LargeMessageRedistributionTest.java | 1 + .../NettyFileStorageSymmetricClusterTest.java | 1 + ...StorageSymmetricClusterWithBackupTest.java | 1 + ...rageSymmetricClusterWithDiscoveryTest.java | 1 + .../SymmetricClusterWithDiscoveryTest.java | 1 + .../failover/AsynchronousFailoverTest.java | 2 + .../cluster/failover/DelayInterceptor.java | 1 + .../cluster/failover/DelayInterceptor2.java | 1 + .../cluster/failover/DelayInterceptor3.java | 1 + .../cluster/failover/FailBackManualTest.java | 1 + .../failover/FailoverOnFlowControlTest.java | 1 + .../cluster/failover/FailoverTest.java | 3 + .../failover/LiveToLiveFailoverTest.java | 7 + .../MultiThreadRandomReattachTestBase.java | 1 + .../cluster/reattach/OrderReattachTest.java | 1 + .../cluster/reattach/RandomReattachTest.java | 1 + .../cluster/reattach/ReattachTest.java | 2 + .../cluster/util/BackupSyncDelay.java | 1 + .../cluster/util/MultiServerTestBase.java | 1 + .../util/SameProcessActiveMQServer.java | 9 + .../cluster/util/TestableServer.java | 1 + .../discovery/DiscoveryBaseTest.java | 3 + .../discovery/DiscoveryStayAliveTest.java | 2 + .../integration/interceptors/Incoming.java | 1 + .../interceptors/InterceptorTest.java | 12 ++ .../integration/interceptors/Outgoing.java | 1 + .../ManualReconnectionToSingleServerTest.java | 2 + .../integration/jms/client/GroupIDTest.java | 1 + .../jms/client/NewQueueRequestorTest.java | 1 + .../client/RemoteConnectionStressTest.java | 1 + .../jms/client/TopicCleanupTest.java | 1 + .../jms/cluster/BindingsClusterTest.java | 1 + .../jms/cluster/JMSFailoverListenerTest.java | 1 + .../jms/cluster/JMSFailoverTest.java | 2 + .../jms/cluster/JMSReconnectTest.java | 1 + .../cluster/LargeMessageOverBridgeTest.java | 1 + .../cluster/MultipleThreadsOpeningTest.java | 1 + .../CloseConnectionFactoryOnGCest.java | 1 + .../connection/CloseConnectionOnGCTest.java | 3 + .../jms/connection/ExceptionListenerTest.java | 1 + .../jms/consumer/ConsumerTest.java | 3 + .../JMSQueueControlUsingJMSTest.java | 42 +++++ .../management/JMSServerControl2Test.java | 6 + .../management/JMSServerControlTest.java | 15 ++ .../JMSServerControlUsingJMSTest.java | 36 ++++ .../jms/server/management/JMSUtil.java | 1 + .../journal/NIOJournalCompactTest.java | 6 + .../ValidateTransactionHealthTest.java | 10 ++ .../largemessage/LargeMessageTestBase.java | 2 + .../AcceptorControlUsingCoreTest.java | 6 + .../ActiveMQServerControlUsingCoreTest.java | 93 +++++++++++ .../BroadcastGroupControlUsingCoreTest.java | 10 ++ ...ClusterConnectionControlUsingCoreTest.java | 15 ++ .../DivertControlUsingCoreTest.java | 7 + .../management/QueueControlTest.java | 1 + .../management/QueueControlUsingCoreTest.java | 49 ++++++ .../integration/mqtt/imported/MQTTTest.java | 1 + .../mqtt/imported/MQTTTestSupport.java | 3 + .../openwire/BasicSecurityTest.java | 1 + .../amq/JMSDurableTopicRedeliverTest.java | 1 + .../openwire/amq/JmsAutoAckListenerTest.java | 1 + .../amq/JmsConnectionStartStopTest.java | 2 + .../JmsConsumerResetActiveListenerTest.java | 2 + .../amq/JmsCreateConsumerInOnMessageTest.java | 1 + ...msDurableQueueWildcardSendReceiveTest.java | 1 + .../amq/JmsDurableTopicSendReceiveTest.java | 1 + .../amq/JmsDurableTopicTransactionTest.java | 1 + ...msDurableTopicWildcardSendReceiveTest.java | 1 + .../amq/JmsSendReceiveTestSupport.java | 1 + .../amq/JmsTopicRequestReplyTest.java | 2 + .../amq/JmsTopicWildcardSendReceiveTest.java | 2 + .../amq/MessageListenerRedeliveryTest.java | 1 + .../amq/ProducerFlowControlSendFailTest.java | 1 + .../openwire/amq/ProducerFlowControlTest.java | 2 + .../amq/ReconnectWithSameClientIDTest.java | 1 + .../PagingWithFailoverAndCountersTest.java | 2 + .../ra/ActiveMQMessageHandlerTest.java | 1 + .../ra/ActiveMQRAClusteredTestBase.java | 1 + .../integration/ra/ActiveMQRATestBase.java | 6 + .../integration/ra/ResourceAdapterTest.java | 3 + .../tests/integration/remoting/PingTest.java | 5 + .../integration/remoting/ReconnectTest.java | 4 + .../replication/ReplicationTest.java | 49 ++++++ .../integration/security/SecurityTest.java | 6 + .../server/AddressFullLoggingTest.java | 1 + .../integration/server/ExpiryRunnerTest.java | 1 + .../server/GracefulShutdownTest.java | 2 + .../server/SuppliedThreadPoolTest.java | 1 + .../integration/spring/ExampleListener.java | 1 + .../spring/SpringIntegrationTest.java | 1 + .../ssl/CoreClientOverTwoWaySSLTest.java | 1 + .../tests/integration/stomp/StompTest.java | 1 + .../stomp/util/AbstractClientStompFrame.java | 1 + .../util/AbstractStompClientConnection.java | 11 ++ .../stomp/util/ClientStompFrameV11.java | 3 + .../stomp/util/ClientStompFrameV12.java | 3 + .../stomp/util/StompClientConnectionV10.java | 2 + .../stomp/util/StompClientConnectionV11.java | 2 + .../stomp/util/StompClientConnectionV12.java | 1 + .../stomp/util/StompFrameFactoryV10.java | 1 + .../integration/stomp/v11/StompV11Test.java | 2 + .../integration/stomp/v12/StompV12Test.java | 2 + .../NettyConnectorWithHTTPUpgradeTest.java | 1 + .../tests/integration/xa/BasicXaTest.java | 1 + .../tests/integration/xa/XaTimeoutTest.java | 1 + .../tests/util/NonSerializableFactory.java | 1 + .../jms/tests/AcknowledgementTest.java | 1 + .../jms/tests/AutoAckMesageListenerTest.java | 1 + .../artemis/jms/tests/BrowserTest.java | 1 + .../jms/tests/ConnectionClosedTest.java | 1 + .../jms/tests/ConnectionFactoryTest.java | 2 + .../artemis/jms/tests/ConnectionTest.java | 1 + .../artemis/jms/tests/DeliveryOrderTest.java | 1 + .../activemq/artemis/jms/tests/JMSTest.java | 2 + .../jms/tests/MessageConsumerTest.java | 17 ++ .../jms/tests/MessageProducerTest.java | 2 + .../artemis/jms/tests/MiscellaneousTest.java | 2 + .../artemis/jms/tests/SessionTest.java | 1 + .../jms/tests/TemporaryDestinationTest.java | 1 + .../activemq/artemis/jms/tests/TopicTest.java | 1 + .../jms/tests/TransactedSessionTest.java | 1 + .../message/JMSExpirationHeaderTest.java | 4 + .../jms/tests/message/MessageHeaderTest.java | 62 +++++++ .../jms/tests/message/MessageTestBase.java | 1 + .../tests/message/SimpleJMSBytesMessage.java | 27 +++ .../tests/message/SimpleJMSMapMessage.java | 25 +++ .../jms/tests/message/SimpleJMSMessage.java | 45 +++++ .../tests/message/SimpleJMSObjectMessage.java | 2 + .../tests/message/SimpleJMSStreamMessage.java | 24 +++ .../tests/message/SimpleJMSTextMessage.java | 2 + .../jms/tests/selector/SelectorTest.java | 2 + .../tests/tools/container/InVMContext.java | 34 ++++ .../container/InVMInitialContextFactory.java | 1 + .../InVMInitialContextFactoryBuilder.java | 1 + .../tests/tools/container/InVMNameParser.java | 1 + .../tools/container/LocalTestServer.java | 30 ++++ .../container/NonSerializableFactory.java | 1 + .../activemq/artemis/jms/AbstractAdmin.java | 16 ++ .../activemq/artemis/jms/ActiveMQAdmin.java | 16 ++ .../activemq/artemis/jms/GenericAdmin.java | 16 ++ .../conform/connection/ConnectionTest.java | 1 + .../sends/MeasureCommitPerfTest.java | 1 + .../artemis/tests/soak/client/Receiver.java | 2 + .../artemis/tests/soak/client/Sender.java | 2 + .../journal/AddAndRemoveStressTest.java | 5 + .../AllPossibilitiesCompactStressTest.java | 1 + ...ilitiesCompactWithAddDeleteStressTest.java | 1 + .../JournalCleanupCompactStressTest.java | 7 + .../journal/MixupCompactorTestBase.java | 1 + .../stress/paging/PageCursorStressTest.java | 4 + .../tests/stress/remote/PingStressTest.java | 1 + .../jms/bridge/impl/JMSBridgeImplTest.java | 14 ++ .../util/TokenBucketLimiterImplTest.java | 1 + .../tests/unit/core/asyncio/AIOTestBase.java | 2 + .../client/impl/LargeMessageBufferTest.java | 24 +++ .../config/impl/ConnectorsServiceTest.java | 1 + .../journal/impl/AlignedJournalImplTest.java | 6 + .../journal/impl/JournalImplTestBase.java | 1 + .../journal/impl/JournalImplTestUnit.java | 1 + .../unit/core/journal/impl/ReclaimerTest.java | 14 ++ .../core/journal/impl/TimedBufferTest.java | 14 ++ .../impl/fakes/FakeSequentialFileFactory.java | 35 ++++ .../journal/impl/fakes/SimpleEncoding.java | 3 + .../impl/OperationContextUnitTest.java | 6 + .../postoffice/impl/BindingsImplTest.java | 34 ++++ .../unit/core/postoffice/impl/FakeQueue.java | 20 +++ .../impl/WildcardAddressManagerUnitTest.java | 1 + .../impl/netty/NettyAcceptorFactoryTest.java | 5 + .../impl/netty/NettyAcceptorTest.java | 5 + .../impl/netty/NettyConnectionTest.java | 4 + .../impl/netty/NettyConnectorTest.java | 30 ++++ .../server/impl/fake/FakeAcceptorFactory.java | 1 + .../unit/core/server/impl/QueueImplTest.java | 3 + .../core/server/impl/fakes/FakeConsumer.java | 4 + .../core/server/impl/fakes/FakeFilter.java | 2 + .../server/impl/fakes/FakePostOffice.java | 5 + .../server/impl/fakes/FakeQueueFactory.java | 2 + .../jms/client/ActiveMQStreamMessageTest.java | 29 ++++ .../tests/unit/ra/BootstrapContext.java | 9 + .../tests/unit/util/FakePagingManager.java | 13 ++ .../artemis/tests/unit/util/InVMContext.java | 34 ++++ .../tests/unit/util/InVMNameParser.java | 1 + .../tests/unit/util/InVMNamingContext.java | 34 ++++ .../tests/unit/util/MemorySizeTest.java | 2 + .../unit/util/NonSerializableFactory.java | 1 + .../ObjectInputStreamWithClassLoaderTest.java | 1 + .../tests/unit/util/SoftValueMapTest.java | 1 + .../artemis/tests/util/SpawnedVMSupport.java | 1 + 1541 files changed, 7631 insertions(+), 138 deletions(-) diff --git a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java index e87c19ec74..f2ee36f47d 100644 --- a/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java +++ b/artemis-boot/src/main/java/org/apache/activemq/artemis/boot/Artemis.java @@ -88,6 +88,7 @@ public class Artemis { // Sort the list by file name.. Collections.sort(files, new Comparator() { + @Override public int compare(File file, File file1) { return file.getName().compareTo(file1.getName()); } diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java index 406da24fcc..43b1b3ebe3 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java @@ -47,6 +47,7 @@ public abstract class ActionAbstract implements Action { } } + @Override public String getBrokerInstance() { if (brokerInstance == null) { /* We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows @@ -61,6 +62,7 @@ public abstract class ActionAbstract implements Action { return brokerInstance; } + @Override public String getBrokerHome() { if (brokerHome == null) { /* We use File URI for locating files. The ARTEMIS_HOME variable is used to determine file paths. For Windows @@ -80,6 +82,7 @@ public abstract class ActionAbstract implements Action { return brokerHome; } + @Override public Object execute(ActionContext context) throws Exception { this.context = context; diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java index dae32b71fd..cd7eb5da03 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java @@ -635,6 +635,7 @@ public class Create extends InputAbstract { File dir = new File(path(getHome().toString(), false) + "/lib"); File[] matches = dir.listFiles(new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.startsWith("jboss-logmanager") && name.endsWith(".jar"); } diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java index ca1335624b..c2db6f8497 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java @@ -160,6 +160,7 @@ public class Run extends Configurable { }, 500, 500); Runtime.getRuntime().addShutdownHook(new Thread() { + @Override public void run() { try { server.stop(); diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java index bc1179d7d3..88c761ffce 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java @@ -54,6 +54,7 @@ public class DecodeJournal extends LockAbstract { @Option(name = "--input", description = "The input file name (default=exp.dmp)", required = true) public String input = "exp.dmp"; + @Override public Object execute(ActionContext context) throws Exception { super.execute(context); try { diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java index 43200822d0..38e599b5da 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java @@ -48,6 +48,7 @@ public class EncodeJournal extends LockAbstract { @Option(name = "--file-size", description = "The journal size (default 10485760)") public int size = 10485760; + @Override public Object execute(ActionContext context) throws Exception { super.execute(context); try { @@ -122,18 +123,22 @@ public class EncodeJournal extends LockAbstract { final JournalFile file) throws Exception { JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback() { + @Override public void onReadUpdateRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { out.println("operation@UpdateTX,txID@" + transactionID + "," + describeRecord(recordInfo)); } + @Override public void onReadUpdateRecord(final RecordInfo recordInfo) throws Exception { out.println("operation@Update," + describeRecord(recordInfo)); } + @Override public void onReadRollbackRecord(final long transactionID) throws Exception { out.println("operation@Rollback,txID@" + transactionID); } + @Override public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception { @@ -144,28 +149,34 @@ public class EncodeJournal extends LockAbstract { encode(extraData)); } + @Override public void onReadDeleteRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { out.println("operation@DeleteRecordTX,txID@" + transactionID + "," + describeRecord(recordInfo)); } + @Override public void onReadDeleteRecord(final long recordID) throws Exception { out.println("operation@DeleteRecord,id@" + recordID); } + @Override public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { out.println("operation@Commit,txID@" + transactionID + ",numberOfRecords@" + numberOfRecords); } + @Override public void onReadAddRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { out.println("operation@AddRecordTX,txID@" + transactionID + "," + describeRecord(recordInfo)); } + @Override public void onReadAddRecord(final RecordInfo recordInfo) throws Exception { out.println("operation@AddRecord," + describeRecord(recordInfo)); } + @Override public void markAsDataFile(final JournalFile file) { } }); diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/ProducerThread.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/ProducerThread.java index 427443fb3c..7801e333bd 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/ProducerThread.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/util/ProducerThread.java @@ -64,6 +64,7 @@ public class ProducerThread extends Thread { this.session = session; } + @Override public void run() { MessageProducer producer = null; String threadName = Thread.currentThread().getName(); diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java index bbfb82ffd8..86c66af49d 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/process/ProcessBuilder.java @@ -30,6 +30,7 @@ public class ProcessBuilder { static { Runtime.getRuntime().addShutdownHook(new Thread() { + @Override public void run() { for (Process p : processes) { // if (p.isAlive()) diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java index b66f6aa97c..04f658f977 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/integration/FileBroker.java @@ -43,6 +43,7 @@ public class FileBroker implements Broker { this.configurationUrl = broker.configuration; } + @Override public synchronized void start() throws Exception { if (started) { return; diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java index 68916c3c64..bcd440fbd1 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java @@ -54,6 +54,7 @@ public class ServerUtil { final Process process = builder.start(); Runtime.getRuntime().addShutdownHook(new Thread() { + @Override public void run() { process.destroy(); } diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java index da78fb74a9..c129e3a770 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/ActiveMQBuffer.java @@ -634,6 +634,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a byte at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1} */ + @Override byte readByte(); /** @@ -643,6 +644,7 @@ public interface ActiveMQBuffer extends DataInput { * @return an unsigned byte at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1} */ + @Override int readUnsignedByte(); /** @@ -652,6 +654,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a 16-bit short integer at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2} */ + @Override short readShort(); /** @@ -661,6 +664,7 @@ public interface ActiveMQBuffer extends DataInput { * @return an unsigned 16-bit short integer at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2} */ + @Override int readUnsignedShort(); /** @@ -670,6 +674,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a 32-bit integer at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4} */ + @Override int readInt(); /** @@ -688,6 +693,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a 64-bit integer at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8} */ + @Override long readLong(); /** @@ -697,6 +703,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a char at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 2} */ + @Override char readChar(); /** @@ -706,6 +713,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a float at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 4} */ + @Override float readFloat(); /** @@ -715,6 +723,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a double at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 8} */ + @Override double readDouble(); /** @@ -724,6 +733,7 @@ public interface ActiveMQBuffer extends DataInput { * @return a boolean at the current {@code readerIndex} * @throws IndexOutOfBoundsException if {@code this.readableBytes} is less than {@code 1} */ + @Override boolean readBoolean(); /** @@ -759,6 +769,7 @@ public interface ActiveMQBuffer extends DataInput { * * @return a UTF-8 String at the current {@code readerIndex} */ + @Override String readUTF(); /** @@ -875,6 +886,7 @@ public interface ActiveMQBuffer extends DataInput { * @param length The number of bytes to skip * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.readableBytes} */ + @Override int skipBytes(int length); /** diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java index d50e46defc..b9f8861cb2 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java @@ -101,10 +101,12 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl // CharSequence implementation // --------------------------------------------------------------------------- + @Override public int length() { return data.length >> 1; } + @Override public char charAt(int pos) { if (pos < 0 || pos >= data.length >> 1) { throw new IndexOutOfBoundsException(); @@ -114,6 +116,7 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl return (char) ((data[pos] & 0xFF) | (data[pos + 1] << 8) & 0xFF00); } + @Override public CharSequence subSequence(final int start, final int end) { int len = data.length >> 1; @@ -132,6 +135,7 @@ public final class SimpleString implements CharSequence, Serializable, Comparabl // Comparable implementation ------------------------------------- + @Override public int compareTo(final SimpleString o) { return toString().compareTo(o.toString()); } diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java index 1c830c67d6..5c0cbdd303 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/core/buffers/impl/ChannelBufferWrapper.java @@ -56,10 +56,12 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { this.releasable = releasable; } + @Override public boolean readBoolean() { return readByte() != 0; } + @Override public SimpleString readNullableSimpleString() { int b = buffer.readByte(); if (b == DataConstants.NULL) { @@ -68,6 +70,7 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { return readSimpleStringInternal(); } + @Override public String readNullableString() { int b = buffer.readByte(); if (b == DataConstants.NULL) { @@ -76,6 +79,7 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { return readStringInternal(); } + @Override public SimpleString readSimpleString() { return readSimpleStringInternal(); } @@ -87,6 +91,7 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { return new SimpleString(data); } + @Override public String readString() { return readStringInternal(); } @@ -109,14 +114,17 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { } } + @Override public String readUTF() { return UTF8Util.readUTF(this); } + @Override public void writeBoolean(final boolean val) { buffer.writeByte((byte) (val ? -1 : 0)); } + @Override public void writeNullableSimpleString(final SimpleString val) { if (val == null) { buffer.writeByte(DataConstants.NULL); @@ -127,6 +135,7 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { } } + @Override public void writeNullableString(final String val) { if (val == null) { buffer.writeByte(DataConstants.NULL); @@ -137,6 +146,7 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { } } + @Override public void writeSimpleString(final SimpleString val) { writeSimpleStringInternal(val); } @@ -147,6 +157,7 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { buffer.writeBytes(data); } + @Override public void writeString(final String val) { writeStringInternal(val); } @@ -172,343 +183,428 @@ public class ChannelBufferWrapper implements ActiveMQBuffer { } } + @Override public void writeUTF(final String utf) { UTF8Util.saveUTF(this, utf); } + @Override public int capacity() { return buffer.capacity(); } + @Override public ByteBuf byteBuf() { return buffer; } + @Override public void clear() { buffer.clear(); } + @Override public ActiveMQBuffer copy() { return new ChannelBufferWrapper(buffer.copy(), releasable); } + @Override public ActiveMQBuffer copy(final int index, final int length) { return new ChannelBufferWrapper(buffer.copy(index, length), releasable); } + @Override public void discardReadBytes() { buffer.discardReadBytes(); } + @Override public ActiveMQBuffer duplicate() { return new ChannelBufferWrapper(buffer.duplicate(), releasable); } + @Override public byte getByte(final int index) { return buffer.getByte(index); } + @Override public void getBytes(final int index, final byte[] dst, final int dstIndex, final int length) { buffer.getBytes(index, dst, dstIndex, length); } + @Override public void getBytes(final int index, final byte[] dst) { buffer.getBytes(index, dst); } + @Override public void getBytes(final int index, final ByteBuffer dst) { buffer.getBytes(index, dst); } + @Override public void getBytes(final int index, final ActiveMQBuffer dst, final int dstIndex, final int length) { buffer.getBytes(index, dst.byteBuf(), dstIndex, length); } + @Override public void getBytes(final int index, final ActiveMQBuffer dst, final int length) { buffer.getBytes(index, dst.byteBuf(), length); } + @Override public void getBytes(final int index, final ActiveMQBuffer dst) { buffer.getBytes(index, dst.byteBuf()); } + @Override public char getChar(final int index) { return (char) buffer.getShort(index); } + @Override public double getDouble(final int index) { return Double.longBitsToDouble(buffer.getLong(index)); } + @Override public float getFloat(final int index) { return Float.intBitsToFloat(buffer.getInt(index)); } + @Override public int getInt(final int index) { return buffer.getInt(index); } + @Override public long getLong(final int index) { return buffer.getLong(index); } + @Override public short getShort(final int index) { return buffer.getShort(index); } + @Override public short getUnsignedByte(final int index) { return buffer.getUnsignedByte(index); } + @Override public long getUnsignedInt(final int index) { return buffer.getUnsignedInt(index); } + @Override public int getUnsignedShort(final int index) { return buffer.getUnsignedShort(index); } + @Override public void markReaderIndex() { buffer.markReaderIndex(); } + @Override public void markWriterIndex() { buffer.markWriterIndex(); } + @Override public boolean readable() { return buffer.isReadable(); } + @Override public int readableBytes() { return buffer.readableBytes(); } + @Override public byte readByte() { return buffer.readByte(); } + @Override public void readBytes(final byte[] dst, final int dstIndex, final int length) { buffer.readBytes(dst, dstIndex, length); } + @Override public void readBytes(final byte[] dst) { buffer.readBytes(dst); } + @Override public void readBytes(final ByteBuffer dst) { buffer.readBytes(dst); } + @Override public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length) { buffer.readBytes(dst.byteBuf(), dstIndex, length); } + @Override public void readBytes(final ActiveMQBuffer dst, final int length) { buffer.readBytes(dst.byteBuf(), length); } + @Override public void readBytes(final ActiveMQBuffer dst) { buffer.readBytes(dst.byteBuf()); } + @Override public ActiveMQBuffer readBytes(final int length) { return new ChannelBufferWrapper(buffer.readBytes(length), releasable); } + @Override public char readChar() { return (char) buffer.readShort(); } + @Override public double readDouble() { return Double.longBitsToDouble(buffer.readLong()); } + @Override public int readerIndex() { return buffer.readerIndex(); } + @Override public void readerIndex(final int readerIndex) { buffer.readerIndex(readerIndex); } + @Override public float readFloat() { return Float.intBitsToFloat(buffer.readInt()); } + @Override public int readInt() { return buffer.readInt(); } + @Override public long readLong() { return buffer.readLong(); } + @Override public short readShort() { return buffer.readShort(); } + @Override public ActiveMQBuffer readSlice(final int length) { return new ChannelBufferWrapper(buffer.readSlice(length), releasable); } + @Override public int readUnsignedByte() { return buffer.readUnsignedByte(); } + @Override public long readUnsignedInt() { return buffer.readUnsignedInt(); } + @Override public int readUnsignedShort() { return buffer.readUnsignedShort(); } + @Override public void resetReaderIndex() { buffer.resetReaderIndex(); } + @Override public void resetWriterIndex() { buffer.resetWriterIndex(); } + @Override public void setByte(final int index, final byte value) { buffer.setByte(index, value); } + @Override public void setBytes(final int index, final byte[] src, final int srcIndex, final int length) { buffer.setBytes(index, src, srcIndex, length); } + @Override public void setBytes(final int index, final byte[] src) { buffer.setBytes(index, src); } + @Override public void setBytes(final int index, final ByteBuffer src) { buffer.setBytes(index, src); } + @Override public void setBytes(final int index, final ActiveMQBuffer src, final int srcIndex, final int length) { buffer.setBytes(index, src.byteBuf(), srcIndex, length); } + @Override public void setBytes(final int index, final ActiveMQBuffer src, final int length) { buffer.setBytes(index, src.byteBuf(), length); } + @Override public void setBytes(final int index, final ActiveMQBuffer src) { buffer.setBytes(index, src.byteBuf()); } + @Override public void setChar(final int index, final char value) { buffer.setShort(index, (short) value); } + @Override public void setDouble(final int index, final double value) { buffer.setLong(index, Double.doubleToLongBits(value)); } + @Override public void setFloat(final int index, final float value) { buffer.setInt(index, Float.floatToIntBits(value)); } + @Override public void setIndex(final int readerIndex, final int writerIndex) { buffer.setIndex(readerIndex, writerIndex); } + @Override public void setInt(final int index, final int value) { buffer.setInt(index, value); } + @Override public void setLong(final int index, final long value) { buffer.setLong(index, value); } + @Override public void setShort(final int index, final short value) { buffer.setShort(index, value); } + @Override public int skipBytes(final int length) { buffer.skipBytes(length); return length; } + @Override public ActiveMQBuffer slice() { return new ChannelBufferWrapper(buffer.slice(), releasable); } + @Override public ActiveMQBuffer slice(final int index, final int length) { return new ChannelBufferWrapper(buffer.slice(index, length), releasable); } + @Override public ByteBuffer toByteBuffer() { return buffer.nioBuffer(); } + @Override public ByteBuffer toByteBuffer(final int index, final int length) { return buffer.nioBuffer(index, length); } + @Override public boolean writable() { return buffer.isWritable(); } + @Override public int writableBytes() { return buffer.writableBytes(); } + @Override public void writeByte(final byte value) { buffer.writeByte(value); } + @Override public void writeBytes(final byte[] src, final int srcIndex, final int length) { buffer.writeBytes(src, srcIndex, length); } + @Override public void writeBytes(final byte[] src) { buffer.writeBytes(src); } + @Override public void writeBytes(final ByteBuffer src) { buffer.writeBytes(src); } + @Override public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { buffer.writeBytes(src.byteBuf(), srcIndex, length); } + @Override public void writeBytes(final ActiveMQBuffer src, final int length) { buffer.writeBytes(src.byteBuf(), length); } + @Override public void writeChar(final char chr) { buffer.writeShort((short) chr); } + @Override public void writeDouble(final double value) { buffer.writeLong(Double.doubleToLongBits(value)); } + @Override public void writeFloat(final float value) { buffer.writeInt(Float.floatToIntBits(value)); } + @Override public void writeInt(final int value) { buffer.writeInt(value); } + @Override public void writeLong(final long value) { buffer.writeLong(value); } + @Override public int writerIndex() { return buffer.writerIndex(); } + @Override public void writerIndex(final int writerIndex) { buffer.writerIndex(writerIndex); } + @Override public void writeShort(final short value) { buffer.writeShort(value); } diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java index e84e9f4c1e..169ce9abfa 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadFactory.java @@ -56,6 +56,7 @@ public final class ActiveMQThreadFactory implements ThreadFactory { this.acc = AccessController.getContext(); } + @Override public Thread newThread(final Runnable command) { // create a thread in a privileged block if running with Security Manager if (acc != null) { @@ -74,6 +75,7 @@ public final class ActiveMQThreadFactory implements ThreadFactory { this.target = target; } + @Override public Thread run() { return createThread(target); } diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentHashSet.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentHashSet.java index c0fe578b21..9a3ae8ce1e 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentHashSet.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ConcurrentHashSet.java @@ -71,6 +71,7 @@ public class ConcurrentHashSet extends AbstractSet implements ConcurrentSe return theMap.remove(o) == ConcurrentHashSet.dummy; } + @Override public boolean addIfAbsent(final E o) { Object obj = theMap.putIfAbsent(o, ConcurrentHashSet.dummy); diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java index 6028742176..9fd5c5bc3b 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/DefaultSensitiveStringCodec.java @@ -42,6 +42,7 @@ public class DefaultSensitiveStringCodec implements SensitiveDataCodec { private byte[] internalKey = "clusterpassword".getBytes(); + @Override public String decode(Object secret) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException { SecretKeySpec key = new SecretKeySpec(internalKey, "Blowfish"); @@ -77,6 +78,7 @@ public class DefaultSensitiveStringCodec implements SensitiveDataCodec { return n.toString(16); } + @Override public void init(Map params) { String key = params.get("key"); if (key != null) { diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java index 5f4f2a8442..748006d18c 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/FactoryFinder.java @@ -54,6 +54,7 @@ public class FactoryFinder { final ConcurrentMap classMap = new ConcurrentHashMap(); + @Override public Object create(final String path) throws InstantiationException, IllegalAccessException, ClassNotFoundException, IOException { Class clazz = classMap.get(path); if (clazz == null) { diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java index b6f5598820..99c4cba01b 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/PasswordMaskingUtil.java @@ -49,6 +49,7 @@ public class PasswordMaskingUtil { // load class codecInstance = AccessController.doPrivileged(new PrivilegedAction>() { + @Override public SensitiveDataCodec run() { ClassLoader loader = Thread.currentThread().getContextClassLoader(); try { diff --git a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java index 4163cdcf30..df9607b919 100644 --- a/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java +++ b/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/UUIDGenerator.java @@ -279,6 +279,7 @@ public final class UUIDGenerator { for (final NetworkInterface networkInterface : ifaces) { tasks.add(new Callable() { + @Override public byte[] call() throws Exception { boolean up = (Boolean) isUpMethod.invoke(networkInterface); boolean loopback = (Boolean) isLoopbackMethod.invoke(networkInterface); diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ReferenceCounterTest.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ReferenceCounterTest.java index c338fb3c4a..e02c8bc587 100644 --- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ReferenceCounterTest.java +++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/ReferenceCounterTest.java @@ -34,6 +34,7 @@ public class ReferenceCounterTest extends Assert { final AtomicInteger counts = new AtomicInteger(0); volatile Thread lastThreadUsed; + @Override public void run() { counts.incrementAndGet(); latch.countDown(); @@ -83,6 +84,7 @@ public class ReferenceCounterTest extends Assert { for (int i = 0; i < t.length; i++) { t[i] = new Thread() { + @Override public void run() { ref.increment(); } @@ -96,6 +98,7 @@ public class ReferenceCounterTest extends Assert { for (int i = 0; i < t.length; i++) { t[i] = new Thread() { + @Override public void run() { ref.decrement(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java index e4b1519d59..e419dfc1c7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java @@ -46,6 +46,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint { this.channelName = channelName; } + @Override public void broadcast(final byte[] data) throws Exception { if (broadcastOpened) { org.jgroups.Message msg = new org.jgroups.Message(); @@ -56,6 +57,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint { } } + @Override public byte[] receiveBroadcast() throws Exception { if (clientOpened) { return receiver.receiveBroadcast(); @@ -65,6 +67,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint { } } + @Override public byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception { if (clientOpened) { return receiver.receiveBroadcast(time, unit); @@ -74,6 +77,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint { } } + @Override public synchronized void openClient() throws Exception { if (clientOpened) { return; @@ -84,6 +88,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint { clientOpened = true; } + @Override public synchronized void openBroadcaster() throws Exception { if (broadcastOpened) return; @@ -102,6 +107,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint { channel.connect(); } + @Override public synchronized void close(boolean isBroadcast) throws Exception { if (isBroadcast) { broadcastOpened = false; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java index 67d4cdea97..702cb5abab 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java @@ -32,6 +32,7 @@ public final class JGroupsFileBroadcastEndpoint extends JGroupsBroadcastEndpoint this.file = file; } + @Override public JChannel createChannel() throws Exception { URL configURL = Thread.currentThread().getContextClassLoader().getResource(file); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java index 13c69850b3..4f100e322d 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java @@ -50,6 +50,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto public UDPBroadcastEndpointFactory() { } + @Override public BroadcastEndpoint createBroadcastEndpoint() throws Exception { return new UDPBroadcastEndpoint().setGroupAddress(groupAddress != null ? InetAddress.getByName(groupAddress) : null).setGroupPort(groupPort).setLocalBindAddress(localBindAddress != null ? InetAddress.getByName(localBindAddress) : null).setLocalBindPort(localBindPort); } @@ -135,11 +136,13 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto return this; } + @Override public void broadcast(byte[] data) throws Exception { DatagramPacket packet = new DatagramPacket(data, data.length, groupAddress, groupPort); broadcastingSocket.send(packet); } + @Override public byte[] receiveBroadcast() throws Exception { final byte[] data = new byte[65535]; final DatagramPacket packet = new DatagramPacket(data, data.length); @@ -162,12 +165,14 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto return data; } + @Override public byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception { // We just use the regular method on UDP, there's no timeout support // and this is basically for tests only return receiveBroadcast(); } + @Override public void openBroadcaster() throws Exception { if (localBindPort != -1) { broadcastingSocket = new DatagramSocket(localBindPort, localAddress); @@ -196,6 +201,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto open = true; } + @Override public void openClient() throws Exception { // HORNETQ-874 if (checkForLinux() || checkForSolaris() || checkForHp()) { @@ -224,6 +230,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto } //@Todo: using isBroadcast to share endpoint between broadcast and receiving + @Override public void close(boolean isBroadcast) throws Exception { open = false; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java index 0f0d5d1368..55985fed58 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientConsumer.java @@ -111,6 +111,7 @@ public interface ClientConsumer extends AutoCloseable { * * @throws ActiveMQException */ + @Override void close() throws ActiveMQException; /** diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java index d206c56c32..d2f58a6114 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java @@ -125,111 +125,133 @@ public interface ClientMessage extends Message { /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putBooleanProperty(SimpleString key, boolean value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putBooleanProperty(String key, boolean value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putByteProperty(SimpleString key, byte value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putByteProperty(String key, byte value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putBytesProperty(SimpleString key, byte[] value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putBytesProperty(String key, byte[] value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putShortProperty(SimpleString key, short value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putShortProperty(String key, short value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putCharProperty(SimpleString key, char value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putCharProperty(String key, char value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putIntProperty(SimpleString key, int value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putIntProperty(String key, int value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putLongProperty(SimpleString key, long value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putLongProperty(String key, long value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putFloatProperty(SimpleString key, float value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putFloatProperty(String key, float value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putDoubleProperty(SimpleString key, double value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putDoubleProperty(String key, double value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putStringProperty(SimpleString key, SimpleString value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage putStringProperty(String key, String value); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage writeBodyBufferBytes(byte[] bytes); /** * Overridden from {@link Message} to enable fluent API */ + @Override ClientMessage writeBodyBufferString(String string); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java index 6a30472eb5..c157fa3028 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientProducer.java @@ -124,6 +124,7 @@ public interface ClientProducer extends AutoCloseable { * * @throws ActiveMQException if an exception occurs while closing the producer */ + @Override void close() throws ActiveMQException; /** diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java index 0df09b2d44..40db6cf719 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java @@ -145,6 +145,7 @@ public interface ClientSession extends XAResource, AutoCloseable { * * @throws ActiveMQException if an exception occurs while closing the session */ + @Override void close() throws ActiveMQException; /** diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java index ae8315f856..9fc1f489df 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSessionFactory.java @@ -138,6 +138,7 @@ public interface ClientSessionFactory extends AutoCloseable { /** * Closes this factory and any session created by it. */ + @Override void close(); /** diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java index b1988783c5..af65bf53f8 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ServerLocator.java @@ -722,6 +722,7 @@ public interface ServerLocator extends AutoCloseable { /** * Closes this factory and release all its resources */ + @Override void close(); /** diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java index 2373879fab..fcf6545e34 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/FirstElementConnectionLoadBalancingPolicy.java @@ -25,6 +25,7 @@ public final class FirstElementConnectionLoadBalancingPolicy implements Connecti * @param max param is ignored * @return 0 */ + @Override public int select(final int max) { return 0; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java index e672b1bda9..4ab66a3290 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomConnectionLoadBalancingPolicy.java @@ -32,6 +32,7 @@ public final class RandomConnectionLoadBalancingPolicy implements ConnectionLoad * @param max the upper limit of the random number selection * @see java.util.Random#nextInt(int) */ + @Override public int select(final int max) { return random.getRandom().nextInt(max); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java index 556d33ff80..5e269a9483 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RandomStickyConnectionLoadBalancingPolicy.java @@ -30,6 +30,7 @@ public final class RandomStickyConnectionLoadBalancingPolicy implements Connecti /** * @see java.util.Random#nextInt(int) */ + @Override public int select(final int max) { if (pos == -1) { pos = random.getRandom().nextInt(max); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java index 1af74f49d5..cdf0828e2a 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java @@ -37,6 +37,7 @@ public final class RoundRobinConnectionLoadBalancingPolicy implements Connection private int pos; + @Override public int select(final int max) { if (first) { // We start on a random one diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/CoreNotificationType.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/CoreNotificationType.java index 105471c5c6..1821962e8f 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/CoreNotificationType.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/CoreNotificationType.java @@ -47,6 +47,7 @@ public enum CoreNotificationType implements NotificationType { this.value = value; } + @Override public int getType() { return value; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AddressQueryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AddressQueryImpl.java index 96aed1da9d..aeec614e60 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AddressQueryImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/AddressQueryImpl.java @@ -38,14 +38,17 @@ public class AddressQueryImpl implements ClientSession.AddressQuery { this.autoCreateJmsQueues = autoCreateJmsQueues; } + @Override public List getQueueNames() { return queueNames; } + @Override public boolean isExists() { return exists; } + @Override public boolean isAutoCreateJmsQueues() { return autoCreateJmsQueues; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java index 080a5dd02e..727ba740ee 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java @@ -175,6 +175,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { // ClientConsumer implementation // ----------------------------------------------------------------- + @Override public ConsumerContext getConsumerContext() { return consumerContext; } @@ -348,6 +349,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { } } + @Override public ClientMessage receive(final long timeout) throws ActiveMQException { ClientMessage msg = receive(timeout, false); @@ -358,14 +360,17 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { return msg; } + @Override public ClientMessage receive() throws ActiveMQException { return receive(0, false); } + @Override public ClientMessage receiveImmediate() throws ActiveMQException { return receive(0, true); } + @Override public MessageHandler getMessageHandler() throws ActiveMQException { checkClosed(); @@ -374,6 +379,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { // Must be synchronized since messages may be arriving while handler is being set and might otherwise end // up not queueing enough executors - so messages get stranded + @Override public synchronized ClientConsumerImpl setMessageHandler(final MessageHandler theHandler) throws ActiveMQException { checkClosed(); @@ -401,6 +407,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { return this; } + @Override public void close() throws ActiveMQException { doCleanUp(true); } @@ -411,6 +418,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { * @param future the future to run once the onMessage Thread has completed * @throws ActiveMQException */ + @Override public Thread prepareForClose(final FutureLatch future) throws ActiveMQException { closing = true; @@ -427,6 +435,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { return onMessageThread; } + @Override public void cleanUp() { try { doCleanUp(false); @@ -436,10 +445,12 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { } } + @Override public boolean isClosed() { return closed; } + @Override public void stop(final boolean waitForOnMessage) throws ActiveMQException { waitForOnMessageToComplete(waitForOnMessage); @@ -457,6 +468,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { } } + @Override public void clearAtFailover() { clearBuffer(); @@ -474,12 +486,14 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { ackIndividually = false; } + @Override public synchronized void start() { stopped = false; requeueExecutors(); } + @Override public Exception getLastException() { return lastException; } @@ -487,22 +501,27 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { // ClientConsumerInternal implementation // -------------------------------------------------------------- + @Override public ClientSession.QueueQuery getQueueInfo() { return queueInfo; } + @Override public SimpleString getFilterString() { return filterString; } + @Override public SimpleString getQueueName() { return queueName; } + @Override public boolean isBrowseOnly() { return browseOnly; } + @Override public synchronized void handleMessage(final ClientMessageInternal message) throws Exception { if (closing) { // This is ok - we just ignore the message @@ -586,6 +605,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { handleRegularMessage(largeMessage); } + @Override public synchronized void handleLargeMessage(final ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { if (closing) { @@ -617,6 +637,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { handleRegularMessage(clientLargeMessage); } + @Override public synchronized void handleLargeMessageContinuation(final byte[] chunk, final int flowControlSize, final boolean isContinues) throws Exception { @@ -634,6 +655,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { } } + @Override public void clear(boolean waitForOnMessage) throws ActiveMQException { synchronized (this) { // Need to send credits for the messages in the buffer @@ -681,14 +703,17 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { } } + @Override public int getClientWindowSize() { return clientWindowSize; } + @Override public int getBufferSize() { return buffer.size(); } + @Override public void acknowledge(final ClientMessage message) throws ActiveMQException { ClientMessageInternal cmi = (ClientMessageInternal) message; @@ -707,6 +732,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { } } + @Override public void individualAcknowledge(ClientMessage message) throws ActiveMQException { if (lastAckedMessage != null) { flushAcks(); @@ -715,6 +741,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { session.individualAcknowledge(this, message); } + @Override public void flushAcks() throws ActiveMQException { if (lastAckedMessage != null) { doAck(lastAckedMessage); @@ -727,6 +754,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { * * @param discountSlowConsumer When dealing with slowConsumers, we need to discount one credit that was pre-sent when the first receive was called. For largeMessage that is only done at the latest packet */ + @Override public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException { if (clientWindowSize >= 0) { creditsToSend += messageBytes; @@ -803,6 +831,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { // If resetting a slow consumer, we need to wait the execution final CountDownLatch latch = new CountDownLatch(1); flowControlExecutor.execute(new Runnable() { + @Override public void run() { latch.countDown(); } @@ -837,6 +866,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { private void sendCredits(final int credits) { pendingFlowControl.countUp(); flowControlExecutor.execute(new Runnable() { + @Override public void run() { try { sessionContext.sendConsumerCredits(ClientConsumerImpl.this, credits); @@ -918,6 +948,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { ActiveMQClientLogger.LOGGER.trace("Calling handler.onMessage"); } final ClassLoader originalLoader = AccessController.doPrivileged(new PrivilegedAction() { + @Override public ClassLoader run() { ClassLoader originalLoader = Thread.currentThread().getContextClassLoader(); @@ -934,6 +965,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { finally { try { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { Thread.currentThread().setContextClassLoader(originalLoader); return null; @@ -1040,6 +1072,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal { private class Runner implements Runnable { + @Override public void run() { try { callOnMessage(); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java index 78c53c95d8..b30df3f40a 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java @@ -41,6 +41,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C /** * @param largeMessageSize the largeMessageSize to set */ + @Override public void setLargeMessageSize(long largeMessageSize) { this.largeMessageSize = largeMessageSize; } @@ -74,10 +75,12 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C return true; } + @Override public void setLargeMessageController(final LargeMessageController controller) { largeMessageController = controller; } + @Override public void checkCompletion() throws ActiveMQException { checkBuffer(); } @@ -100,6 +103,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C return getLongProperty(Message.HDR_LARGE_BODY_SIZE).intValue(); } + @Override public LargeMessageController getLargeMessageController() { return largeMessageController; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java index 30c8376521..229dc829bd 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java @@ -41,6 +41,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana this.windowSize = windowSize; } + @Override public synchronized ClientProducerCredits getCredits(final SimpleString address, final boolean anon, SessionContext context) { @@ -84,6 +85,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana } } + @Override public synchronized void returnCredits(final SimpleString address) { ClientProducerCredits credits = producerCredits.get(address); @@ -92,6 +94,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana } } + @Override public synchronized void receiveCredits(final SimpleString address, final int credits) { ClientProducerCredits cr = producerCredits.get(address); @@ -100,6 +103,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana } } + @Override public synchronized void receiveFailCredits(final SimpleString address, int credits) { ClientProducerCredits cr = producerCredits.get(address); @@ -108,12 +112,14 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana } } + @Override public synchronized void reset() { for (ClientProducerCredits credits : producerCredits.values()) { credits.reset(); } } + @Override public synchronized void close() { windowSize = -1; @@ -126,10 +132,12 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana unReferencedCredits.clear(); } + @Override public synchronized int creditsMapSize() { return producerCredits.size(); } + @Override public synchronized int unReferencedCreditsSize() { return unReferencedCredits.size(); } @@ -162,35 +170,45 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana static ClientProducerCreditsNoFlowControl instance = new ClientProducerCreditsNoFlowControl(); + @Override public void acquireCredits(int credits) throws InterruptedException { } + @Override public void receiveCredits(int credits) { } + @Override public void receiveFailCredits(int credits) { } + @Override public boolean isBlocked() { return false; } + @Override public void init(SessionContext ctx) { } + @Override public void reset() { } + @Override public void close() { } + @Override public void incrementRefCount() { } + @Override public int decrementRefCount() { return 1; } + @Override public void releaseOutstanding() { } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditsImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditsImpl.java index 206f18841d..f7cf98fbd2 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditsImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditsImpl.java @@ -63,6 +63,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { semaphore = new Semaphore(0, false); } + @Override public void init(SessionContext sessionContext) { // We initial request twice as many credits as we request in subsequent requests // This allows the producer to keep sending as more arrive, minimising pauses @@ -73,6 +74,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { this.sessionContext.linkFlowControl(address, this); } + @Override public void acquireCredits(final int credits) throws InterruptedException, ActiveMQException { checkCredits(credits); @@ -117,6 +119,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { } } + @Override public boolean isBlocked() { return blocked; } @@ -125,6 +128,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { return semaphore.availablePermits(); } + @Override public void receiveCredits(final int credits) { synchronized (this) { arriving -= credits; @@ -133,12 +137,14 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { semaphore.release(credits); } + @Override public void receiveFailCredits(final int credits) { serverRespondedWithFail = true; // receive credits like normal to keep the sender from blocking receiveCredits(credits); } + @Override public synchronized void reset() { // Any pendingCredits credits from before failover won't arrive, so we re-initialise @@ -154,6 +160,7 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { checkCredits(Math.max(windowSize * 2, beforeFailure)); } + @Override public void close() { // Closing a producer that is blocking should make it return closed = true; @@ -161,14 +168,17 @@ public class ClientProducerCreditsImpl implements ClientProducerCredits { semaphore.release(Integer.MAX_VALUE / 2); } + @Override public synchronized void incrementRefCount() { refCount++; } + @Override public synchronized int decrementRefCount() { return --refCount; } + @Override public synchronized void releaseOutstanding() { semaphore.drainPermits(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java index 6247bfa655..b963aac67f 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerImpl.java @@ -108,22 +108,26 @@ public class ClientProducerImpl implements ClientProducerInternal { // ClientProducer implementation ---------------------------------------------------------------- + @Override public SimpleString getAddress() { return address; } + @Override public void send(final Message msg) throws ActiveMQException { checkClosed(); doSend(null, msg, null, false); } + @Override public void send(final SimpleString address1, final Message msg) throws ActiveMQException { checkClosed(); doSend(address1, msg, null, false); } + @Override public void send(final String address1, final Message message) throws ActiveMQException { send(SimpleString.toSimpleString(address1), message); } @@ -150,6 +154,7 @@ public class ClientProducerImpl implements ClientProducerInternal { send(null, message, handler); } + @Override public synchronized void close() throws ActiveMQException { if (closed) { return; @@ -158,6 +163,7 @@ public class ClientProducerImpl implements ClientProducerInternal { doCleanup(); } + @Override public void cleanUp() { if (closed) { return; @@ -166,24 +172,29 @@ public class ClientProducerImpl implements ClientProducerInternal { doCleanup(); } + @Override public boolean isClosed() { return closed; } + @Override public boolean isBlockOnDurableSend() { return blockOnDurableSend; } + @Override public boolean isBlockOnNonDurableSend() { return blockOnNonDurableSend; } + @Override public int getMaxRate() { return rateLimiter == null ? -1 : rateLimiter.getRate(); } // Public --------------------------------------------------------------------------------------- + @Override public ClientProducerCredits getProducerCredits() { return producerCredits; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java index 66d5cbb4a4..1a67dfff31 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java @@ -227,10 +227,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C connectionReadyForWrites = true; } + @Override public void disableFinalizeCheck() { finalizeCheck = false; } + @Override public Lock lockFailover() { newFailoverLock.lock(); return newFailoverLock; @@ -244,6 +246,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } } + @Override public void connect(final int initialConnectAttempts, final boolean failoverOnInitialConnection) throws ActiveMQException { // Get the connection @@ -259,10 +262,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } + @Override public TransportConfiguration getConnectorConfiguration() { return connectorConfig; } + @Override public void setBackupConnector(final TransportConfiguration live, final TransportConfiguration backUp) { Connector localConnector = connector; @@ -290,10 +295,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } } + @Override public Object getBackupConnector() { return backupConfig; } + @Override public ClientSession createSession(final String username, final String password, final boolean xa, @@ -304,35 +311,42 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C return createSessionInternal(username, password, xa, autoCommitSends, autoCommitAcks, preAcknowledge, ackBatchSize); } + @Override public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks, final int ackBatchSize) throws ActiveMQException { return createSessionInternal(null, null, false, autoCommitSends, autoCommitAcks, serverLocator.isPreAcknowledge(), ackBatchSize); } + @Override public ClientSession createXASession() throws ActiveMQException { return createSessionInternal(null, null, true, false, false, serverLocator.isPreAcknowledge(), serverLocator.getAckBatchSize()); } + @Override public ClientSession createTransactedSession() throws ActiveMQException { return createSessionInternal(null, null, false, false, false, serverLocator.isPreAcknowledge(), serverLocator.getAckBatchSize()); } + @Override public ClientSession createSession() throws ActiveMQException { return createSessionInternal(null, null, false, true, true, serverLocator.isPreAcknowledge(), serverLocator.getAckBatchSize()); } + @Override public ClientSession createSession(final boolean autoCommitSends, final boolean autoCommitAcks) throws ActiveMQException { return createSessionInternal(null, null, false, autoCommitSends, autoCommitAcks, serverLocator.isPreAcknowledge(), serverLocator.getAckBatchSize()); } + @Override public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks) throws ActiveMQException { return createSessionInternal(null, null, xa, autoCommitSends, autoCommitAcks, serverLocator.isPreAcknowledge(), serverLocator.getAckBatchSize()); } + @Override public ClientSession createSession(final boolean xa, final boolean autoCommitSends, final boolean autoCommitAcks, @@ -342,11 +356,13 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // ConnectionLifeCycleListener implementation -------------------------------------------------- + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionDestroyed(final Object connectionID) { // The exception has to be created in the same thread where it's being called // as to avoid a different stack trace cause @@ -355,6 +371,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // It has to use the same executor as the disconnect message is being sent through closeExecutor.execute(new Runnable() { + @Override public void run() { handleConnectionFailure(connectionID, ex); } @@ -362,18 +379,21 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { handleConnectionFailure(connectionID, me); } // Must be synchronized to prevent it happening concurrently with failover which can lead to // inconsistencies + @Override public void removeSession(final ClientSessionInternal session, final boolean failingOver) { synchronized (sessions) { sessions.remove(session); } } + @Override public void connectionReadyForWrites(final Object connectionID, final boolean ready) { synchronized (connectionReadyLock) { if (connectionReadyForWrites != ready) { @@ -385,31 +405,38 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } } + @Override public synchronized int numConnections() { return connection != null ? 1 : 0; } + @Override public int numSessions() { return sessions.size(); } + @Override public void addFailureListener(final SessionFailureListener listener) { listeners.add(listener); } + @Override public boolean removeFailureListener(final SessionFailureListener listener) { return listeners.remove(listener); } + @Override public ClientSessionFactoryImpl addFailoverListener(FailoverEventListener listener) { failoverListeners.add(listener); return this; } + @Override public boolean removeFailoverListener(FailoverEventListener listener) { return failoverListeners.remove(listener); } + @Override public void causeExit() { clientProtocolManager.stop(); } @@ -447,6 +474,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C checkCloseConnection(); } + @Override public void close() { if (closed) { return; @@ -456,6 +484,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C serverLocator.factoryClosed(this); } + @Override public void cleanup() { if (closed) { return; @@ -464,6 +493,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C interruptConnectAndCloseAllSessions(false); } + @Override public boolean isClosed() { return closed || serverLocator.isClosed(); } @@ -856,6 +886,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } } + @Override public RemotingConnection getConnection() { if (closed) throw new IllegalStateException("ClientSessionFactory is closed!"); @@ -948,6 +979,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // else... we will try to instantiate a new one return AccessController.doPrivileged(new PrivilegedAction() { + @Override public ConnectorFactory run() { return (ConnectorFactory) ClassloadingUtil.newInstanceFromClassLoader(connectorFactoryClassName); } @@ -966,6 +998,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C // Must be executed on new thread since cannot block the Netty thread for a long time and fail // can cause reconnect loop + @Override public void run() { try { CLOSE_RUNNABLES.add(this); @@ -990,10 +1023,12 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C } + @Override public void setReconnectAttempts(final int attempts) { reconnectAttempts = attempts; } + @Override public Object getConnector() { return connector; } @@ -1117,6 +1152,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C private class DelegatingBufferHandler implements BufferHandler { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { RemotingConnection theConn = connection; @@ -1162,6 +1198,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C pingRunnable = new WeakReference(runnable); } + @Override public void run() { PingRunnable runnable = pingRunnable.get(); @@ -1180,6 +1217,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C private long lastCheck = System.currentTimeMillis(); + @Override public synchronized void run() { if (cancelled || stopPingingAfterOne && !first) { return; @@ -1200,6 +1238,7 @@ public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, C threadPool.execute(new Runnable() { // Must be executed on different thread + @Override public void run() { connection.fail(me); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java index 0a24022179..2942b8c2dd 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java @@ -234,28 +234,33 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // ClientSession implementation // ----------------------------------------------------------------- + @Override public void createQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { internalCreateQueue(address, queueName, null, false, false); } + @Override public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws ActiveMQException { internalCreateQueue(address, queueName, null, durable, false); } + @Override public void createQueue(final String address, final String queueName, final boolean durable) throws ActiveMQException { createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), durable); } + @Override public void createSharedQueue(SimpleString address, SimpleString queueName, boolean durable) throws ActiveMQException { createSharedQueue(address, queueName, null, durable); } + @Override public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, @@ -273,6 +278,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } + @Override public void createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, @@ -280,6 +286,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi internalCreateQueue(address, queueName, filterString, durable, false); } + @Override public void createQueue(final String address, final String queueName, final String filterString, @@ -287,26 +294,31 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), durable); } + @Override public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { internalCreateQueue(address, queueName, null, false, true); } + @Override public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException { internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), null, false, true); } + @Override public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws ActiveMQException { internalCreateQueue(address, queueName, filter, false, true); } + @Override public void createTemporaryQueue(final String address, final String queueName, final String filter) throws ActiveMQException { internalCreateQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filter), false, true); } + @Override public void deleteQueue(final SimpleString queueName) throws ActiveMQException { checkClosed(); @@ -319,10 +331,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void deleteQueue(final String queueName) throws ActiveMQException { deleteQueue(SimpleString.toSimpleString(queueName)); } + @Override public QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { checkClosed(); @@ -336,50 +350,60 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } + @Override public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { checkClosed(); return sessionContext.addressQuery(address); } + @Override public ClientConsumer createConsumer(final SimpleString queueName) throws ActiveMQException { return createConsumer(queueName, null, false); } + @Override public ClientConsumer createConsumer(final String queueName) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName)); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws ActiveMQException { return createConsumer(queueName, filterString, consumerWindowSize, consumerMaxRate, false); } + @Override public void createQueue(final String address, final String queueName) throws ActiveMQException { createQueue(SimpleString.toSimpleString(address), SimpleString.toSimpleString(queueName)); } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString)); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, final boolean browseOnly) throws ActiveMQException { return createConsumer(queueName, filterString, consumerWindowSize, consumerMaxRate, browseOnly); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws ActiveMQException { return createConsumer(queueName, null, consumerWindowSize, consumerMaxRate, browseOnly); } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), browseOnly); } + @Override public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws ActiveMQException { return createConsumer(SimpleString.toSimpleString(queueName), null, browseOnly); } @@ -394,6 +418,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi * the client during that period, so failover won't occur. If we want direct consumers we need to * rethink how they work. */ + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, final int windowSize, @@ -402,6 +427,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return internalCreateConsumer(queueName, filterString, windowSize, maxRate, browseOnly); } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString, final int windowSize, @@ -410,18 +436,22 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return createConsumer(SimpleString.toSimpleString(queueName), SimpleString.toSimpleString(filterString), windowSize, maxRate, browseOnly); } + @Override public ClientProducer createProducer() throws ActiveMQException { return createProducer((SimpleString) null); } + @Override public ClientProducer createProducer(final SimpleString address) throws ActiveMQException { return createProducer(address, producerMaxRate); } + @Override public ClientProducer createProducer(final String address) throws ActiveMQException { return createProducer(SimpleString.toSimpleString(address)); } + @Override public ClientProducer createProducer(final SimpleString address, final int maxRate) throws ActiveMQException { return internalCreateProducer(address, maxRate); } @@ -430,6 +460,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return createProducer(SimpleString.toSimpleString(address), rate); } + @Override public XAResource getXAResource() { return this; } @@ -444,6 +475,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi throw ActiveMQClientMessageBundle.BUNDLE.txOutcomeUnknown(); } + @Override public void commit() throws ActiveMQException { checkClosed(); @@ -490,14 +522,17 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi workDone = false; } + @Override public boolean isRollbackOnly() { return rollbackOnly; } + @Override public void rollback() throws ActiveMQException { rollback(false); } + @Override public void rollback(final boolean isLastMessageAsDelivered) throws ActiveMQException { if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { ActiveMQClientLogger.LOGGER.trace("calling rollback(isLastMessageAsDelivered=" + isLastMessageAsDelivered + ")"); @@ -532,10 +567,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi rollbackOnly = false; } + @Override public void markRollbackOnly() { rollbackOnly = true; } + @Override public ClientMessage createMessage(final byte type, final boolean durable, final long expiration, @@ -544,34 +581,42 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return new ClientMessageImpl(type, durable, expiration, timestamp, priority, initialMessagePacketSize); } + @Override public ClientMessage createMessage(final byte type, final boolean durable) { return this.createMessage(type, durable, 0, System.currentTimeMillis(), (byte) 4); } + @Override public ClientMessage createMessage(final boolean durable) { return this.createMessage((byte) 0, durable); } + @Override public boolean isClosed() { return closed; } + @Override public boolean isAutoCommitSends() { return autoCommitSends; } + @Override public boolean isAutoCommitAcks() { return autoCommitAcks; } + @Override public boolean isBlockOnAcknowledge() { return blockOnAcknowledge; } + @Override public boolean isXA() { return xa; } + @Override public void resetIfNeeded() throws ActiveMQException { if (rollbackOnly) { ActiveMQClientLogger.LOGGER.resettingSessionAfterFailure(); @@ -579,6 +624,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public ClientSessionImpl start() throws ActiveMQException { checkClosed(); @@ -595,6 +641,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return this; } + @Override public void stop() throws ActiveMQException { stop(true); } @@ -613,26 +660,32 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void addFailureListener(final SessionFailureListener listener) { sessionFactory.addFailureListener(listener); } + @Override public boolean removeFailureListener(final SessionFailureListener listener) { return sessionFactory.removeFailureListener(listener); } + @Override public void addFailoverListener(FailoverEventListener listener) { sessionFactory.addFailoverListener(listener); } + @Override public boolean removeFailoverListener(FailoverEventListener listener) { return sessionFactory.removeFailoverListener(listener); } + @Override public int getVersion() { return sessionContext.getServerVersion(); } + @Override public boolean isClosing() { return inClose; } @@ -650,10 +703,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // ClientSessionInternal implementation // ------------------------------------------------------------ + @Override public int getMinLargeMessageSize() { return minLargeMessageSize; } + @Override public boolean isCompressLargeMessages() { return compressLargeMessages; } @@ -661,10 +716,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi /** * @return the cacheLargeMessageClient */ + @Override public boolean isCacheLargeMessageClient() { return cacheLargeMessageClient; } + @Override public String getName() { return name; } @@ -672,6 +729,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi /** * Acknowledges all messages received by the consumer so far. */ + @Override public void acknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { // if we're pre-acknowledging then we don't need to do anything if (preAcknowledge) { @@ -692,6 +750,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void individualAcknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { // if we're pre-acknowledging then we don't need to do anything if (preAcknowledge) { @@ -710,6 +769,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void expire(final ClientConsumer consumer, final Message message) throws ActiveMQException { checkClosed(); @@ -719,30 +779,35 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void addConsumer(final ClientConsumerInternal consumer) { synchronized (consumers) { consumers.put(consumer.getConsumerContext(), consumer); } } + @Override public void addProducer(final ClientProducerInternal producer) { synchronized (producers) { producers.add(producer); } } + @Override public void removeConsumer(final ClientConsumerInternal consumer) throws ActiveMQException { synchronized (consumers) { consumers.remove(consumer.getConsumerContext()); } } + @Override public void removeProducer(final ClientProducerInternal producer) { synchronized (producers) { producers.remove(producer); } } + @Override public void handleReceiveMessage(final ConsumerContext consumerID, final ClientMessageInternal message) throws Exception { ClientConsumerInternal consumer = getConsumer(consumerID); @@ -752,6 +817,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void handleReceiveLargeMessage(final ConsumerContext consumerID, ClientLargeMessageInternal clientLargeMessage, long largeMessageSize) throws Exception { @@ -762,6 +828,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void handleReceiveContinuation(final ConsumerContext consumerID, byte[] chunk, int flowControlSize, @@ -792,6 +859,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void close() throws ActiveMQException { if (closed) { ActiveMQClientLogger.LOGGER.debug("Session was already closed, giving up now, this=" + this); @@ -821,6 +889,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi doCleanup(false); } + @Override public synchronized void cleanUp(boolean failingOver) throws ActiveMQException { if (closed) { return; @@ -833,11 +902,13 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi doCleanup(failingOver); } + @Override public ClientSessionImpl setSendAcknowledgementHandler(final SendAcknowledgementHandler handler) { sessionContext.setSendAcknowledgementHandler(handler); return this; } + @Override public void preHandleFailover(RemotingConnection connection) { // We lock the channel to prevent any packets to be added to the re-send // cache during the failover process @@ -847,6 +918,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // Needs to be synchronized to prevent issues with occurring concurrently with close() + @Override public void handleFailover(final RemotingConnection backupConnection, ActiveMQException cause) { synchronized (this) { if (closed) { @@ -947,6 +1019,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } + @Override public void addMetaData(String key, String data) throws ActiveMQException { synchronized (metadata) { metadata.put(key, data); @@ -955,14 +1028,17 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi sessionContext.addSessionMetadata(key, data); } + @Override public void addUniqueMetaData(String key, String data) throws ActiveMQException { sessionContext.addUniqueMetaData(key, data); } + @Override public ClientSessionFactory getSessionFactory() { return sessionFactory; } + @Override public void setAddress(final Message message, final SimpleString address) { if (defaultAddress == null) { defaultAddress = address; @@ -979,48 +1055,58 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void setPacketSize(final int packetSize) { if (packetSize > this.initialMessagePacketSize) { this.initialMessagePacketSize = (int) (packetSize * 1.2); } } + @Override public void workDone() { workDone = true; } + @Override public void sendProducerCreditsMessage(final int credits, final SimpleString address) { sessionContext.sendProducerCreditsMessage(credits, address); } + @Override public synchronized ClientProducerCredits getCredits(final SimpleString address, final boolean anon) { ClientProducerCredits credits = producerCreditManager.getCredits(address, anon, sessionContext); return credits; } + @Override public void returnCredits(final SimpleString address) { producerCreditManager.returnCredits(address); } + @Override public void handleReceiveProducerCredits(final SimpleString address, final int credits) { producerCreditManager.receiveCredits(address, credits); } + @Override public void handleReceiveProducerFailCredits(final SimpleString address, int credits) { producerCreditManager.receiveFailCredits(address, credits); } + @Override public ClientProducerCreditManager getProducerCreditManager() { return producerCreditManager; } + @Override public void startCall() { if (concurrentCall.incrementAndGet() > 1) { ActiveMQClientLogger.LOGGER.invalidConcurrentSessionUsage(new Exception("trace")); } } + @Override public void endCall() { concurrentCall.decrementAndGet(); } @@ -1032,6 +1118,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // XAResource implementation // -------------------------------------------------------------------- + @Override public void commit(final Xid xid, final boolean onePhase) throws XAException { if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { ActiveMQClientLogger.LOGGER.trace("call commit(xid=" + convert(xid)); @@ -1073,6 +1160,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void end(final Xid xid, final int flags) throws XAException { if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { ActiveMQClientLogger.LOGGER.trace("Calling end:: " + convert(xid) + ", flags=" + convertTXFlag(flags)); @@ -1118,6 +1206,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void forget(final Xid xid) throws XAException { checkXA(); startCall(); @@ -1138,6 +1227,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public int getTransactionTimeout() throws XAException { checkXA(); @@ -1152,6 +1242,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public boolean setTransactionTimeout(final int seconds) throws XAException { checkXA(); @@ -1166,6 +1257,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public boolean isSameRM(final XAResource xares) throws XAException { checkXA(); @@ -1203,6 +1295,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return null; } + @Override public int prepare(final Xid xid) throws XAException { checkXA(); if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { @@ -1269,6 +1362,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public Xid[] recover(final int flags) throws XAException { checkXA(); @@ -1287,6 +1381,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi return new Xid[0]; } + @Override public void rollback(final Xid xid) throws XAException { checkXA(); @@ -1341,6 +1436,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void start(final Xid xid, final int flags) throws XAException { if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { ActiveMQClientLogger.LOGGER.trace("Calling start:: " + convert(xid) + " clientXID=" + xid + " flags = " + convertTXFlag(flags)); @@ -1388,6 +1484,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // FailureListener implementation -------------------------------------------- + @Override public void connectionFailed(final ActiveMQException me, boolean failedOver) { try { cleanUp(false); @@ -1397,6 +1494,7 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi } } + @Override public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { connectionFailed(me, failedOver); } @@ -1404,10 +1502,12 @@ public final class ClientSessionImpl implements ClientSessionInternal, FailureLi // Public // ---------------------------------------------------------------------------- + @Override public void setForceNotSameRM(final boolean force) { forceNotSameRM = force; } + @Override public RemotingConnection getConnection() { return sessionContext.getRemotingConnection(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java index ae711bf90a..0cb38f6e90 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java @@ -47,6 +47,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll /** * */ + @Override public void discardUnusedPackets() { bufferDelegate.discardUnusedPackets(); } @@ -54,22 +55,27 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll /** * Add a buff to the List, or save it to the OutputStream if set */ + @Override public void addPacket(byte[] chunk, int flowControlSize, boolean isContinues) { bufferDelegate.addPacket(chunk, flowControlSize, isContinues); } + @Override public synchronized void cancel() { bufferDelegate.cancel(); } + @Override public synchronized void close() { bufferDelegate.cancel(); } + @Override public void setOutputStream(final OutputStream output) throws ActiveMQException { bufferDelegate.setOutputStream(new InflaterWriter(output)); } + @Override public synchronized void saveBuffer(final OutputStream output) throws ActiveMQException { setOutputStream(output); waitCompletion(0); @@ -78,6 +84,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll /** * @param timeWait Milliseconds to Wait. 0 means forever */ + @Override public synchronized boolean waitCompletion(final long timeWait) throws ActiveMQException { return bufferDelegate.waitCompletion(timeWait); } @@ -108,6 +115,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalStateException("Position not supported over compressed large messages"); } + @Override public byte readByte() { try { return getStream().readByte(); @@ -196,82 +204,102 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public int readerIndex() { return 0; } + @Override public void readerIndex(final int readerIndex) { // TODO } + @Override public int writerIndex() { // TODO return 0; } + @Override public long getSize() { return this.bufferDelegate.getSize(); } + @Override public void writerIndex(final int writerIndex) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void setIndex(final int readerIndex, final int writerIndex) { positioningNotSupported(); } + @Override public void clear() { } + @Override public boolean readable() { return true; } + @Override public boolean writable() { return false; } + @Override public int readableBytes() { return 1; } + @Override public int writableBytes() { return 0; } + @Override public void markReaderIndex() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void resetReaderIndex() { // TODO: reset positioning if possible } + @Override public void markWriterIndex() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void resetWriterIndex() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void discardReadBytes() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public short getUnsignedByte(final int index) { return (short) (getByte(index) & 0xFF); } + @Override public int getUnsignedShort(final int index) { return getShort(index) & 0xFFFF; } + @Override public long getUnsignedInt(final int index) { return getInt(index) & 0xFFFFFFFFL; } + @Override public void getBytes(int index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { @@ -279,10 +307,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public void getBytes(final int index, final ActiveMQBuffer dst) { getBytes(index, dst, dst.writableBytes()); } + @Override public void getBytes(final int index, final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); @@ -291,18 +321,22 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll dst.writerIndex(dst.writerIndex() + length); } + @Override public void setBytes(final int index, final byte[] src) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void setBytes(final int index, final ActiveMQBuffer src) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void setBytes(final int index, final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public int readUnsignedByte() { try { return getStream().readUnsignedByte(); @@ -312,6 +346,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public short readShort() { try { return getStream().readShort(); @@ -321,6 +356,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public int readUnsignedShort() { try { return getStream().readUnsignedShort(); @@ -330,6 +366,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public int readInt() { try { return getStream().readInt(); @@ -339,10 +376,12 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public long readUnsignedInt() { return readInt() & 0xFFFFFFFFL; } + @Override public long readLong() { try { return getStream().readLong(); @@ -352,6 +391,7 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public void readBytes(final byte[] dst, final int dstIndex, final int length) { try { int nReadBytes = getStream().read(dst, dstIndex, length); @@ -364,14 +404,17 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } } + @Override public void readBytes(final byte[] dst) { readBytes(dst, 0, dst.length); } + @Override public void readBytes(final ActiveMQBuffer dst) { readBytes(dst, dst.writableBytes()); } + @Override public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); @@ -380,18 +423,21 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll dst.writerIndex(dst.writerIndex() + length); } + @Override public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length) { byte[] destBytes = new byte[length]; readBytes(destBytes); dst.setBytes(dstIndex, destBytes); } + @Override public void readBytes(final ByteBuffer dst) { byte[] bytesToGet = new byte[dst.remaining()]; readBytes(bytesToGet); dst.put(bytesToGet); } + @Override public int skipBytes(final int length) { try { @@ -425,38 +471,47 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll } + @Override public void writeByte(final byte value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeShort(final short value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeInt(final int value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeLong(final long value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeBytes(final byte[] src, final int srcIndex, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeBytes(final byte[] src) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeBytes(final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeBytes(final ByteBuffer src) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public ByteBuffer toByteBuffer() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } @@ -475,18 +530,22 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll return (char) readShort(); } + @Override public char getChar(final int index) { return (char) getShort(index); } + @Override public double getDouble(final int index) { return Double.longBitsToDouble(getLong(index)); } + @Override public float getFloat(final int index) { return Float.intBitsToFloat(getInt(index)); } + @Override public ActiveMQBuffer readBytes(final int length) { byte[] bytesToGet = new byte[length]; readBytes(bytesToGet); @@ -604,48 +663,59 @@ final class CompressedLargeMessageControllerImpl implements LargeMessageControll throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public ActiveMQBuffer copy() { throw new UnsupportedOperationException(); } + @Override public ActiveMQBuffer slice(final int index, final int length) { throw new UnsupportedOperationException(); } // Inner classes ------------------------------------------------- + @Override public ByteBuf byteBuf() { return null; } + @Override public ActiveMQBuffer copy(final int index, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public ActiveMQBuffer duplicate() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public ActiveMQBuffer readSlice(final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void setChar(final int index, final char value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void setDouble(final int index, final double value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void setFloat(final int index, final float value) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public ActiveMQBuffer slice() { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } + @Override public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { throw new IllegalAccessError(OPERATION_NOT_SUPPORTED); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/DelegatingSession.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/DelegatingSession.java index 4d72dc93e2..95bb26f7e5 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/DelegatingSession.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/DelegatingSession.java @@ -90,10 +90,12 @@ public class DelegatingSession implements ClientSessionInternal { } } + @Override public boolean isClosing() { return session.isClosing(); } + @Override public void acknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { session.acknowledge(consumer, message); } @@ -103,34 +105,42 @@ public class DelegatingSession implements ClientSessionInternal { session.addLifeCycleListener(lifeCycleListener); } + @Override public void individualAcknowledge(final ClientConsumer consumer, final Message message) throws ActiveMQException { session.individualAcknowledge(consumer, message); } + @Override public void addConsumer(final ClientConsumerInternal consumer) { session.addConsumer(consumer); } + @Override public void addFailureListener(final SessionFailureListener listener) { session.addFailureListener(listener); } + @Override public void addFailoverListener(FailoverEventListener listener) { session.addFailoverListener(listener); } + @Override public void addProducer(final ClientProducerInternal producer) { session.addProducer(producer); } + @Override public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { return session.addressQuery(address); } + @Override public void cleanUp(boolean failingOver) throws ActiveMQException { session.cleanUp(failingOver); } + @Override public void close() throws ActiveMQException { closed = true; @@ -141,22 +151,27 @@ public class DelegatingSession implements ClientSessionInternal { session.close(); } + @Override public void markRollbackOnly() { session.markRollbackOnly(); } + @Override public void commit() throws ActiveMQException { session.commit(); } + @Override public void commit(final Xid xid, final boolean onePhase) throws XAException { session.commit(xid, onePhase); } + @Override public ClientMessage createMessage(final boolean durable) { return session.createMessage(durable); } + @Override public ClientMessage createMessage(final byte type, final boolean durable, final long expiration, @@ -165,16 +180,19 @@ public class DelegatingSession implements ClientSessionInternal { return session.createMessage(type, durable, expiration, timestamp, priority); } + @Override public ClientMessage createMessage(final byte type, final boolean durable) { return session.createMessage(type, durable); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, filterString, browseOnly); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, final int windowSize, @@ -183,21 +201,25 @@ public class DelegatingSession implements ClientSessionInternal { return session.createConsumer(queueName, filterString, windowSize, maxRate, browseOnly); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws ActiveMQException { return session.createConsumer(queueName, filterString); } + @Override public ClientConsumer createConsumer(final SimpleString queueName) throws ActiveMQException { return session.createConsumer(queueName); } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, filterString, browseOnly); } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString, final int windowSize, @@ -206,47 +228,58 @@ public class DelegatingSession implements ClientSessionInternal { return session.createConsumer(queueName, filterString, windowSize, maxRate, browseOnly); } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString) throws ActiveMQException { return session.createConsumer(queueName, filterString); } + @Override public ClientConsumer createConsumer(final String queueName) throws ActiveMQException { return session.createConsumer(queueName); } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, browseOnly); } + @Override public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws ActiveMQException { return session.createConsumer(queueName, browseOnly); } + @Override public ClientProducer createProducer() throws ActiveMQException { return session.createProducer(); } + @Override public ClientProducer createProducer(final SimpleString address, final int rate) throws ActiveMQException { return session.createProducer(address, rate); } + @Override public ClientProducer createProducer(final SimpleString address) throws ActiveMQException { return session.createProducer(address); } + @Override public ClientProducer createProducer(final String address) throws ActiveMQException { return session.createProducer(address); } + @Override public void createQueue(final String address, final String queueName) throws ActiveMQException { session.createQueue(address, queueName); } + @Override public void createQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { session.createQueue(address, queueName); } + @Override public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws ActiveMQException { @@ -268,6 +301,7 @@ public class DelegatingSession implements ClientSessionInternal { session.createSharedQueue(address, queueName, filter, durable); } + @Override public void createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, @@ -275,12 +309,14 @@ public class DelegatingSession implements ClientSessionInternal { session.createQueue(address, queueName, filterString, durable); } + @Override public void createQueue(final String address, final String queueName, final boolean durable) throws ActiveMQException { session.createQueue(address, queueName, durable); } + @Override public void createQueue(final String address, final String queueName, final String filterString, @@ -288,74 +324,91 @@ public class DelegatingSession implements ClientSessionInternal { session.createQueue(address, queueName, filterString, durable); } + @Override public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws ActiveMQException { session.createTemporaryQueue(address, queueName, filter); } + @Override public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { session.createTemporaryQueue(address, queueName); } + @Override public void createTemporaryQueue(final String address, final String queueName, final String filter) throws ActiveMQException { session.createTemporaryQueue(address, queueName, filter); } + @Override public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException { session.createTemporaryQueue(address, queueName); } + @Override public void deleteQueue(final SimpleString queueName) throws ActiveMQException { session.deleteQueue(queueName); } + @Override public void deleteQueue(final String queueName) throws ActiveMQException { session.deleteQueue(queueName); } + @Override public void end(final Xid xid, final int flags) throws XAException { session.end(xid, flags); } + @Override public void expire(final ClientConsumer consumer, final Message message) throws ActiveMQException { session.expire(consumer, message); } + @Override public void forget(final Xid xid) throws XAException { session.forget(xid); } + @Override public RemotingConnection getConnection() { return session.getConnection(); } + @Override public int getMinLargeMessageSize() { return session.getMinLargeMessageSize(); } + @Override public String getName() { return session.getName(); } + @Override public int getTransactionTimeout() throws XAException { return session.getTransactionTimeout(); } + @Override public int getVersion() { return session.getVersion(); } + @Override public XAResource getXAResource() { return session.getXAResource(); } + @Override public void preHandleFailover(RemotingConnection connection) { session.preHandleFailover(connection); } + @Override public void handleFailover(final RemotingConnection backupConnection, ActiveMQException cause) { session.handleFailover(backupConnection, cause); } @@ -385,152 +438,189 @@ public class DelegatingSession implements ClientSessionInternal { session.handleConsumerDisconnect(consumerContext); } + @Override public boolean isAutoCommitAcks() { return session.isAutoCommitAcks(); } + @Override public boolean isAutoCommitSends() { return session.isAutoCommitSends(); } + @Override public boolean isBlockOnAcknowledge() { return session.isBlockOnAcknowledge(); } + @Override public boolean isCacheLargeMessageClient() { return session.isCacheLargeMessageClient(); } + @Override public boolean isClosed() { return session.isClosed(); } + @Override public boolean isSameRM(final XAResource xares) throws XAException { return session.isSameRM(xares); } + @Override public boolean isXA() { return session.isXA(); } + @Override public int prepare(final Xid xid) throws XAException { return session.prepare(xid); } + @Override public QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { return session.queueQuery(queueName); } + @Override public Xid[] recover(final int flag) throws XAException { return session.recover(flag); } + @Override public void removeConsumer(final ClientConsumerInternal consumer) throws ActiveMQException { session.removeConsumer(consumer); } + @Override public boolean removeFailureListener(final SessionFailureListener listener) { return session.removeFailureListener(listener); } + @Override public boolean removeFailoverListener(FailoverEventListener listener) { return session.removeFailoverListener(listener); } + @Override public void removeProducer(final ClientProducerInternal producer) { session.removeProducer(producer); } + @Override public void rollback() throws ActiveMQException { session.rollback(); } + @Override public boolean isRollbackOnly() { return session.isRollbackOnly(); } + @Override public void rollback(final boolean considerLastMessageAsDelivered) throws ActiveMQException { session.rollback(considerLastMessageAsDelivered); } + @Override public void rollback(final Xid xid) throws XAException { session.rollback(xid); } + @Override public DelegatingSession setSendAcknowledgementHandler(final SendAcknowledgementHandler handler) { session.setSendAcknowledgementHandler(handler); return this; } + @Override public boolean setTransactionTimeout(final int seconds) throws XAException { return session.setTransactionTimeout(seconds); } + @Override public void resetIfNeeded() throws ActiveMQException { session.resetIfNeeded(); } + @Override public DelegatingSession start() throws ActiveMQException { session.start(); return this; } + @Override public void start(final Xid xid, final int flags) throws XAException { session.start(xid, flags); } + @Override public void stop() throws ActiveMQException { session.stop(); } + @Override public ClientSessionFactory getSessionFactory() { return session.getSessionFactory(); } + @Override public void setForceNotSameRM(final boolean force) { session.setForceNotSameRM(force); } + @Override public void workDone() { session.workDone(); } + @Override public void sendProducerCreditsMessage(final int credits, final SimpleString address) { session.sendProducerCreditsMessage(credits, address); } + @Override public ClientProducerCredits getCredits(final SimpleString address, final boolean anon) { return session.getCredits(address, anon); } + @Override public void returnCredits(final SimpleString address) { session.returnCredits(address); } + @Override public void handleReceiveProducerCredits(final SimpleString address, final int credits) { session.handleReceiveProducerCredits(address, credits); } + @Override public void handleReceiveProducerFailCredits(final SimpleString address, final int credits) { session.handleReceiveProducerFailCredits(address, credits); } + @Override public ClientProducerCreditManager getProducerCreditManager() { return session.getProducerCreditManager(); } + @Override public void setAddress(Message message, SimpleString address) { session.setAddress(message, address); } + @Override public void setPacketSize(int packetSize) { session.setPacketSize(packetSize); } + @Override public void addMetaData(String key, String data) throws ActiveMQException { session.addMetaData(key, data); } + @Override public boolean isCompressLargeMessages() { return session.isCompressLargeMessages(); } @@ -546,10 +636,12 @@ public class DelegatingSession implements ClientSessionInternal { } + @Override public void startCall() { session.startCall(); } + @Override public void endCall() { session.endCall(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java index ad79e82475..fb5b687896 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/LargeMessageControllerImpl.java @@ -134,6 +134,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { this.local = local; } + @Override public void discardUnusedPackets() { if (outStream == null) { if (local) @@ -150,6 +151,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { * TODO: move this to ConsumerContext as large message is a protocol specific thing * Add a buff to the List, or save it to the OutputStream if set */ + @Override public void addPacket(byte[] chunk, int flowControlSize, boolean isContinues) { int flowControlCredit = 0; @@ -206,6 +208,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { } } + @Override public void cancel() { this.handledException = ActiveMQClientMessageBundle.BUNDLE.largeMessageInterrupted(); @@ -232,12 +235,14 @@ public class LargeMessageControllerImpl implements LargeMessageController { } } + @Override public synchronized void close() { if (fileCache != null) { fileCache.close(); } } + @Override public void setOutputStream(final OutputStream output) throws ActiveMQException { int totalFlowControl = 0; @@ -268,6 +273,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { } } + @Override public synchronized void saveBuffer(final OutputStream output) throws ActiveMQException { if (streamClosed) { throw ActiveMQClientMessageBundle.BUNDLE.largeMessageLostSession(); @@ -280,6 +286,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { * @param timeWait Milliseconds to Wait. 0 means forever * @throws ActiveMQException */ + @Override public synchronized boolean waitCompletion(final long timeWait) throws ActiveMQException { if (outStream == null) { // There is no stream.. it will never achieve the end of streaming @@ -344,6 +351,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { return -1; } + @Override public byte readByte() { return getByte(readerIndex++); } @@ -425,6 +433,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { return out.write(ByteBuffer.wrap(bytesToGet)); } + @Override public int getInt(final int index) { return (getByte(index) & 0xff) << 24 | (getByte(index + 1) & 0xff) << 16 | (getByte(index + 2) & 0xff) << 8 | @@ -515,10 +524,12 @@ public class LargeMessageControllerImpl implements LargeMessageController { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public int readerIndex() { return (int) readerIndex; } + @Override public void readerIndex(final int readerIndex) { try { checkForPacket(readerIndex); @@ -530,18 +541,22 @@ public class LargeMessageControllerImpl implements LargeMessageController { this.readerIndex = readerIndex; } + @Override public int writerIndex() { return (int) totalSize; } + @Override public long getSize() { return totalSize; } + @Override public void writerIndex(final int writerIndex) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void setIndex(final int readerIndex, final int writerIndex) { try { checkForPacket(readerIndex); @@ -553,17 +568,21 @@ public class LargeMessageControllerImpl implements LargeMessageController { this.readerIndex = readerIndex; } + @Override public void clear() { } + @Override public boolean readable() { return true; } + @Override public boolean writable() { return false; } + @Override public int readableBytes() { long readableBytes = totalSize - readerIndex; @@ -575,14 +594,17 @@ public class LargeMessageControllerImpl implements LargeMessageController { } } + @Override public int writableBytes() { return 0; } + @Override public void markReaderIndex() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void resetReaderIndex() { try { checkForPacket(0); @@ -593,22 +615,27 @@ public class LargeMessageControllerImpl implements LargeMessageController { } } + @Override public void markWriterIndex() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void resetWriterIndex() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void discardReadBytes() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public short getUnsignedByte(final int index) { return (short) (getByte(index) & 0xFF); } + @Override public int getUnsignedShort(final int index) { return getShort(index) & 0xFFFF; } @@ -621,10 +648,12 @@ public class LargeMessageControllerImpl implements LargeMessageController { return value; } + @Override public long getUnsignedInt(final int index) { return getInt(index) & 0xFFFFFFFFL; } + @Override public void getBytes(int index, final byte[] dst) { // TODO: optimize this by using System.arraycopy for (int i = 0; i < dst.length; i++) { @@ -639,10 +668,12 @@ public class LargeMessageControllerImpl implements LargeMessageController { } } + @Override public void getBytes(final int index, final ActiveMQBuffer dst) { getBytes(index, dst, dst.writableBytes()); } + @Override public void getBytes(final int index, final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); @@ -651,14 +682,17 @@ public class LargeMessageControllerImpl implements LargeMessageController { dst.writerIndex(dst.writerIndex() + length); } + @Override public void setBytes(final int index, final byte[] src) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void setBytes(final int index, final ActiveMQBuffer src) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void setBytes(final int index, final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -667,16 +701,19 @@ public class LargeMessageControllerImpl implements LargeMessageController { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public int readUnsignedByte() { return (short) (readByte() & 0xFF); } + @Override public short readShort() { short v = getShort(readerIndex); readerIndex += 2; return v; } + @Override public int readUnsignedShort() { return readShort() & 0xFFFF; } @@ -695,6 +732,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { return v; } + @Override public int readInt() { int v = getInt(readerIndex); readerIndex += 4; @@ -706,29 +744,35 @@ public class LargeMessageControllerImpl implements LargeMessageController { return v; } + @Override public long readUnsignedInt() { return readInt() & 0xFFFFFFFFL; } + @Override public long readLong() { long v = getLong(readerIndex); readerIndex += 8; return v; } + @Override public void readBytes(final byte[] dst, final int dstIndex, final int length) { getBytes(readerIndex, dst, dstIndex, length); readerIndex += length; } + @Override public void readBytes(final byte[] dst) { readBytes(dst, 0, dst.length); } + @Override public void readBytes(final ActiveMQBuffer dst) { readBytes(dst, dst.writableBytes()); } + @Override public void readBytes(final ActiveMQBuffer dst, final int length) { if (length > dst.writableBytes()) { throw new IndexOutOfBoundsException(); @@ -737,11 +781,13 @@ public class LargeMessageControllerImpl implements LargeMessageController { dst.writerIndex(dst.writerIndex() + length); } + @Override public void readBytes(final ActiveMQBuffer dst, final int dstIndex, final int length) { getBytes(readerIndex, dst, dstIndex, length); readerIndex += length; } + @Override public void readBytes(final ByteBuffer dst) { int length = dst.remaining(); getBytes(readerIndex, dst); @@ -759,6 +805,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { readerIndex += length; } + @Override public int skipBytes(final int length) { long newReaderIndex = readerIndex + length; @@ -767,10 +814,12 @@ public class LargeMessageControllerImpl implements LargeMessageController { return length; } + @Override public void writeByte(final byte value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeShort(final short value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -779,18 +828,22 @@ public class LargeMessageControllerImpl implements LargeMessageController { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeInt(final int value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeLong(final long value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeBytes(final byte[] src, final int srcIndex, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeBytes(final byte[] src) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -799,10 +852,12 @@ public class LargeMessageControllerImpl implements LargeMessageController { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeBytes(final ActiveMQBuffer src, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeBytes(final ByteBuffer src) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -819,6 +874,7 @@ public class LargeMessageControllerImpl implements LargeMessageController { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public ByteBuffer toByteBuffer() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } @@ -849,18 +905,22 @@ public class LargeMessageControllerImpl implements LargeMessageController { return (char) readShort(); } + @Override public char getChar(final int index) { return (char) getShort(index); } + @Override public double getDouble(final int index) { return Double.longBitsToDouble(getLong(index)); } + @Override public float getFloat(final int index) { return Float.intBitsToFloat(getInt(index)); } + @Override public ActiveMQBuffer readBytes(final int length) { byte[] bytesToGet = new byte[length]; getBytes(readerIndex, bytesToGet); @@ -979,10 +1039,12 @@ public class LargeMessageControllerImpl implements LargeMessageController { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public ActiveMQBuffer copy() { throw new UnsupportedOperationException(); } + @Override public ActiveMQBuffer slice(final int index, final int length) { throw new UnsupportedOperationException(); } @@ -1198,38 +1260,47 @@ public class LargeMessageControllerImpl implements LargeMessageController { return ByteUtil.readLine(this); } + @Override public ByteBuf byteBuf() { return null; } + @Override public ActiveMQBuffer copy(final int index, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public ActiveMQBuffer duplicate() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public ActiveMQBuffer readSlice(final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void setChar(final int index, final char value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void setDouble(final int index, final double value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void setFloat(final int index, final float value) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public ActiveMQBuffer slice() { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } + @Override public void writeBytes(final ActiveMQBuffer src, final int srcIndex, final int length) { throw new IllegalAccessError(LargeMessageControllerImpl.READ_ONLY_ERROR_MESSAGE); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/QueueQueryImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/QueueQueryImpl.java index 27607bc025..40ea86a591 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/QueueQueryImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/QueueQueryImpl.java @@ -70,38 +70,47 @@ public class QueueQueryImpl implements ClientSession.QueueQuery { this.autoCreateJmsQueues = autoCreateJmsQueues; } + @Override public SimpleString getName() { return name; } + @Override public SimpleString getAddress() { return address; } + @Override public int getConsumerCount() { return consumerCount; } + @Override public SimpleString getFilterString() { return filterString; } + @Override public long getMessageCount() { return messageCount; } + @Override public boolean isDurable() { return durable; } + @Override public boolean isAutoCreateJmsQueues() { return autoCreateJmsQueues; } + @Override public boolean isTemporary() { return temporary; } + @Override public boolean isExists() { return exists; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java index 73af6fda94..0a608a1298 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorImpl.java @@ -314,6 +314,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery throw new IllegalStateException("Please specify a load balancing policy class name on the session factory"); } AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { loadBalancingPolicy = (ConnectionLoadBalancingPolicy) ClassloadingUtil.newInstanceFromClassLoader(connectionLoadBalancingPolicyClassName); return null; @@ -500,6 +501,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery this(topology, useHA, null, transportConfigs); } + @Override public void resetToInitialConnectors() { synchronized (topologyArrayGuard) { receivedTopology = false; @@ -511,6 +513,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery /* * I'm not using isAllInVM here otherwsie BeanProperties would translate this as a property for the URL */ + @Override public boolean allInVM() { for (TransportConfiguration config : getStaticTransportConfigurations()) { if (!config.getFactoryClassName().contains("InVMConnectorFactory")) { @@ -597,6 +600,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public void start(Executor executor) throws Exception { initialise(); @@ -604,6 +608,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery if (executor != null) { executor.execute(new Runnable() { + @Override public void run() { try { connect(); @@ -618,10 +623,12 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public ClientProtocolManager newProtocolManager() { return getProtocolManagerFactory().newProtocolManager(); } + @Override public ClientProtocolManagerFactory getProtocolManagerFactory() { if (protocolManagerFactory == null) { // Default one in case it's null @@ -630,12 +637,14 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return protocolManagerFactory; } + @Override public ServerLocator setProtocolManagerFactory(ClientProtocolManagerFactory protocolManagerFactory) { this.protocolManagerFactory = protocolManagerFactory; protocolManagerFactory.setLocator(this); return this; } + @Override public void disableFinalizeCheck() { finalizeCheck = false; } @@ -670,15 +679,18 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return connect(true); } + @Override public ServerLocatorImpl setAfterConnectionInternalListener(AfterConnectInternalListener listener) { this.afterConnectListener = listener; return this; } + @Override public AfterConnectInternalListener getAfterConnectInternalListener() { return afterConnectListener; } + @Override public ClientSessionFactory createSessionFactory(String nodeID) throws Exception { TopologyMember topologyMember = topology.getMember(nodeID); @@ -705,6 +717,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return null; } + @Override public ClientSessionFactory createSessionFactory(final TransportConfiguration transportConfiguration) throws Exception { assertOpen(); @@ -730,6 +743,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public ClientSessionFactory createSessionFactory(final TransportConfiguration transportConfiguration, int reconnectAttempts, boolean failoverOnInitialConnection) throws Exception { @@ -770,6 +784,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public ClientSessionFactory createSessionFactory() throws ActiveMQException { assertOpen(); @@ -902,327 +917,393 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return fromInterceptors(outgoingInterceptors); } + @Override public boolean isCacheLargeMessagesClient() { return cacheLargeMessagesClient; } + @Override public ServerLocatorImpl setCacheLargeMessagesClient(final boolean cached) { cacheLargeMessagesClient = cached; return this; } + @Override public long getClientFailureCheckPeriod() { return clientFailureCheckPeriod; } + @Override public ServerLocatorImpl setClientFailureCheckPeriod(final long clientFailureCheckPeriod) { checkWrite(); this.clientFailureCheckPeriod = clientFailureCheckPeriod; return this; } + @Override public long getConnectionTTL() { return connectionTTL; } + @Override public ServerLocatorImpl setConnectionTTL(final long connectionTTL) { checkWrite(); this.connectionTTL = connectionTTL; return this; } + @Override public long getCallTimeout() { return callTimeout; } + @Override public ServerLocatorImpl setCallTimeout(final long callTimeout) { checkWrite(); this.callTimeout = callTimeout; return this; } + @Override public long getCallFailoverTimeout() { return callFailoverTimeout; } + @Override public ServerLocatorImpl setCallFailoverTimeout(long callFailoverTimeout) { checkWrite(); this.callFailoverTimeout = callFailoverTimeout; return this; } + @Override public int getMinLargeMessageSize() { return minLargeMessageSize; } + @Override public ServerLocatorImpl setMinLargeMessageSize(final int minLargeMessageSize) { checkWrite(); this.minLargeMessageSize = minLargeMessageSize; return this; } + @Override public int getConsumerWindowSize() { return consumerWindowSize; } + @Override public ServerLocatorImpl setConsumerWindowSize(final int consumerWindowSize) { checkWrite(); this.consumerWindowSize = consumerWindowSize; return this; } + @Override public int getConsumerMaxRate() { return consumerMaxRate; } + @Override public ServerLocatorImpl setConsumerMaxRate(final int consumerMaxRate) { checkWrite(); this.consumerMaxRate = consumerMaxRate; return this; } + @Override public int getConfirmationWindowSize() { return confirmationWindowSize; } + @Override public ServerLocatorImpl setConfirmationWindowSize(final int confirmationWindowSize) { checkWrite(); this.confirmationWindowSize = confirmationWindowSize; return this; } + @Override public int getProducerWindowSize() { return producerWindowSize; } + @Override public ServerLocatorImpl setProducerWindowSize(final int producerWindowSize) { checkWrite(); this.producerWindowSize = producerWindowSize; return this; } + @Override public int getProducerMaxRate() { return producerMaxRate; } + @Override public ServerLocatorImpl setProducerMaxRate(final int producerMaxRate) { checkWrite(); this.producerMaxRate = producerMaxRate; return this; } + @Override public boolean isBlockOnAcknowledge() { return blockOnAcknowledge; } + @Override public ServerLocatorImpl setBlockOnAcknowledge(final boolean blockOnAcknowledge) { checkWrite(); this.blockOnAcknowledge = blockOnAcknowledge; return this; } + @Override public boolean isBlockOnDurableSend() { return blockOnDurableSend; } + @Override public ServerLocatorImpl setBlockOnDurableSend(final boolean blockOnDurableSend) { checkWrite(); this.blockOnDurableSend = blockOnDurableSend; return this; } + @Override public boolean isBlockOnNonDurableSend() { return blockOnNonDurableSend; } + @Override public ServerLocatorImpl setBlockOnNonDurableSend(final boolean blockOnNonDurableSend) { checkWrite(); this.blockOnNonDurableSend = blockOnNonDurableSend; return this; } + @Override public boolean isAutoGroup() { return autoGroup; } + @Override public ServerLocatorImpl setAutoGroup(final boolean autoGroup) { checkWrite(); this.autoGroup = autoGroup; return this; } + @Override public boolean isPreAcknowledge() { return preAcknowledge; } + @Override public ServerLocatorImpl setPreAcknowledge(final boolean preAcknowledge) { checkWrite(); this.preAcknowledge = preAcknowledge; return this; } + @Override public int getAckBatchSize() { return ackBatchSize; } + @Override public ServerLocatorImpl setAckBatchSize(final int ackBatchSize) { checkWrite(); this.ackBatchSize = ackBatchSize; return this; } + @Override public boolean isUseGlobalPools() { return useGlobalPools; } + @Override public ServerLocatorImpl setUseGlobalPools(final boolean useGlobalPools) { checkWrite(); this.useGlobalPools = useGlobalPools; return this; } + @Override public int getScheduledThreadPoolMaxSize() { return scheduledThreadPoolMaxSize; } + @Override public ServerLocatorImpl setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize) { checkWrite(); this.scheduledThreadPoolMaxSize = scheduledThreadPoolMaxSize; return this; } + @Override public int getThreadPoolMaxSize() { return threadPoolMaxSize; } + @Override public ServerLocatorImpl setThreadPoolMaxSize(final int threadPoolMaxSize) { checkWrite(); this.threadPoolMaxSize = threadPoolMaxSize; return this; } + @Override public long getRetryInterval() { return retryInterval; } + @Override public ServerLocatorImpl setRetryInterval(final long retryInterval) { checkWrite(); this.retryInterval = retryInterval; return this; } + @Override public long getMaxRetryInterval() { return maxRetryInterval; } + @Override public ServerLocatorImpl setMaxRetryInterval(final long retryInterval) { checkWrite(); maxRetryInterval = retryInterval; return this; } + @Override public double getRetryIntervalMultiplier() { return retryIntervalMultiplier; } + @Override public ServerLocatorImpl setRetryIntervalMultiplier(final double retryIntervalMultiplier) { checkWrite(); this.retryIntervalMultiplier = retryIntervalMultiplier; return this; } + @Override public int getReconnectAttempts() { return reconnectAttempts; } + @Override public ServerLocatorImpl setReconnectAttempts(final int reconnectAttempts) { checkWrite(); this.reconnectAttempts = reconnectAttempts; return this; } + @Override public ServerLocatorImpl setInitialConnectAttempts(int initialConnectAttempts) { checkWrite(); this.initialConnectAttempts = initialConnectAttempts; return this; } + @Override public int getInitialConnectAttempts() { return initialConnectAttempts; } + @Override public boolean isFailoverOnInitialConnection() { return this.failoverOnInitialConnection; } + @Override public ServerLocatorImpl setFailoverOnInitialConnection(final boolean failover) { checkWrite(); this.failoverOnInitialConnection = failover; return this; } + @Override public String getConnectionLoadBalancingPolicyClassName() { return connectionLoadBalancingPolicyClassName; } + @Override public ServerLocatorImpl setConnectionLoadBalancingPolicyClassName(final String loadBalancingPolicyClassName) { checkWrite(); connectionLoadBalancingPolicyClassName = loadBalancingPolicyClassName; return this; } + @Override public TransportConfiguration[] getStaticTransportConfigurations() { if (initialConnectors == null) return new TransportConfiguration[]{}; return Arrays.copyOf(initialConnectors, initialConnectors.length); } + @Override public DiscoveryGroupConfiguration getDiscoveryGroupConfiguration() { return discoveryGroupConfiguration; } + @Override public ServerLocatorImpl addIncomingInterceptor(final Interceptor interceptor) { incomingInterceptors.add(interceptor); return this; } + @Override public ServerLocatorImpl addOutgoingInterceptor(final Interceptor interceptor) { outgoingInterceptors.add(interceptor); return this; } + @Override public boolean removeIncomingInterceptor(final Interceptor interceptor) { return incomingInterceptors.remove(interceptor); } + @Override public boolean removeOutgoingInterceptor(final Interceptor interceptor) { return outgoingInterceptors.remove(interceptor); } + @Override public int getInitialMessagePacketSize() { return initialMessagePacketSize; } + @Override public ServerLocatorImpl setInitialMessagePacketSize(final int size) { checkWrite(); initialMessagePacketSize = size; return this; } + @Override public ServerLocatorImpl setGroupID(final String groupID) { checkWrite(); this.groupID = groupID; return this; } + @Override public String getGroupID() { return groupID; } + @Override public boolean isCompressLargeMessage() { return compressLargeMessage; } + @Override public ServerLocatorImpl setCompressLargeMessage(boolean avoid) { this.compressLargeMessage = avoid; return this; @@ -1242,33 +1323,40 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return initialConnectors.length; } + @Override public ServerLocatorImpl setIdentity(String identity) { this.identity = identity; return this; } + @Override public ServerLocatorImpl setNodeID(String nodeID) { this.nodeID = nodeID; return this; } + @Override public String getNodeID() { return nodeID; } + @Override public ServerLocatorImpl setClusterConnection(boolean clusterConnection) { this.clusterConnection = clusterConnection; return this; } + @Override public boolean isClusterConnection() { return clusterConnection; } + @Override public TransportConfiguration getClusterTransportConfiguration() { return clusterTransportConfiguration; } + @Override public ServerLocatorImpl setClusterTransportConfiguration(TransportConfiguration tc) { this.clusterTransportConfiguration = tc; return this; @@ -1283,10 +1371,12 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery super.finalize(); } + @Override public void cleanup() { doClose(false); } + @Override public void close() { doClose(true); } @@ -1428,6 +1518,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } + @Override public void notifyNodeUp(long uniqueEventID, final String nodeID, final String backupGroupName, @@ -1498,6 +1589,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public synchronized void connectorsChanged(List newConnectors) { if (receivedTopology) { return; @@ -1522,6 +1614,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery // to trigger the node notification to form the cluster. Runnable connectRunnable = new Runnable() { + @Override public void run() { try { connect(); @@ -1540,6 +1633,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public void factoryClosed(final ClientSessionFactory factory) { boolean isEmpty; synchronized (factories) { @@ -1557,6 +1651,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public Topology getTopology() { return topology; } @@ -1566,11 +1661,13 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return getNumInitialConnectors() > 0 || getDiscoveryGroupConfiguration() != null; } + @Override public ServerLocatorImpl addClusterTopologyListener(final ClusterTopologyListener listener) { topology.addClusterTopologyListener(listener); return this; } + @Override public void removeClusterTopologyListener(final ClusterTopologyListener listener) { topology.removeClusterTopologyListener(listener); } @@ -1799,6 +1896,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery } } + @Override public boolean isClosed() { synchronized (stateGuard) { return state != STATE.INITIALIZED; @@ -1835,6 +1933,7 @@ public final class ServerLocatorImpl implements ServerLocatorInternal, Discovery return; } AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { String[] arrayInterceptor = interceptorList.split(","); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorInternal.java index 0f945aa2bb..d7522b7b98 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorInternal.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ServerLocatorInternal.java @@ -81,6 +81,7 @@ public interface ServerLocatorInternal extends ServerLocator { ServerLocatorInternal setClusterTransportConfiguration(TransportConfiguration tc); + @Override Topology getTopology(); ClientProtocolManager newProtocolManager(); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java index 83c327e3df..35bfb5d861 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/Topology.java @@ -58,6 +58,7 @@ public final class Topology { private static final class DirectExecutor implements Executor { + @Override public void execute(final Runnable runnable) { runnable.run(); } @@ -246,6 +247,7 @@ public final class Topology { if (copy.size() > 0) { executor.execute(new Runnable() { + @Override public void run() { for (ClusterTopologyListener listener : copy) { if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { @@ -311,6 +313,7 @@ public final class Topology { final ArrayList copy = copyListeners(); executor.execute(new Runnable() { + @Override public void run() { for (ClusterTopologyListener listener : copy) { if (ActiveMQClientLogger.LOGGER.isTraceEnabled()) { @@ -335,6 +338,7 @@ public final class Topology { } executor.execute(new Runnable() { + @Override public void run() { int count = 0; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/TopologyMemberImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/TopologyMemberImpl.java index 10704c6793..1696efca61 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/TopologyMemberImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/TopologyMemberImpl.java @@ -99,6 +99,7 @@ public final class TopologyMemberImpl implements TopologyMember { return connector; } + @Override public boolean isMember(RemotingConnection connection) { TransportConfiguration connectorConfig = connection.getTransportConnection() != null ? connection.getTransportConnection().getConnectorConfig() : null; @@ -106,6 +107,7 @@ public final class TopologyMemberImpl implements TopologyMember { } + @Override public boolean isMember(TransportConfiguration configuration) { if (getConnector().getA() != null && getConnector().getA().isSameParams(configuration) || getConnector().getB() != null && getConnector().getB().isSameParams(configuration)) { return true; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java index 5e8fe77b70..4a91f65063 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/cluster/DiscoveryGroup.java @@ -95,6 +95,7 @@ public final class DiscoveryGroup implements ActiveMQComponent { this.notificationService = service; } + @Override public synchronized void start() throws Exception { if (started) { return; @@ -132,6 +133,7 @@ public final class DiscoveryGroup implements ActiveMQComponent { runnable.run(); } + @Override public void stop() { synchronized (this) { if (!started) { @@ -180,6 +182,7 @@ public final class DiscoveryGroup implements ActiveMQComponent { } } + @Override public boolean isStarted() { return started; } @@ -245,6 +248,7 @@ public final class DiscoveryGroup implements ActiveMQComponent { class DiscoveryRunnable implements Runnable { + @Override public void run() { byte[] data = null; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java index eae2de37f3..1d82beecdc 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java @@ -170,6 +170,7 @@ public abstract class MessageImpl implements MessageInternal { // Message implementation ---------------------------------------- + @Override public int getEncodeSize() { int headersPropsSize = getHeadersAndPropertiesEncodeSize(); @@ -180,6 +181,7 @@ public abstract class MessageImpl implements MessageInternal { return DataConstants.SIZE_INT + bodySize + DataConstants.SIZE_INT + headersPropsSize; } + @Override public int getHeadersAndPropertiesEncodeSize() { return DataConstants.SIZE_LONG + // Message ID DataConstants.SIZE_BYTE + // user id null? @@ -193,6 +195,7 @@ public abstract class MessageImpl implements MessageInternal { /* PropertySize and Properties */properties.getEncodeSize(); } + @Override public void encodeHeadersAndProperties(final ActiveMQBuffer buffer) { buffer.writeLong(messageID); buffer.writeNullableSimpleString(address); @@ -211,6 +214,7 @@ public abstract class MessageImpl implements MessageInternal { properties.encode(buffer); } + @Override public void decodeHeadersAndProperties(final ActiveMQBuffer buffer) { messageID = buffer.readLong(); address = buffer.readNullableSimpleString(); @@ -242,6 +246,7 @@ public abstract class MessageImpl implements MessageInternal { properties = msg.getTypedProperties(); } + @Override public ActiveMQBuffer getBodyBuffer() { if (bodyBuffer == null) { bodyBuffer = new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, buffer, this); @@ -250,12 +255,14 @@ public abstract class MessageImpl implements MessageInternal { return bodyBuffer; } + @Override public Message writeBodyBufferBytes(byte[] bytes) { getBodyBuffer().writeBytes(bytes); return this; } + @Override public Message writeBodyBufferString(String string) { getBodyBuffer().writeString(string); @@ -266,6 +273,7 @@ public abstract class MessageImpl implements MessageInternal { // no op on regular messages } + @Override public synchronized ActiveMQBuffer getBodyBufferCopy() { // Must copy buffer before sending it @@ -276,14 +284,17 @@ public abstract class MessageImpl implements MessageInternal { return new ResetLimitWrappedActiveMQBuffer(BODY_OFFSET, newBuffer, null); } + @Override public long getMessageID() { return messageID; } + @Override public UUID getUserID() { return userID; } + @Override public MessageImpl setUserID(final UUID userID) { this.userID = userID; return this; @@ -293,6 +304,7 @@ public abstract class MessageImpl implements MessageInternal { * this doesn't need to be synchronized as setAddress is protecting the buffer, * not the address */ + @Override public SimpleString getAddress() { return address; } @@ -302,6 +314,7 @@ public abstract class MessageImpl implements MessageInternal { * This synchronization can probably be removed since setAddress is always called from a single thread. * However I will keep it as it's harmless and it's been well tested */ + @Override public Message setAddress(final SimpleString address) { // This is protecting the buffer synchronized (this) { @@ -315,6 +328,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public byte getType() { return type; } @@ -323,10 +337,12 @@ public abstract class MessageImpl implements MessageInternal { this.type = type; } + @Override public boolean isDurable() { return durable; } + @Override public MessageImpl setDurable(final boolean durable) { if (this.durable != durable) { this.durable = durable; @@ -336,10 +352,12 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public long getExpiration() { return expiration; } + @Override public MessageImpl setExpiration(final long expiration) { if (this.expiration != expiration) { this.expiration = expiration; @@ -349,10 +367,12 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public long getTimestamp() { return timestamp; } + @Override public MessageImpl setTimestamp(final long timestamp) { if (this.timestamp != timestamp) { this.timestamp = timestamp; @@ -362,10 +382,12 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public byte getPriority() { return priority; } + @Override public MessageImpl setPriority(final byte priority) { if (this.priority != priority) { this.priority = priority; @@ -375,6 +397,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public boolean isExpired() { if (expiration == 0) { return false; @@ -383,6 +406,7 @@ public abstract class MessageImpl implements MessageInternal { return System.currentTimeMillis() - expiration >= 0; } + @Override public Map toMap() { Map map = new HashMap(); @@ -402,12 +426,14 @@ public abstract class MessageImpl implements MessageInternal { return map; } + @Override public void decodeFromBuffer(final ActiveMQBuffer buffer) { this.buffer = buffer; decode(); } + @Override public void bodyChanged() { // If the body is changed we must copy the buffer otherwise can affect the previously sent message // which might be in the Netty write queue @@ -418,6 +444,7 @@ public abstract class MessageImpl implements MessageInternal { endOfBodyPosition = -1; } + @Override public synchronized void checkCopy() { if (!copied) { forceCopy(); @@ -426,14 +453,17 @@ public abstract class MessageImpl implements MessageInternal { } } + @Override public synchronized void resetCopied() { copied = false; } + @Override public int getEndOfMessagePosition() { return endOfMessagePosition; } + @Override public int getEndOfBodyPosition() { if (endOfBodyPosition < 0) { endOfBodyPosition = buffer.writerIndex(); @@ -467,6 +497,7 @@ public abstract class MessageImpl implements MessageInternal { buff.readerIndex(start + length); } + @Override public synchronized ActiveMQBuffer getEncodedBuffer() { ActiveMQBuffer buff = encodeToBuffer(); @@ -486,6 +517,7 @@ public abstract class MessageImpl implements MessageInternal { } } + @Override public void setAddressTransient(final SimpleString address) { this.address = address; } @@ -493,6 +525,7 @@ public abstract class MessageImpl implements MessageInternal { // Properties // --------------------------------------------------------------------------------------- + @Override public Message putBooleanProperty(final SimpleString key, final boolean value) { properties.putBooleanProperty(key, value); @@ -501,6 +534,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putByteProperty(final SimpleString key, final byte value) { properties.putByteProperty(key, value); @@ -509,6 +543,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putBytesProperty(final SimpleString key, final byte[] value) { properties.putBytesProperty(key, value); @@ -533,6 +568,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putShortProperty(final SimpleString key, final short value) { properties.putShortProperty(key, value); bufferValid = false; @@ -540,6 +576,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putIntProperty(final SimpleString key, final int value) { properties.putIntProperty(key, value); bufferValid = false; @@ -547,6 +584,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putLongProperty(final SimpleString key, final long value) { properties.putLongProperty(key, value); bufferValid = false; @@ -554,6 +592,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putFloatProperty(final SimpleString key, final float value) { properties.putFloatProperty(key, value); @@ -562,6 +601,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putDoubleProperty(final SimpleString key, final double value) { properties.putDoubleProperty(key, value); @@ -570,6 +610,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putStringProperty(final SimpleString key, final SimpleString value) { properties.putSimpleStringProperty(key, value); @@ -578,6 +619,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putObjectProperty(final SimpleString key, final Object value) throws ActiveMQPropertyConversionException { TypedProperties.setObjectProperty(key, value, properties); @@ -586,6 +628,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putObjectProperty(final String key, final Object value) throws ActiveMQPropertyConversionException { putObjectProperty(new SimpleString(key), value); @@ -594,6 +637,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putBooleanProperty(final String key, final boolean value) { properties.putBooleanProperty(new SimpleString(key), value); @@ -602,6 +646,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putByteProperty(final String key, final byte value) { properties.putByteProperty(new SimpleString(key), value); @@ -610,6 +655,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putBytesProperty(final String key, final byte[] value) { properties.putBytesProperty(new SimpleString(key), value); @@ -618,6 +664,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putShortProperty(final String key, final short value) { properties.putShortProperty(new SimpleString(key), value); @@ -626,6 +673,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putIntProperty(final String key, final int value) { properties.putIntProperty(new SimpleString(key), value); @@ -634,6 +682,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putLongProperty(final String key, final long value) { properties.putLongProperty(new SimpleString(key), value); @@ -642,6 +691,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putFloatProperty(final String key, final float value) { properties.putFloatProperty(new SimpleString(key), value); @@ -650,6 +700,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putDoubleProperty(final String key, final double value) { properties.putDoubleProperty(new SimpleString(key), value); @@ -658,6 +709,7 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Message putStringProperty(final String key, final String value) { properties.putSimpleStringProperty(new SimpleString(key), SimpleString.toSimpleString(value)); @@ -674,74 +726,92 @@ public abstract class MessageImpl implements MessageInternal { return this; } + @Override public Object getObjectProperty(final SimpleString key) { return properties.getProperty(key); } + @Override public Boolean getBooleanProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getBooleanProperty(key); } + @Override public Boolean getBooleanProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getBooleanProperty(new SimpleString(key)); } + @Override public Byte getByteProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getByteProperty(key); } + @Override public Byte getByteProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getByteProperty(new SimpleString(key)); } + @Override public byte[] getBytesProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getBytesProperty(key); } + @Override public byte[] getBytesProperty(final String key) throws ActiveMQPropertyConversionException { return getBytesProperty(new SimpleString(key)); } + @Override public Double getDoubleProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getDoubleProperty(key); } + @Override public Double getDoubleProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getDoubleProperty(new SimpleString(key)); } + @Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getIntProperty(key); } + @Override public Integer getIntProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getIntProperty(new SimpleString(key)); } + @Override public Long getLongProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getLongProperty(key); } + @Override public Long getLongProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getLongProperty(new SimpleString(key)); } + @Override public Short getShortProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getShortProperty(key); } + @Override public Short getShortProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getShortProperty(new SimpleString(key)); } + @Override public Float getFloatProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getFloatProperty(key); } + @Override public Float getFloatProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getFloatProperty(new SimpleString(key)); } + @Override public String getStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { SimpleString str = getSimpleStringProperty(key); @@ -753,54 +823,66 @@ public abstract class MessageImpl implements MessageInternal { } } + @Override public String getStringProperty(final String key) throws ActiveMQPropertyConversionException { return getStringProperty(new SimpleString(key)); } + @Override public SimpleString getSimpleStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { return properties.getSimpleStringProperty(key); } + @Override public SimpleString getSimpleStringProperty(final String key) throws ActiveMQPropertyConversionException { return properties.getSimpleStringProperty(new SimpleString(key)); } + @Override public Object getObjectProperty(final String key) { return properties.getProperty(new SimpleString(key)); } + @Override public Object removeProperty(final SimpleString key) { bufferValid = false; return properties.removeProperty(key); } + @Override public Object removeProperty(final String key) { bufferValid = false; return properties.removeProperty(new SimpleString(key)); } + @Override public boolean containsProperty(final SimpleString key) { return properties.containsProperty(key); } + @Override public boolean containsProperty(final String key) { return properties.containsProperty(new SimpleString(key)); } + @Override public Set getPropertyNames() { return properties.getPropertyNames(); } + @Override public ActiveMQBuffer getWholeBuffer() { return buffer; } + @Override public BodyEncoder getBodyEncoder() throws ActiveMQException { return new DecodingContext(); } + @Override public TypedProperties getTypedProperties() { return this.properties; } @@ -956,21 +1038,26 @@ public abstract class MessageImpl implements MessageInternal { public DecodingContext() { } + @Override public void open() { } + @Override public void close() { } + @Override public long getLargeBodySize() { return buffer.writerIndex(); } + @Override public int encode(final ByteBuffer bufferRead) throws ActiveMQException { ActiveMQBuffer buffer = ActiveMQBuffers.wrappedBuffer(bufferRead); return encode(buffer, bufferRead.capacity()); } + @Override public int encode(final ActiveMQBuffer bufferOut, final int size) { bufferOut.writeBytes(getWholeBuffer(), lastPos, size); lastPos += size; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java index b45fd5a133..0dbda12dd8 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManager.java @@ -109,14 +109,17 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { public ActiveMQClientProtocolManager() { } + @Override public String getName() { return ActiveMQClient.DEFAULT_CORE_PROTOCOL; } + @Override public void setSessionFactory(ClientSessionFactory factory) { this.factoryInternal = (ClientSessionFactoryInternal) factory; } + @Override public ClientSessionFactory getSessionFactory() { return this.factoryInternal; } @@ -126,6 +129,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { pipeline.addLast("activemq-decoder", new ActiveMQFrameDecoder2()); } + @Override public boolean waitOnLatch(long milliseconds) throws InterruptedException { return waitLatch.await(milliseconds, TimeUnit.MILLISECONDS); } @@ -139,6 +143,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { } } + @Override public RemotingConnection getCurrentConnection() { return connection; } @@ -152,6 +157,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { } } + @Override public Lock lockSessionCreation() { try { Lock localFailoverLock = factoryInternal.lockFailover(); @@ -179,6 +185,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { } } + @Override public void stop() { alive = false; @@ -196,6 +203,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { } + @Override public boolean isAlive() { return alive; } @@ -351,6 +359,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { return new ActiveMQSessionContext(name, connection, sessionChannel, response.getServerVersion(), confirmationWindowSize); } + @Override public boolean cleanupBeforeFailover(ActiveMQException cause) { boolean needToInterrupt; @@ -401,6 +410,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { return message.isOkToFailover(); } + @Override public RemotingConnection connect(Connection transportConnection, long callTimeout, long callFailoverTimeout, @@ -435,6 +445,7 @@ public class ActiveMQClientProtocolManager implements ClientProtocolManager { this.conn = conn; } + @Override public void handlePacket(final Packet packet) { final byte type = packet.getType(); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java index 24727c9d09..5675fff7d5 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQClientProtocolManagerFactory.java @@ -45,6 +45,7 @@ public class ActiveMQClientProtocolManagerFactory implements ClientProtocolManag return factory; } + @Override public ClientProtocolManager newProtocolManager() { return new ActiveMQClientProtocolManager(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java index 1bac65358e..05ae4741af 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java @@ -122,6 +122,7 @@ public class ActiveMQSessionContext extends SessionContext { return name; } + @Override public void resetName(String name) { this.name = name; } @@ -153,6 +154,7 @@ public class ActiveMQSessionContext extends SessionContext { } private final CommandConfirmationHandler confirmationHandler = new CommandConfirmationHandler() { + @Override public void commandConfirmed(final Packet packet) { if (packet.getType() == PacketImpl.SESS_SEND) { SessionSendMessage ssm = (SessionSendMessage) packet; @@ -195,6 +197,7 @@ public class ActiveMQSessionContext extends SessionContext { sessionChannel.unlock(); } + @Override public void cleanup() { sessionChannel.close(); @@ -208,11 +211,13 @@ public class ActiveMQSessionContext extends SessionContext { // nothing to be done here... Flow control here is done on the core side } + @Override public void setSendAcknowledgementHandler(final SendAcknowledgementHandler handler) { sessionChannel.setCommandConfirmationHandler(confirmationHandler); this.sendAckHandler = handler; } + @Override public void createSharedQueue(SimpleString address, SimpleString queueName, SimpleString filterString, @@ -220,10 +225,12 @@ public class ActiveMQSessionContext extends SessionContext { sessionChannel.sendBlocking(new CreateSharedQueueMessage(address, queueName, filterString, durable, true), PacketImpl.NULL_RESPONSE); } + @Override public void deleteQueue(final SimpleString queueName) throws ActiveMQException { sessionChannel.sendBlocking(new SessionDeleteQueueMessage(queueName), PacketImpl.NULL_RESPONSE); } + @Override public ClientSession.QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { SessionQueueQueryMessage request = new SessionQueueQueryMessage(queueName); SessionQueueQueryResponseMessage_V2 response = (SessionQueueQueryResponseMessage_V2) sessionChannel.sendBlocking(request, PacketImpl.SESS_QUEUEQUERY_RESP_V2); @@ -231,6 +238,7 @@ public class ActiveMQSessionContext extends SessionContext { return response.toQueueQuery(); } + @Override public ClientConsumerInternal createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, @@ -254,10 +262,12 @@ public class ActiveMQSessionContext extends SessionContext { return new ClientConsumerImpl(session, consumerContext, queueName, filterString, browseOnly, calcWindowSize(windowSize), ackBatchSize, maxRate > 0 ? new TokenBucketLimiterImpl(maxRate, false) : null, executor, flowControlExecutor, this, queueInfo.toQueueQuery(), lookupTCCL()); } + @Override public int getServerVersion() { return serverVersion; } + @Override public ClientSession.AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { SessionBindingQueryResponseMessage_V2 response = (SessionBindingQueryResponseMessage_V2) sessionChannel.sendBlocking(new SessionBindingQueryMessage(address), PacketImpl.SESS_BINDINGQUERY_RESP_V2); @@ -269,39 +279,48 @@ public class ActiveMQSessionContext extends SessionContext { sessionChannel.sendBlocking(new SessionConsumerCloseMessage(getConsumerID(consumer)), PacketImpl.NULL_RESPONSE); } + @Override public void sendConsumerCredits(final ClientConsumer consumer, final int credits) { sessionChannel.send(new SessionConsumerFlowCreditMessage(getConsumerID(consumer), credits)); } + @Override public void forceDelivery(final ClientConsumer consumer, final long sequence) throws ActiveMQException { SessionForceConsumerDelivery request = new SessionForceConsumerDelivery(getConsumerID(consumer), sequence); sessionChannel.send(request); } + @Override public void simpleCommit() throws ActiveMQException { sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_COMMIT), PacketImpl.NULL_RESPONSE); } + @Override public void simpleRollback(boolean lastMessageAsDelivered) throws ActiveMQException { sessionChannel.sendBlocking(new RollbackMessage(lastMessageAsDelivered), PacketImpl.NULL_RESPONSE); } + @Override public void sessionStart() throws ActiveMQException { sessionChannel.send(new PacketImpl(PacketImpl.SESS_START)); } + @Override public void sessionStop() throws ActiveMQException { sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_STOP), PacketImpl.NULL_RESPONSE); } + @Override public void addSessionMetadata(String key, String data) throws ActiveMQException { sessionChannel.sendBlocking(new SessionAddMetaDataMessageV2(key, data), PacketImpl.NULL_RESPONSE); } + @Override public void addUniqueMetaData(String key, String data) throws ActiveMQException { sessionChannel.sendBlocking(new SessionUniqueAddMetaDataMessage(key, data), PacketImpl.NULL_RESPONSE); } + @Override public void xaCommit(Xid xid, boolean onePhase) throws XAException, ActiveMQException { SessionXACommitMessage packet = new SessionXACommitMessage(xid, onePhase); SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(packet, PacketImpl.SESS_XA_RESP); @@ -315,6 +334,7 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public void xaEnd(Xid xid, int flags) throws XAException, ActiveMQException { Packet packet; if (flags == XAResource.TMSUSPEND) { @@ -337,6 +357,7 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public void sendProducerCreditsMessage(final int credits, final SimpleString address) { sessionChannel.send(new SessionRequestProducerCreditsMessage(credits, address)); } @@ -346,6 +367,7 @@ public class ActiveMQSessionContext extends SessionContext { * * @return */ + @Override public boolean supportsLargeMessage() { return true; } @@ -355,6 +377,7 @@ public class ActiveMQSessionContext extends SessionContext { return msgI.getEncodeSize(); } + @Override public void sendFullMessage(MessageInternal msgI, boolean sendBlocking, SendAcknowledgementHandler handler, @@ -399,6 +422,7 @@ public class ActiveMQSessionContext extends SessionContext { return chunkPacket.getPacketSize(); } + @Override public void sendACK(boolean individual, boolean block, final ClientConsumer consumer, @@ -419,16 +443,19 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public void expireMessage(final ClientConsumer consumer, Message message) throws ActiveMQException { SessionExpireMessage messagePacket = new SessionExpireMessage(getConsumerID(consumer), message.getMessageID()); sessionChannel.send(messagePacket); } + @Override public void sessionClose() throws ActiveMQException { sessionChannel.sendBlocking(new SessionCloseMessage(), PacketImpl.NULL_RESPONSE); } + @Override public void xaForget(Xid xid) throws XAException, ActiveMQException { SessionXAResponseMessage response = (SessionXAResponseMessage) sessionChannel.sendBlocking(new SessionXAForgetMessage(xid), PacketImpl.SESS_XA_RESP); @@ -437,6 +464,7 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public int xaPrepare(Xid xid) throws XAException, ActiveMQException { SessionXAPrepareMessage packet = new SessionXAPrepareMessage(xid); @@ -450,6 +478,7 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public Xid[] xaScan() throws ActiveMQException { SessionXAGetInDoubtXidsResponseMessage response = (SessionXAGetInDoubtXidsResponseMessage) sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_XA_INDOUBT_XIDS), PacketImpl.SESS_XA_INDOUBT_XIDS_RESP); @@ -460,6 +489,7 @@ public class ActiveMQSessionContext extends SessionContext { return xidArray; } + @Override public void xaRollback(Xid xid, boolean wasStarted) throws ActiveMQException, XAException { SessionXARollbackMessage packet = new SessionXARollbackMessage(xid); @@ -470,6 +500,7 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public void xaStart(Xid xid, int flags) throws XAException, ActiveMQException { Packet packet; if (flags == XAResource.TMJOIN) { @@ -494,18 +525,21 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public boolean configureTransactionTimeout(int seconds) throws ActiveMQException { SessionXASetTimeoutResponseMessage response = (SessionXASetTimeoutResponseMessage) sessionChannel.sendBlocking(new SessionXASetTimeoutMessage(seconds), PacketImpl.SESS_XA_SET_TIMEOUT_RESP); return response.isOK(); } + @Override public int recoverSessionTimeout() throws ActiveMQException { SessionXAGetTimeoutResponseMessage response = (SessionXAGetTimeoutResponseMessage) sessionChannel.sendBlocking(new PacketImpl(PacketImpl.SESS_XA_GET_TIMEOUT), PacketImpl.SESS_XA_GET_TIMEOUT_RESP); return response.getTimeoutSeconds(); } + @Override public void createQueue(SimpleString address, SimpleString queueName, SimpleString filterString, @@ -546,6 +580,7 @@ public class ActiveMQSessionContext extends SessionContext { } + @Override public void recreateSession(final String username, final String password, final int minLargeMessageSize, @@ -624,10 +659,12 @@ public class ActiveMQSessionContext extends SessionContext { } } + @Override public void xaFailed(Xid xid) throws ActiveMQException { sendPacketWithoutLock(sessionChannel, new SessionXAAfterFailedMessage(xid)); } + @Override public void restartSession() throws ActiveMQException { sendPacketWithoutLock(sessionChannel, new PacketImpl(PacketImpl.SESS_START)); } @@ -693,6 +730,7 @@ public class ActiveMQSessionContext extends SessionContext { class ClientSessionPacketHandler implements ChannelHandler { + @Override public void handlePacket(final Packet packet) { byte type = packet.getType(); @@ -755,6 +793,7 @@ public class ActiveMQSessionContext extends SessionContext { protected ClassLoader lookupTCCL() { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public ClassLoader run() { return Thread.currentThread().getContextClassLoader(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java index 57ed1e8474..b152156987 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java @@ -139,6 +139,7 @@ public final class ChannelImpl implements Channel { this.interceptors = interceptors; } + @Override public boolean supports(final byte packetType) { int version = connection.getClientVersion(); @@ -160,26 +161,32 @@ public final class ChannelImpl implements Channel { } } + @Override public long getID() { return id; } + @Override public int getLastConfirmedCommandID() { return lastConfirmedCommandID.get(); } + @Override public Lock getLock() { return lock; } + @Override public int getConfirmationWindowSize() { return confWindowSize; } + @Override public void returnBlocking() { returnBlocking(null); } + @Override public void returnBlocking(Throwable cause) { lock.lock(); @@ -193,18 +200,22 @@ public final class ChannelImpl implements Channel { } } + @Override public boolean sendAndFlush(final Packet packet) { return send(packet, true, false); } + @Override public boolean send(final Packet packet) { return send(packet, false, false); } + @Override public boolean sendBatched(final Packet packet) { return send(packet, false, true); } + @Override public void setTransferring(boolean transferring) { this.transferring = transferring; } @@ -273,6 +284,7 @@ public final class ChannelImpl implements Channel { * and the client could eventually retry another call, but the server could then answer a previous command issuing a class-cast-exception. * The expectedPacket will be used to filter out undesirable packets that would belong to previous calls. */ + @Override public Packet sendBlocking(final Packet packet, byte expectedPacket) throws ActiveMQException { String interceptionResult = invokeInterceptors(packet, interceptors, connection); @@ -408,6 +420,7 @@ public final class ChannelImpl implements Channel { return null; } + @Override public void setCommandConfirmationHandler(final CommandConfirmationHandler handler) { if (confWindowSize < 0) { final String msg = "You can't set confirmationHandler on a connection with confirmation-window-size < 0." + " Look at the documentation for more information."; @@ -416,14 +429,17 @@ public final class ChannelImpl implements Channel { commandConfirmationHandler = handler; } + @Override public void setHandler(final ChannelHandler handler) { this.handler = handler; } + @Override public ChannelHandler getHandler() { return handler; } + @Override public void close() { if (closed) { return; @@ -439,6 +455,7 @@ public final class ChannelImpl implements Channel { closed = true; } + @Override public void transferConnection(final CoreRemotingConnection newConnection) { // Needs to synchronize on the connection to make sure no packets from // the old connection get processed after transfer has occurred @@ -457,6 +474,7 @@ public final class ChannelImpl implements Channel { } } + @Override public void replayCommands(final int otherLastConfirmedCommandID) { if (resendCache != null) { if (isTrace) { @@ -470,6 +488,7 @@ public final class ChannelImpl implements Channel { } } + @Override public void lock() { lock.lock(); @@ -478,6 +497,7 @@ public final class ChannelImpl implements Channel { lock.unlock(); } + @Override public void unlock() { lock.lock(); @@ -488,11 +508,13 @@ public final class ChannelImpl implements Channel { lock.unlock(); } + @Override public CoreRemotingConnection getConnection() { return connection; } // Needs to be synchronized since can be called by remoting service timer thread too for timeout flush + @Override public synchronized void flushConfirmations() { if (resendCache != null && receivedBytes != 0) { receivedBytes = 0; @@ -505,6 +527,7 @@ public final class ChannelImpl implements Channel { } } + @Override public void confirm(final Packet packet) { if (resendCache != null && packet.isRequiresConfirmations()) { lastConfirmedCommandID.incrementAndGet(); @@ -523,6 +546,7 @@ public final class ChannelImpl implements Channel { } } + @Override public void clearCommands() { if (resendCache != null) { lastConfirmedCommandID.set(-1); @@ -533,6 +557,7 @@ public final class ChannelImpl implements Channel { } } + @Override public void handlePacket(final Packet packet) { if (packet.getType() == PacketImpl.PACKETS_CONFIRMED) { if (resendCache != null) { diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java index fffdec175c..9aa8d3c69e 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/PacketImpl.java @@ -253,18 +253,22 @@ public class PacketImpl implements Packet { // Public -------------------------------------------------------- + @Override public byte getType() { return type; } + @Override public long getChannelID() { return channelID; } + @Override public void setChannelID(final long channelID) { this.channelID = channelID; } + @Override public ActiveMQBuffer encode(final RemotingConnection connection) { ActiveMQBuffer buffer = connection.createTransportBuffer(PacketImpl.INITIAL_PACKET_SIZE); @@ -286,6 +290,7 @@ public class PacketImpl implements Packet { return buffer; } + @Override public void decode(final ActiveMQBuffer buffer) { channelID = buffer.readLong(); @@ -294,6 +299,7 @@ public class PacketImpl implements Packet { size = buffer.readerIndex(); } + @Override public int getPacketSize() { if (size == -1) { throw new IllegalStateException("Packet hasn't been encoded/decoded yet"); @@ -302,6 +308,7 @@ public class PacketImpl implements Packet { return size; } + @Override public boolean isResponse() { return false; } @@ -312,6 +319,7 @@ public class PacketImpl implements Packet { public void decodeRest(final ActiveMQBuffer buffer) { } + @Override public boolean isRequiresConfirmations() { return true; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java index 68687136b5..a19c3f325d 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/RemotingConnectionImpl.java @@ -151,6 +151,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement /** * @return the clientVersion */ + @Override public int getClientVersion() { return clientVersion; } @@ -158,10 +159,12 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement /** * @param clientVersion the clientVersion to set */ + @Override public void setClientVersion(int clientVersion) { this.clientVersion = clientVersion; } + @Override public synchronized Channel getChannel(final long channelID, final int confWindowSize) { Channel channel = channels.get(channelID); @@ -174,14 +177,17 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement return channel; } + @Override public synchronized boolean removeChannel(final long channelID) { return channels.remove(channelID) != null; } + @Override public synchronized void putChannel(final long channelID, final Channel channel) { channels.put(channelID, channel); } + @Override public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { synchronized (failLock) { if (destroyed) { @@ -212,6 +218,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } } + @Override public void destroy() { synchronized (failLock) { if (destroyed) { @@ -226,10 +233,12 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement callClosingListeners(); } + @Override public void disconnect(final boolean criticalError) { disconnect(null, criticalError); } + @Override public void disconnect(String scaleDownNodeID, final boolean criticalError) { Channel channel0 = getChannel(ChannelImpl.CHANNEL_ID.PING.id, -1); @@ -266,10 +275,12 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement channel0.sendAndFlush(disconnect); } + @Override public long generateChannelID() { return idGenerator.generateID(); } + @Override public synchronized void syncIDGeneratorSequence(final long id) { if (!idGeneratorSynced) { idGenerator = new SimpleIDGenerator(id); @@ -278,22 +289,27 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } } + @Override public long getIDGeneratorSequence() { return idGenerator.getCurrentID(); } + @Override public Object getTransferLock() { return transferLock; } + @Override public boolean isClient() { return client; } + @Override public boolean isDestroyed() { return destroyed; } + @Override public long getBlockingCallTimeout() { return blockingCallTimeout; } @@ -305,6 +321,7 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement //We flush any confirmations on the connection - this prevents idle bridges for example //sitting there with many unacked messages + @Override public void flush() { synchronized (transferLock) { for (Channel channel : channels.values()) { @@ -313,12 +330,14 @@ public class RemotingConnectionImpl extends AbstractRemotingConnection implement } } + @Override public ActiveMQPrincipal getDefaultActiveMQPrincipal() { return getTransportConnection().getDefaultActiveMQPrincipal(); } // Buffer Handler implementation // ---------------------------------------------------- + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { try { final Packet packet = packetDecoder.decode(buffer); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/MessagePacket.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/MessagePacket.java index 160e9bc6a8..75bc879088 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/MessagePacket.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/MessagePacket.java @@ -30,10 +30,12 @@ public abstract class MessagePacket extends PacketImpl implements MessagePacketI this.message = message; } + @Override public Message getMessage() { return message; } + @Override public String toString() { return this.getParentString() + ",message=" + message + "]"; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V2.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V2.java index c98ac0a073..8c1b153273 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V2.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionQueueQueryResponseMessage_V2.java @@ -88,6 +88,7 @@ public class SessionQueueQueryResponseMessage_V2 extends SessionQueueQueryRespon return result; } + @Override public ClientSession.QueueQuery toQueueQuery() { return new QueueQueryImpl(isDurable(), isTemporary(), getConsumerCount(), getMessageCount(), getFilterString(), getAddress(), getName(), isExists(), isAutoCreationEnabled()); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java index 244e138de7..60b8336521 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/TransportConfigurationUtil.java @@ -63,6 +63,7 @@ public class TransportConfigurationUtil { private static Object instantiateObject(final String className) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { try { return ClassloadingUtil.newInstanceFromClassLoader(className); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java index e55fe97b2d..2c1f1c8f00 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java @@ -96,6 +96,7 @@ public class NettyConnection implements Connection { } // Connection implementation ---------------------------- + @Override public void forceClose() { if (channel != null) { try { @@ -116,14 +117,17 @@ public class NettyConnection implements Connection { return channel; } + @Override public RemotingConnection getProtocolConnection() { return protocolConnection; } + @Override public void setProtocolConnection(RemotingConnection protocolConnection) { this.protocolConnection = protocolConnection; } + @Override public void close() { if (closed) { return; @@ -150,16 +154,19 @@ public class NettyConnection implements Connection { listener.connectionDestroyed(getID()); } + @Override public ActiveMQBuffer createTransportBuffer(final int size) { return new ChannelBufferWrapper(PartialPooledByteBufAllocator.INSTANCE.directBuffer(size), true); } + @Override public Object getID() { // TODO: Think of it return channel.hashCode(); } // This is called periodically to flush the batch buffer + @Override public void checkFlushBatchBuffer() { if (!batchingEnabled) { return; @@ -179,14 +186,17 @@ public class NettyConnection implements Connection { } } + @Override public void write(final ActiveMQBuffer buffer) { write(buffer, false, false); } + @Override public void write(ActiveMQBuffer buffer, final boolean flush, final boolean batched) { write(buffer, flush, batched, null); } + @Override public void write(ActiveMQBuffer buffer, final boolean flush, final boolean batched, @@ -291,6 +301,7 @@ public class NettyConnection implements Connection { } } + @Override public String getRemoteAddress() { SocketAddress address = channel.remoteAddress(); if (address == null) { @@ -299,6 +310,7 @@ public class NettyConnection implements Connection { return address.toString(); } + @Override public String getLocalAddress() { SocketAddress address = channel.localAddress(); if (address == null) { @@ -311,15 +323,18 @@ public class NettyConnection implements Connection { return directDeliver; } + @Override public void addReadyListener(final ReadyListener listener) { readyListeners.add(listener); } + @Override public void removeReadyListener(final ReadyListener listener) { readyListeners.remove(listener); } //never allow this + @Override public ActiveMQPrincipal getDefaultActiveMQPrincipal() { return null; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java index decac8953e..60d913ce6c 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java @@ -346,6 +346,7 @@ public class NettyConnector extends AbstractConnector { "]"; } + @Override public synchronized void start() { if (channelClazz != null) { return; @@ -454,6 +455,7 @@ public class NettyConnector extends AbstractConnector { } bootstrap.handler(new ChannelInitializer() { + @Override public void initChannel(Channel channel) throws Exception { final ChannelPipeline pipeline = channel.pipeline(); if (sslEnabled && !useServlet) { @@ -528,6 +530,7 @@ public class NettyConnector extends AbstractConnector { ActiveMQClientLogger.LOGGER.debug("Started Netty Connector version " + TransportConstants.NETTY_VERSION); } + @Override public synchronized void close() { if (channelClazz == null) { return; @@ -559,10 +562,12 @@ public class NettyConnector extends AbstractConnector { connections.clear(); } + @Override public boolean isStarted() { return channelClazz != null; } + @Override public Connection createConnection() { if (channelClazz == null) { return null; @@ -866,6 +871,7 @@ public class NettyConnector extends AbstractConnector { private java.util.concurrent.Future future; + @Override public synchronized void run() { if (closed) { return; @@ -895,6 +901,7 @@ public class NettyConnector extends AbstractConnector { private class Listener implements ConnectionLifeCycleListener { + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { @@ -903,10 +910,12 @@ public class NettyConnector extends AbstractConnector { } } + @Override public void connectionDestroyed(final Object connectionID) { if (connections.remove(connectionID) != null) { // Execute on different thread to avoid deadlocks closeExecutor.execute(new Runnable() { + @Override public void run() { listener.connectionDestroyed(connectionID); } @@ -914,15 +923,18 @@ public class NettyConnector extends AbstractConnector { } } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { // Execute on different thread to avoid deadlocks closeExecutor.execute(new Runnable() { + @Override public void run() { listener.connectionException(connectionID, me); } }); } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { listener.connectionReadyForWrites(connectionID, ready); } @@ -933,6 +945,7 @@ public class NettyConnector extends AbstractConnector { private boolean cancelled; + @Override public synchronized void run() { if (!cancelled) { for (Connection connection : connections.values()) { @@ -946,6 +959,7 @@ public class NettyConnector extends AbstractConnector { } } + @Override public boolean isEquivalent(Map configuration) { //here we only check host and port because these two parameters //is sufficient to determine the target host @@ -976,6 +990,7 @@ public class NettyConnector extends AbstractConnector { return result; } + @Override public void finalize() throws Throwable { close(); super.finalize(); @@ -992,6 +1007,7 @@ public class NettyConnector extends AbstractConnector { private static ClassLoader getThisClassLoader() { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public ClassLoader run() { return ClientSessionFactoryImpl.class.getClassLoader(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java index 99c6a560bf..a7c5f0e334 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnectorFactory.java @@ -28,6 +28,7 @@ import org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory; public class NettyConnectorFactory implements ConnectorFactory { + @Override public Connector createConnector(final Map configuration, final BufferHandler handler, final ConnectionLifeCycleListener listener, diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java index 3593294716..092b1c7fb7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/ssl/SSLSupport.java @@ -162,6 +162,7 @@ public class SSLSupport { */ private static URL findResource(final String resourceName) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public URL run() { return ClassloadingUtil.findResource(resourceName); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java index f29bf32c4f..324797a4de 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/transaction/impl/XidImpl.java @@ -91,14 +91,17 @@ public class XidImpl implements Xid, Serializable { // Xid implementation ------------------------------------------------------------------ + @Override public byte[] getBranchQualifier() { return branchQualifier; } + @Override public int getFormatId() { return formatId; } + @Override public byte[] getGlobalTransactionId() { return globalTransactionId; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/version/impl/VersionImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/version/impl/VersionImpl.java index 0394a11df3..c8437e1b2d 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/version/impl/VersionImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/version/impl/VersionImpl.java @@ -60,30 +60,37 @@ public class VersionImpl implements Version, Serializable { // Version implementation ------------------------------------------ + @Override public String getFullVersion() { return versionName; } + @Override public String getVersionName() { return versionName; } + @Override public int getMajorVersion() { return majorVersion; } + @Override public int getMinorVersion() { return minorVersion; } + @Override public int getMicroVersion() { return microVersion; } + @Override public int getIncrementingVersion() { return incrementingVersion; } + @Override public boolean isCompatible(int version) { for (int element : compatibleVersionList) { if (element == version) { diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java index 453a87cb72..7670740e57 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java @@ -45,6 +45,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { this.creationTime = System.currentTimeMillis(); } + @Override public List getFailureListeners() { return new ArrayList(failureListeners); } @@ -85,20 +86,24 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { } } + @Override public void setFailureListeners(final List listeners) { failureListeners.clear(); failureListeners.addAll(listeners); } + @Override public Object getID() { return transportConnection.getID(); } + @Override public String getRemoteAddress() { return transportConnection.getRemoteAddress(); } + @Override public void addFailureListener(final FailureListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); @@ -106,6 +111,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { failureListeners.add(listener); } + @Override public boolean removeFailureListener(final FailureListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); @@ -114,6 +120,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return failureListeners.remove(listener); } + @Override public void addCloseListener(final CloseListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); @@ -122,6 +129,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { closeListeners.add(listener); } + @Override public boolean removeCloseListener(final CloseListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); @@ -130,6 +138,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return closeListeners.remove(listener); } + @Override public List removeCloseListeners() { List ret = new ArrayList(closeListeners); @@ -138,6 +147,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return ret; } + @Override public List removeFailureListeners() { List ret = getFailureListeners(); @@ -146,24 +156,29 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return ret; } + @Override public void setCloseListeners(List listeners) { closeListeners.clear(); closeListeners.addAll(listeners); } + @Override public ActiveMQBuffer createTransportBuffer(final int size) { return transportConnection.createTransportBuffer(size); } + @Override public Connection getTransportConnection() { return transportConnection; } + @Override public long getCreationTime() { return creationTime; } + @Override public boolean checkDataReceived() { boolean res = dataReceived; @@ -175,10 +190,12 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { /* * This can be called concurrently by more than one thread so needs to be locked */ + @Override public void fail(final ActiveMQException me) { fail(me, null); } + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { dataReceived = true; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java index b3911615cb..c7284df8b0 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java @@ -42,6 +42,7 @@ public class FutureLatch implements Runnable { } } + @Override public void run() { latch.countDown(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java index 3bc34b69c6..db98281310 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java @@ -46,6 +46,7 @@ public class InflaterReader extends InputStream { this.pointer = -1; } + @Override public int read() throws IOException { if (pointer == -1) { try { diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java index 5d8fa5753f..e455db8464 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java @@ -46,6 +46,7 @@ public class LinkedListImpl implements LinkedList { iters = createIteratorArray(INITIAL_ITERATOR_ARRAY_SIZE); } + @Override public void addHead(E e) { Node node = new Node(e); @@ -66,6 +67,7 @@ public class LinkedListImpl implements LinkedList { size++; } + @Override public void addTail(E e) { if (size == 0) { addHead(e); @@ -83,6 +85,7 @@ public class LinkedListImpl implements LinkedList { } } + @Override public E poll() { Node ret = head.next; @@ -96,20 +99,24 @@ public class LinkedListImpl implements LinkedList { } } + @Override public void clear() { tail = head.next = null; size = 0; } + @Override public int size() { return size; } + @Override public LinkedListIterator iterator() { return new Iterator(); } + @Override public String toString() { StringBuilder str = new StringBuilder("LinkedListImpl [ "); @@ -227,6 +234,7 @@ public class LinkedListImpl implements LinkedList { val = e; } + @Override public String toString() { return "Node, value = " + val; } @@ -248,10 +256,12 @@ public class LinkedListImpl implements LinkedList { addIter(this); } + @Override public void repeat() { repeat = true; } + @Override public boolean hasNext() { Node e = getNode(); @@ -262,6 +272,7 @@ public class LinkedListImpl implements LinkedList { return canAdvance(); } + @Override public E next() { Node e = getNode(); @@ -303,6 +314,7 @@ public class LinkedListImpl implements LinkedList { return e.val; } + @Override public void remove() { if (last == null) { throw new NoSuchElementException(); @@ -317,6 +329,7 @@ public class LinkedListImpl implements LinkedList { last = null; } + @Override public void close() { removeIter(this); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java index db0461f5ee..10700e5558 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java @@ -27,5 +27,6 @@ public interface LinkedListIterator extends Iterator, AutoCloseable { void repeat(); + @Override void close(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java index 69cc54a146..949970bdfc 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java @@ -43,6 +43,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { * * @return an ordered executor */ + @Override public Executor getExecutor() { return new OrderedExecutor(parent); } @@ -72,6 +73,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { public OrderedExecutor(final Executor parent) { this.parent = parent; runner = new Runnable() { + @Override public void run() { for (;;) { // Optimization, first try without any locks @@ -110,6 +112,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { * * @param command the task to run. */ + @Override public void execute(final Runnable command) { synchronized (tasks) { tasks.add(command); @@ -120,6 +123,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { } } + @Override public String toString() { return "OrderedExecutor(running=" + running + ", tasks=" + tasks + ")"; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java index b4b6a510aa..6556ef57d8 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java @@ -60,6 +60,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { } } + @Override public void addHead(final T t, final int priority) { checkHighest(priority); @@ -68,6 +69,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { size++; } + @Override public void addTail(final T t, final int priority) { checkHighest(priority); @@ -76,6 +78,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { size++; } + @Override public T poll() { T t = null; @@ -108,6 +111,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { return t; } + @Override public void clear() { for (LinkedListImpl list : levels) { list.clear(); @@ -116,14 +120,17 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { size = 0; } + @Override public int size() { return size; } + @Override public boolean isEmpty() { return size == 0; } + @Override public LinkedListIterator iterator() { return new PriorityLinkedListIterator(); } @@ -149,6 +156,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { close(); } + @Override public void repeat() { if (lastIter == null) { throw new NoSuchElementException(); @@ -157,6 +165,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { lastIter.repeat(); } + @Override public void close() { if (!closed) { closed = true; @@ -178,6 +187,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { } } + @Override public boolean hasNext() { checkReset(); @@ -205,6 +215,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { return false; } + @Override public T next() { if (lastIter == null) { throw new NoSuchElementException(); @@ -213,6 +224,7 @@ public class PriorityLinkedListImpl implements PriorityLinkedList { return lastIter.next(); } + @Override public void remove() { if (lastIter == null) { throw new NoSuchElementException(); diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java index 06a26c7ea4..42e20c74f9 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java @@ -26,6 +26,7 @@ public class SimpleIDGenerator implements IDGenerator { idSequence = startID; } + @Override public synchronized long generateID() { long id = idSequence++; @@ -41,6 +42,7 @@ public class SimpleIDGenerator implements IDGenerator { return id; } + @Override public synchronized long getCurrentID() { return idSequence; } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java index 4a7675f5c7..19ea7dd9b8 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java @@ -75,6 +75,7 @@ public class SoftValueHashMap implemen /** * @see java.util.Map#size() */ + @Override public int size() { processQueue(); return mapDelegate.size(); @@ -83,6 +84,7 @@ public class SoftValueHashMap implemen /** * @see java.util.Map#isEmpty() */ + @Override public boolean isEmpty() { processQueue(); return mapDelegate.isEmpty(); @@ -92,6 +94,7 @@ public class SoftValueHashMap implemen * @param key * @see java.util.Map#containsKey(java.lang.Object) */ + @Override public boolean containsKey(final Object key) { processQueue(); return mapDelegate.containsKey(key); @@ -101,6 +104,7 @@ public class SoftValueHashMap implemen * @param value * @see java.util.Map#containsValue(java.lang.Object) */ + @Override public boolean containsValue(final Object value) { processQueue(); for (AggregatedSoftReference valueIter : mapDelegate.values()) { @@ -117,6 +121,7 @@ public class SoftValueHashMap implemen * @param key * @see java.util.Map#get(java.lang.Object) */ + @Override public V get(final Object key) { processQueue(); AggregatedSoftReference value = mapDelegate.get(key); @@ -134,6 +139,7 @@ public class SoftValueHashMap implemen * @param value * @see java.util.Map#put(java.lang.Object, java.lang.Object) */ + @Override public V put(final K key, final V value) { processQueue(); AggregatedSoftReference newRef = createReference(key, value); @@ -178,6 +184,7 @@ public class SoftValueHashMap implemen class ComparatorAgregated implements Comparator { + @Override public int compare(AggregatedSoftReference o1, AggregatedSoftReference o2) { long k = o1.used - o2.used; @@ -206,6 +213,7 @@ public class SoftValueHashMap implemen * @param key * @see java.util.Map#remove(java.lang.Object) */ + @Override public V remove(final Object key) { processQueue(); AggregatedSoftReference ref = mapDelegate.remove(key); @@ -221,6 +229,7 @@ public class SoftValueHashMap implemen * @param m * @see java.util.Map#putAll(java.util.Map) */ + @Override public void putAll(final Map m) { processQueue(); for (Map.Entry e : m.entrySet()) { @@ -231,6 +240,7 @@ public class SoftValueHashMap implemen /** * @see java.util.Map#clear() */ + @Override public void clear() { mapDelegate.clear(); } @@ -238,6 +248,7 @@ public class SoftValueHashMap implemen /** * @see java.util.Map#keySet() */ + @Override public Set keySet() { processQueue(); return mapDelegate.keySet(); @@ -246,6 +257,7 @@ public class SoftValueHashMap implemen /** * @see java.util.Map#values() */ + @Override public Collection values() { processQueue(); ArrayList list = new ArrayList(); @@ -263,6 +275,7 @@ public class SoftValueHashMap implemen /** * @see java.util.Map#entrySet() */ + @Override public Set> entrySet() { processQueue(); HashSet> set = new HashSet>(); @@ -353,6 +366,7 @@ public class SoftValueHashMap implemen /* (non-Javadoc) * @see java.util.Map.Entry#getKey() */ + @Override public K getKey() { return key; } @@ -360,6 +374,7 @@ public class SoftValueHashMap implemen /* (non-Javadoc) * @see java.util.Map.Entry#getValue() */ + @Override public V getValue() { return value; } @@ -367,6 +382,7 @@ public class SoftValueHashMap implemen /* (non-Javadoc) * @see java.util.Map.Entry#setValue(java.lang.Object) */ + @Override public V setValue(final V value) { this.value = value; return value; diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java index 96cdb8c2a2..96678f764c 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java @@ -60,6 +60,7 @@ public class TimeAndCounterIDGenerator implements IDGenerator { // Public -------------------------------------------------------- + @Override public long generateID() { long idReturn = counter.incrementAndGet(); @@ -93,6 +94,7 @@ public class TimeAndCounterIDGenerator implements IDGenerator { return idReturn; } + @Override public long getCurrentID() { return counter.get(); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java index 011ac58652..699ccacb8a 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java @@ -50,14 +50,17 @@ public class TokenBucketLimiterImpl implements TokenBucketLimiter { this.window = unit.toMillis(unitAmount); } + @Override public int getRate() { return rate; } + @Override public boolean isSpin() { return spin; } + @Override public void limit() { while (!check()) { if (spin) { diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java index 6e54c5d0a9..ace62c86eb 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java @@ -51,6 +51,7 @@ public final class VersionLoader { try { PROP_FILE_NAME = AccessController.doPrivileged(new PrivilegedAction() { + @Override public String run() { return System.getProperty(VersionLoader.VERSION_PROP_FILE_KEY); } diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java index e022a0de63..d8b9e6a418 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java @@ -431,6 +431,7 @@ public final class XMLUtil { private static URL findResource(final String resourceName) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public URL run() { return ClassloadingUtil.findResource(resourceName); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java index 246fe7ad29..7dbc9574ac 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java @@ -124,6 +124,7 @@ public interface JMSQueueControl extends DestinationControl { * * @return the number of removed messages */ + @Override @Operation(desc = "Remove the messages corresponding to the given filter (and returns the number of removed messages)", impact = MBeanOperationInfo.ACTION) int removeMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception; diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java index 09d6b18f54..e1707015ec 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java @@ -99,6 +99,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag // BytesMessage implementation ----------------------------------- + @Override public boolean readBoolean() throws JMSException { checkRead(); try { @@ -109,6 +110,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public byte readByte() throws JMSException { checkRead(); try { @@ -119,6 +121,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readUnsignedByte() throws JMSException { checkRead(); try { @@ -129,6 +132,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public short readShort() throws JMSException { checkRead(); try { @@ -139,6 +143,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readUnsignedShort() throws JMSException { checkRead(); try { @@ -149,6 +154,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public char readChar() throws JMSException { checkRead(); try { @@ -159,6 +165,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readInt() throws JMSException { checkRead(); try { @@ -169,6 +176,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public long readLong() throws JMSException { checkRead(); try { @@ -179,6 +187,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public float readFloat() throws JMSException { checkRead(); try { @@ -189,6 +198,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public double readDouble() throws JMSException { checkRead(); try { @@ -199,6 +209,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public String readUTF() throws JMSException { checkRead(); try { @@ -215,57 +226,68 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readBytes(final byte[] value) throws JMSException { checkRead(); return bytesReadBytes(message.getBodyBuffer(), value); } + @Override public int readBytes(final byte[] value, final int length) throws JMSException { checkRead(); return bytesReadBytes(message.getBodyBuffer(), value, length); } + @Override public void writeBoolean(final boolean value) throws JMSException { checkWrite(); bytesWriteBoolean(message.getBodyBuffer(), value); } + @Override public void writeByte(final byte value) throws JMSException { checkWrite(); bytesWriteByte(message.getBodyBuffer(), value); } + @Override public void writeShort(final short value) throws JMSException { checkWrite(); bytesWriteShort(message.getBodyBuffer(), value); } + @Override public void writeChar(final char value) throws JMSException { checkWrite(); bytesWriteChar(message.getBodyBuffer(), value); } + @Override public void writeInt(final int value) throws JMSException { checkWrite(); bytesWriteInt(message.getBodyBuffer(), value); } + @Override public void writeLong(final long value) throws JMSException { checkWrite(); bytesWriteLong(message.getBodyBuffer(), value); } + @Override public void writeFloat(final float value) throws JMSException { checkWrite(); bytesWriteFloat(message.getBodyBuffer(), value); } + @Override public void writeDouble(final double value) throws JMSException { checkWrite(); bytesWriteDouble(message.getBodyBuffer(), value); } + @Override public void writeUTF(final String value) throws JMSException { checkWrite(); try { @@ -280,16 +302,19 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } + @Override public void writeBytes(final byte[] value) throws JMSException { checkWrite(); bytesWriteBytes(message.getBodyBuffer(), value); } + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { checkWrite(); bytesWriteBytes(message.getBodyBuffer(), value, offset, length); } + @Override public void writeObject(final Object value) throws JMSException { checkWrite(); if (!bytesWriteObject(message.getBodyBuffer(), value)) { @@ -297,6 +322,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public void reset() throws JMSException { if (!readOnly) { readOnly = true; @@ -328,6 +354,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public long getBodyLength() throws JMSException { checkRead(); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java index a1184b22ab..60de2d7818 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java @@ -199,18 +199,21 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme // Connection implementation -------------------------------------------------------------------- + @Override public synchronized Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException { checkClosed(); return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQConnection.TYPE_GENERIC_CONNECTION); } + @Override public String getClientID() throws JMSException { checkClosed(); return clientID; } + @Override public void setClientID(final String clientID) throws JMSException { checkClosed(); @@ -245,6 +248,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme justCreated = false; } + @Override public ConnectionMetaData getMetaData() throws JMSException { checkClosed(); @@ -257,6 +261,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme return metaData; } + @Override public ExceptionListener getExceptionListener() throws JMSException { checkClosed(); @@ -265,6 +270,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme return exceptionListener; } + @Override public void setExceptionListener(final ExceptionListener listener) throws JMSException { checkClosed(); @@ -272,6 +278,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme justCreated = false; } + @Override public synchronized void start() throws JMSException { checkClosed(); @@ -294,6 +301,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme } + @Override public synchronized void stop() throws JMSException { threadAwareContext.assertNotMessageListenerThread(); @@ -307,6 +315,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme started = false; } + @Override public final synchronized void close() throws JMSException { threadAwareContext.assertNotCompletionListenerThread(); threadAwareContext.assertNotMessageListenerThread(); @@ -351,6 +360,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme } } + @Override public ConnectionConsumer createConnectionConsumer(final Destination destination, final String messageSelector, final ServerSessionPool sessionPool, @@ -372,6 +382,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme } } + @Override public ConnectionConsumer createDurableConnectionConsumer(final Topic topic, final String subscriptionName, final String messageSelector, @@ -403,6 +414,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme // QueueConnection implementation --------------------------------------------------------------- + @Override public QueueSession createQueueSession(final boolean transacted, int acknowledgeMode) throws JMSException { checkClosed(); return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQSession.TYPE_QUEUE_SESSION); @@ -420,6 +432,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme return acknowledgeMode; } + @Override public ConnectionConsumer createConnectionConsumer(final Queue queue, final String messageSelector, final ServerSessionPool sessionPool, @@ -431,11 +444,13 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme // TopicConnection implementation --------------------------------------------------------------- + @Override public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { checkClosed(); return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQSession.TYPE_TOPIC_SESSION); } + @Override public ConnectionConsumer createConnectionConsumer(final Topic topic, final String messageSelector, final ServerSessionPool sessionPool, @@ -695,6 +710,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme je.initCause(me); new Thread(new Runnable() { + @Override public void run() { exceptionListener.onException(je); } @@ -714,6 +730,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException me) { } @@ -739,6 +756,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme if (failoverListener != null) { new Thread(new Runnable() { + @Override public void run() { failoverListener.failoverEvent(eventType); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java index aa29bc5b73..0dce3fcb89 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java @@ -79,6 +79,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, private String protocolManagerFactoryStr; + @Override public void writeExternal(ObjectOutput out) throws IOException { URI uri = toURI(); @@ -135,6 +136,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, if (protocolManagerFactoryStr != null && !protocolManagerFactoryStr.trim().isEmpty()) { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { ClientProtocolManagerFactory protocolManagerFactory = @@ -148,6 +150,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, } } + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { String url = in.readUTF(); ConnectionFactoryParser parser = new ConnectionFactoryParser(); @@ -225,10 +228,12 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, serverLocator.disableFinalizeCheck(); } + @Override public Connection createConnection() throws JMSException { return createConnection(user, password); } + @Override public Connection createConnection(final String username, final String password) throws JMSException { return createConnectionInternal(username, password, false, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } @@ -296,10 +301,12 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, // XAConnectionFactory implementation ----------------------------------------------------------- + @Override public XAConnection createXAConnection() throws JMSException { return createXAConnection(null, null); } + @Override public XAConnection createXAConnection(final String username, final String password) throws JMSException { return (XAConnection) createConnectionInternal(username, password, true, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } @@ -694,6 +701,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, serverLocator.setCompressLargeMessage(avoidLargeMessages); } + @Override public void close() { ServerLocator locator0 = serverLocator; if (locator0 != null) diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java index 31eadb9a52..b1c44a3479 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.utils.ReferenceCounterUtil; public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnectionForContext { final Runnable closeRunnable = new Runnable() { + @Override public void run() { try { close(); @@ -43,6 +44,7 @@ public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnec protected final ThreadAwareContext threadAwareContext = new ThreadAwareContext(); + @Override public JMSContext createContext(int sessionMode) { switch (sessionMode) { case Session.AUTO_ACKNOWLEDGE: @@ -60,6 +62,7 @@ public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnec return new ActiveMQJMSContext(this, sessionMode, threadAwareContext); } + @Override public XAJMSContext createXAContext() { refCounter.increment(); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java index 6af723fc55..628281b652 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java @@ -49,34 +49,42 @@ public class ActiveMQConnectionMetaData implements ConnectionMetaData { // ConnectionMetaData implementation ----------------------------- + @Override public String getJMSVersion() throws JMSException { return "2.0"; } + @Override public int getJMSMajorVersion() throws JMSException { return 2; } + @Override public int getJMSMinorVersion() throws JMSException { return 0; } + @Override public String getJMSProviderName() throws JMSException { return ActiveMQConnectionMetaData.ACTIVEMQ; } + @Override public String getProviderVersion() throws JMSException { return serverVersion.getFullVersion(); } + @Override public int getProviderMajorVersion() throws JMSException { return serverVersion.getMajorVersion(); } + @Override public int getProviderMinorVersion() throws JMSException { return serverVersion.getMinorVersion(); } + @Override public Enumeration getJMSXPropertyNames() throws JMSException { Vector v = new Vector(); v.add("JMSXGroupID"); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java index 9d431f9bbc..f803ff630d 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java @@ -296,6 +296,7 @@ public class ActiveMQDestination implements Destination, Serializable, Reference // Referenceable implementation --------------------------------------- + @Override public Reference getReference() throws NamingException { return new Reference(this.getClass().getCanonicalName(), new SerializableObjectRefAddr("ActiveMQ-DEST", this), DestinationObjectFactory.class.getCanonicalName(), null); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java index 747316dff9..b3112a7bb5 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java @@ -100,66 +100,77 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess // MapMessage implementation ------------------------------------- + @Override public void setBoolean(final String name, final boolean value) throws JMSException { checkName(name); map.putBooleanProperty(new SimpleString(name), value); invalid = true; } + @Override public void setByte(final String name, final byte value) throws JMSException { checkName(name); map.putByteProperty(new SimpleString(name), value); invalid = true; } + @Override public void setShort(final String name, final short value) throws JMSException { checkName(name); map.putShortProperty(new SimpleString(name), value); invalid = true; } + @Override public void setChar(final String name, final char value) throws JMSException { checkName(name); map.putCharProperty(new SimpleString(name), value); invalid = true; } + @Override public void setInt(final String name, final int value) throws JMSException { checkName(name); map.putIntProperty(new SimpleString(name), value); invalid = true; } + @Override public void setLong(final String name, final long value) throws JMSException { checkName(name); map.putLongProperty(new SimpleString(name), value); invalid = true; } + @Override public void setFloat(final String name, final float value) throws JMSException { checkName(name); map.putFloatProperty(new SimpleString(name), value); invalid = true; } + @Override public void setDouble(final String name, final double value) throws JMSException { checkName(name); map.putDoubleProperty(new SimpleString(name), value); invalid = true; } + @Override public void setString(final String name, final String value) throws JMSException { checkName(name); map.putSimpleStringProperty(new SimpleString(name), value == null ? null : new SimpleString(value)); invalid = true; } + @Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; } + @Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { checkName(name); if (offset + length > value.length) { @@ -171,6 +182,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess invalid = true; } + @Override public void setObject(final String name, final Object value) throws JMSException { checkName(name); try { @@ -182,6 +194,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess invalid = true; } + @Override public boolean getBoolean(final String name) throws JMSException { try { return map.getBooleanProperty(new SimpleString(name)); @@ -191,6 +204,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public byte getByte(final String name) throws JMSException { try { return map.getByteProperty(new SimpleString(name)); @@ -200,6 +214,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public short getShort(final String name) throws JMSException { try { return map.getShortProperty(new SimpleString(name)); @@ -209,6 +224,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public char getChar(final String name) throws JMSException { try { return map.getCharProperty(new SimpleString(name)); @@ -218,6 +234,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); @@ -227,6 +244,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public long getLong(final String name) throws JMSException { try { return map.getLongProperty(new SimpleString(name)); @@ -236,6 +254,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public float getFloat(final String name) throws JMSException { try { return map.getFloatProperty(new SimpleString(name)); @@ -245,6 +264,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public double getDouble(final String name) throws JMSException { try { return map.getDoubleProperty(new SimpleString(name)); @@ -254,6 +274,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public String getString(final String name) throws JMSException { try { SimpleString str = map.getSimpleStringProperty(new SimpleString(name)); @@ -269,6 +290,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public byte[] getBytes(final String name) throws JMSException { try { return map.getBytesProperty(new SimpleString(name)); @@ -278,6 +300,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public Object getObject(final String name) throws JMSException { Object val = map.getProperty(new SimpleString(name)); @@ -288,6 +311,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess return val; } + @Override public Enumeration getMapNames() throws JMSException { Set simplePropNames = map.getPropertyNames(); Set propNames = new HashSet(simplePropNames.size()); @@ -299,6 +323,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess return Collections.enumeration(propNames); } + @Override public boolean itemExists(final String name) throws JMSException { return map.containsProperty(new SimpleString(name)); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java index db72dffd2b..6dfdf7c526 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java @@ -277,6 +277,7 @@ public class ActiveMQMessage implements javax.jms.Message { // javax.jmx.Message implementation ------------------------------ + @Override public String getJMSMessageID() { if (msgID == null) { UUID uid = message.getUserID(); @@ -286,6 +287,7 @@ public class ActiveMQMessage implements javax.jms.Message { return msgID; } + @Override public void setJMSMessageID(final String jmsMessageID) throws JMSException { if (jmsMessageID != null && !jmsMessageID.startsWith("ID:")) { throw new JMSException("JMSMessageID must start with ID:"); @@ -296,18 +298,22 @@ public class ActiveMQMessage implements javax.jms.Message { msgID = jmsMessageID; } + @Override public long getJMSTimestamp() throws JMSException { return message.getTimestamp(); } + @Override public void setJMSTimestamp(final long timestamp) throws JMSException { message.setTimestamp(timestamp); } + @Override public byte[] getJMSCorrelationIDAsBytes() throws JMSException { return MessageUtil.getJMSCorrelationIDAsBytes(message); } + @Override public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException { try { MessageUtil.setJMSCorrelationIDAsBytes(message, correlationID); @@ -319,11 +325,13 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void setJMSCorrelationID(final String correlationID) throws JMSException { MessageUtil.setJMSCorrelationID(message, correlationID); jmsCorrelationID = correlationID; } + @Override public String getJMSCorrelationID() throws JMSException { if (jmsCorrelationID == null) { jmsCorrelationID = MessageUtil.getJMSCorrelationID(message); @@ -332,6 +340,7 @@ public class ActiveMQMessage implements javax.jms.Message { return jmsCorrelationID; } + @Override public Destination getJMSReplyTo() throws JMSException { if (replyTo == null) { @@ -344,6 +353,7 @@ public class ActiveMQMessage implements javax.jms.Message { return replyTo; } + @Override public void setJMSReplyTo(final Destination dest) throws JMSException { if (dest == null) { @@ -363,6 +373,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString sdest = message.getAddress(); @@ -373,14 +384,17 @@ public class ActiveMQMessage implements javax.jms.Message { return dest; } + @Override public void setJMSDestination(final Destination destination) throws JMSException { dest = destination; } + @Override public int getJMSDeliveryMode() throws JMSException { return message.isDurable() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT; } + @Override public void setJMSDeliveryMode(final int deliveryMode) throws JMSException { if (deliveryMode == DeliveryMode.PERSISTENT) { message.setDurable(true); @@ -393,10 +407,12 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public boolean getJMSRedelivered() throws JMSException { return message.getDeliveryCount() > 1; } + @Override public void setJMSRedelivered(final boolean redelivered) throws JMSException { if (!redelivered) { message.setDeliveryCount(1); @@ -411,6 +427,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void setJMSType(final String type) throws JMSException { if (type != null) { MessageUtil.setJMSType(message, type); @@ -419,6 +436,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public String getJMSType() throws JMSException { if (jmsType == null) { jmsType = MessageUtil.getJMSType(message); @@ -426,24 +444,29 @@ public class ActiveMQMessage implements javax.jms.Message { return jmsType; } + @Override public long getJMSExpiration() throws JMSException { return message.getExpiration(); } + @Override public void setJMSExpiration(final long expiration) throws JMSException { message.setExpiration(expiration); } + @Override public int getJMSPriority() throws JMSException { return message.getPriority(); } + @Override public void setJMSPriority(final int priority) throws JMSException { checkPriority(priority); message.setPriority((byte) priority); } + @Override public void clearProperties() throws JMSException { MessageUtil.clearProperties(message); @@ -451,14 +474,17 @@ public class ActiveMQMessage implements javax.jms.Message { propertiesReadOnly = false; } + @Override public void clearBody() throws JMSException { readOnly = false; } + @Override public boolean propertyExists(final String name) throws JMSException { return MessageUtil.propertyExists(message, name); } + @Override public boolean getBooleanProperty(final String name) throws JMSException { try { return message.getBooleanProperty(new SimpleString(name)); @@ -468,6 +494,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public byte getByteProperty(final String name) throws JMSException { try { return message.getByteProperty(new SimpleString(name)); @@ -477,6 +504,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public short getShortProperty(final String name) throws JMSException { try { return message.getShortProperty(new SimpleString(name)); @@ -486,6 +514,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public int getIntProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return message.getDeliveryCount(); @@ -499,6 +528,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public long getLongProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return message.getDeliveryCount(); @@ -512,6 +542,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public float getFloatProperty(final String name) throws JMSException { try { return message.getFloatProperty(new SimpleString(name)); @@ -521,6 +552,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public double getDoubleProperty(final String name) throws JMSException { try { return message.getDoubleProperty(new SimpleString(name)); @@ -530,6 +562,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public String getStringProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return String.valueOf(message.getDeliveryCount()); @@ -548,6 +581,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public Object getObjectProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return String.valueOf(message.getDeliveryCount()); @@ -566,42 +600,50 @@ public class ActiveMQMessage implements javax.jms.Message { return Collections.enumeration(MessageUtil.getPropertyNames(message)); } + @Override public void setBooleanProperty(final String name, final boolean value) throws JMSException { checkProperty(name); message.putBooleanProperty(new SimpleString(name), value); } + @Override public void setByteProperty(final String name, final byte value) throws JMSException { checkProperty(name); message.putByteProperty(new SimpleString(name), value); } + @Override public void setShortProperty(final String name, final short value) throws JMSException { checkProperty(name); message.putShortProperty(new SimpleString(name), value); } + @Override public void setIntProperty(final String name, final int value) throws JMSException { checkProperty(name); message.putIntProperty(new SimpleString(name), value); } + @Override public void setLongProperty(final String name, final long value) throws JMSException { checkProperty(name); message.putLongProperty(new SimpleString(name), value); } + @Override public void setFloatProperty(final String name, final float value) throws JMSException { checkProperty(name); message.putFloatProperty(new SimpleString(name), value); } + @Override public void setDoubleProperty(final String name, final double value) throws JMSException { checkProperty(name); message.putDoubleProperty(new SimpleString(name), value); } + @Override public void setStringProperty(final String name, final String value) throws JMSException { checkProperty(name); @@ -613,6 +655,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void setObjectProperty(final String name, final Object value) throws JMSException { if (ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM.equals(name)) { setOutputStream((OutputStream) value); @@ -641,6 +684,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void acknowledge() throws JMSException { if (session != null) { try { diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java index 8841f2a619..3f47209910 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java @@ -86,18 +86,21 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr // MessageConsumer implementation -------------------------------- + @Override public String getMessageSelector() throws JMSException { checkClosed(); return selector; } + @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return listener; } + @Override public void setMessageListener(final MessageListener listener) throws JMSException { this.listener = listener; @@ -111,18 +114,22 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr } } + @Override public Message receive() throws JMSException { return getMessage(0, false); } + @Override public Message receive(final long timeout) throws JMSException { return getMessage(timeout, false); } + @Override public Message receiveNoWait() throws JMSException { return getMessage(0, true); } + @Override public void close() throws JMSException { try { consumer.close(); @@ -141,6 +148,7 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr // QueueReceiver implementation ---------------------------------- + @Override public Queue getQueue() throws JMSException { checkClosed(); @@ -149,12 +157,14 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr // TopicSubscriber implementation -------------------------------- + @Override public Topic getTopic() throws JMSException { checkClosed(); return (Topic) destination; } + @Override public boolean getNoLocal() throws JMSException { checkClosed(); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java index 7d58b54cfd..9c6c4970fe 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java @@ -84,30 +84,35 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To // MessageProducer implementation -------------------------------- + @Override public void setDisableMessageID(final boolean value) throws JMSException { checkClosed(); disableMessageID = value; } + @Override public boolean getDisableMessageID() throws JMSException { checkClosed(); return disableMessageID; } + @Override public void setDisableMessageTimestamp(final boolean value) throws JMSException { checkClosed(); disableMessageTimestamp = value; } + @Override public boolean getDisableMessageTimestamp() throws JMSException { checkClosed(); return disableMessageTimestamp; } + @Override public void setDeliveryMode(final int deliveryMode) throws JMSException { checkClosed(); if (deliveryMode != DeliveryMode.NON_PERSISTENT && deliveryMode != DeliveryMode.PERSISTENT) { @@ -117,12 +122,14 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To defaultDeliveryMode = deliveryMode; } + @Override public int getDeliveryMode() throws JMSException { checkClosed(); return defaultDeliveryMode; } + @Override public void setPriority(final int defaultPriority) throws JMSException { checkClosed(); @@ -133,30 +140,35 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To this.defaultPriority = defaultPriority; } + @Override public int getPriority() throws JMSException { checkClosed(); return defaultPriority; } + @Override public void setTimeToLive(final long timeToLive) throws JMSException { checkClosed(); defaultTimeToLive = timeToLive; } + @Override public long getTimeToLive() throws JMSException { checkClosed(); return defaultTimeToLive; } + @Override public Destination getDestination() throws JMSException { checkClosed(); return defaultDestination; } + @Override public void close() throws JMSException { connection.getThreadAwareContext().assertNotCompletionListenerThread(); try { @@ -167,11 +179,13 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To } } + @Override public void send(final Message message) throws JMSException { checkDefaultDestination(); doSendx(defaultDestination, message, defaultDeliveryMode, defaultPriority, defaultTimeToLive, null); } + @Override public void send(final Message message, final int deliveryMode, final int priority, @@ -180,10 +194,12 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To doSendx(defaultDestination, message, deliveryMode, priority, timeToLive, null); } + @Override public void send(final Destination destination, final Message message) throws JMSException { send(destination, message, defaultDeliveryMode, defaultPriority, defaultTimeToLive); } + @Override public void send(final Destination destination, final Message message, final int deliveryMode, @@ -247,18 +263,22 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To // TopicPublisher Implementation --------------------------------- + @Override public Topic getTopic() throws JMSException { return (Topic) getDestination(); } + @Override public void publish(final Message message) throws JMSException { send(message); } + @Override public void publish(final Topic topic, final Message message) throws JMSException { send(topic, message); } + @Override public void publish(final Message message, final int deliveryMode, final int priority, @@ -266,6 +286,7 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To send(message, deliveryMode, priority, timeToLive); } + @Override public void publish(final Topic topic, final Message message, final int deliveryMode, @@ -277,10 +298,12 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To // QueueSender Implementation ------------------------------------ + @Override public void send(final Queue queue, final Message message) throws JMSException { send((Destination) queue, message); } + @Override public void send(final Queue queue, final Message message, final int deliveryMode, @@ -290,6 +313,7 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To doSendx((ActiveMQDestination) queue, message, deliveryMode, priority, timeToLive, null); } + @Override public Queue getQueue() throws JMSException { return (Queue) getDestination(); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java index eebccd17c4..f3220cba59 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java @@ -103,6 +103,7 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess // ObjectMessage implementation ---------------------------------- + @Override public void setObject(final Serializable object) throws JMSException { checkWrite(); @@ -128,6 +129,7 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess } // lazy deserialize the Object the first time the client requests it + @Override public Serializable getObject() throws JMSException { if (data == null || data.length == 0) { return null; diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java index 7660dfa83f..c7a5728593 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java @@ -66,6 +66,7 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue { // Public -------------------------------------------------------- + @Override public String getQueueName() { return name; } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java index 493029bf44..5022fcd90a 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java @@ -61,6 +61,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { // QueueBrowser implementation ------------------------------------------------------------------- + @Override public void close() throws JMSException { if (consumer != null) { try { @@ -72,6 +73,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { } } + @Override public Enumeration getEnumeration() throws JMSException { try { close(); @@ -86,10 +88,12 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { } + @Override public String getMessageSelector() throws JMSException { return filterString == null ? null : filterString.toString(); } + @Override public Queue getQueue() throws JMSException { return queue; } @@ -113,6 +117,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { ClientMessage current = null; + @Override public boolean hasMoreElements() { if (current == null) { try { @@ -125,6 +130,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { return current != null; } + @Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java index 6fdce7066e..7ee9e0e0c8 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java @@ -54,6 +54,7 @@ public class ActiveMQQueueConnectionFactory extends ActiveMQConnectionFactory im super(ha, initialConnectors); } + @Override public int getFactoryType() { return JMSFactoryType.QUEUE_CF.intValue(); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java index 758ad36147..758cb9029d 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java @@ -115,30 +115,35 @@ public class ActiveMQSession implements QueueSession, TopicSession { // Session implementation ---------------------------------------- + @Override public BytesMessage createBytesMessage() throws JMSException { checkClosed(); return new ActiveMQBytesMessage(session); } + @Override public MapMessage createMapMessage() throws JMSException { checkClosed(); return new ActiveMQMapMessage(session); } + @Override public Message createMessage() throws JMSException { checkClosed(); return new ActiveMQMessage(session); } + @Override public ObjectMessage createObjectMessage() throws JMSException { checkClosed(); return new ActiveMQObjectMessage(session); } + @Override public ObjectMessage createObjectMessage(final Serializable object) throws JMSException { checkClosed(); @@ -149,12 +154,14 @@ public class ActiveMQSession implements QueueSession, TopicSession { return msg; } + @Override public StreamMessage createStreamMessage() throws JMSException { checkClosed(); return new ActiveMQStreamMessage(session); } + @Override public TextMessage createTextMessage() throws JMSException { checkClosed(); @@ -165,6 +172,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { return msg; } + @Override public TextMessage createTextMessage(final String text) throws JMSException { checkClosed(); @@ -175,12 +183,14 @@ public class ActiveMQSession implements QueueSession, TopicSession { return msg; } + @Override public boolean getTransacted() throws JMSException { checkClosed(); return transacted; } + @Override public int getAcknowledgeMode() throws JMSException { checkClosed(); @@ -191,6 +201,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { return xa; } + @Override public void commit() throws JMSException { if (!transacted) { throw new IllegalStateException("Cannot commit a non-transacted session"); @@ -206,6 +217,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void rollback() throws JMSException { if (!transacted) { throw new IllegalStateException("Cannot rollback a non-transacted session"); @@ -222,6 +234,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void close() throws JMSException { connection.getThreadAwareContext().assertNotCompletionListenerThread(); connection.getThreadAwareContext().assertNotMessageListenerThread(); @@ -241,6 +254,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void recover() throws JMSException { if (transacted) { throw new IllegalStateException("Cannot recover a transacted session"); @@ -256,19 +270,23 @@ public class ActiveMQSession implements QueueSession, TopicSession { recoverCalled = true; } + @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return null; } + @Override public void setMessageListener(final MessageListener listener) throws JMSException { checkClosed(); } + @Override public void run() { } + @Override public MessageProducer createProducer(final Destination destination) throws JMSException { if (destination != null && !(destination instanceof ActiveMQDestination)) { throw new InvalidDestinationException("Not an ActiveMQ Artemis Destination:" + destination); @@ -301,15 +319,18 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public MessageConsumer createConsumer(final Destination destination) throws JMSException { return createConsumer(destination, null, false); } + @Override public MessageConsumer createConsumer(final Destination destination, final String messageSelector) throws JMSException { return createConsumer(destination, messageSelector, false); } + @Override public MessageConsumer createConsumer(final Destination destination, final String messageSelector, final boolean noLocal) throws JMSException { @@ -331,6 +352,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { return createConsumer(jbdest, null, messageSelector, noLocal, ConsumerDurability.NON_DURABLE); } + @Override public Queue createQueue(final String queueName) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { @@ -356,6 +378,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public Topic createTopic(final String topicName) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { @@ -381,10 +404,12 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public TopicSubscriber createDurableSubscriber(final Topic topic, final String name) throws JMSException { return createDurableSubscriber(topic, name, null, false); } + @Override public TopicSubscriber createDurableSubscriber(final Topic topic, final String name, String messageSelector, @@ -730,10 +755,12 @@ public class ActiveMQSession implements QueueSession, TopicSession { checkClosed(); } + @Override public QueueBrowser createBrowser(final Queue queue) throws JMSException { return createBrowser(queue, null); } + @Override public QueueBrowser createBrowser(final Queue queue, String filterString) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { @@ -784,6 +811,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } + @Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { @@ -806,6 +834,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public TemporaryTopic createTemporaryTopic() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { @@ -833,6 +862,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void unsubscribe(final String name) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { @@ -877,14 +907,17 @@ public class ActiveMQSession implements QueueSession, TopicSession { // QueueSession implementation + @Override public QueueReceiver createReceiver(final Queue queue, final String messageSelector) throws JMSException { return (QueueReceiver) createConsumer(queue, messageSelector); } + @Override public QueueReceiver createReceiver(final Queue queue) throws JMSException { return (QueueReceiver) createConsumer(queue); } + @Override public QueueSender createSender(final Queue queue) throws JMSException { return (QueueSender) createProducer(queue); } @@ -897,16 +930,19 @@ public class ActiveMQSession implements QueueSession, TopicSession { // TopicSession implementation + @Override public TopicPublisher createPublisher(final Topic topic) throws JMSException { return (TopicPublisher) createProducer(topic); } + @Override public TopicSubscriber createSubscriber(final Topic topic, final String messageSelector, final boolean noLocal) throws JMSException { return (TopicSubscriber) createConsumer(topic, messageSelector, noLocal); } + @Override public TopicSubscriber createSubscriber(final Topic topic) throws JMSException { return (TopicSubscriber) createConsumer(topic); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java index 315721f938..4b3f5c358c 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQStreamMessage.java @@ -86,6 +86,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre // StreamMessage implementation ---------------------------------- + @Override public boolean readBoolean() throws JMSException { checkRead(); try { @@ -99,6 +100,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public byte readByte() throws JMSException { checkRead(); @@ -113,6 +115,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public short readShort() throws JMSException { checkRead(); try { @@ -126,6 +129,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public char readChar() throws JMSException { checkRead(); try { @@ -139,6 +143,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public int readInt() throws JMSException { checkRead(); try { @@ -152,6 +157,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public long readLong() throws JMSException { checkRead(); try { @@ -165,6 +171,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public float readFloat() throws JMSException { checkRead(); try { @@ -178,6 +185,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public double readDouble() throws JMSException { checkRead(); try { @@ -191,6 +199,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public String readString() throws JMSException { checkRead(); try { @@ -209,6 +218,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre */ private int len = 0; + @Override public int readBytes(final byte[] value) throws JMSException { checkRead(); try { @@ -225,6 +235,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public Object readObject() throws JMSException { checkRead(); try { @@ -238,60 +249,70 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public void writeBoolean(final boolean value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.BOOLEAN); getBuffer().writeBoolean(value); } + @Override public void writeByte(final byte value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.BYTE); getBuffer().writeByte(value); } + @Override public void writeShort(final short value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.SHORT); getBuffer().writeShort(value); } + @Override public void writeChar(final char value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.CHAR); getBuffer().writeShort((short) value); } + @Override public void writeInt(final int value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.INT); getBuffer().writeInt(value); } + @Override public void writeLong(final long value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.LONG); getBuffer().writeLong(value); } + @Override public void writeFloat(final float value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.FLOAT); getBuffer().writeInt(Float.floatToIntBits(value)); } + @Override public void writeDouble(final double value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.DOUBLE); getBuffer().writeLong(Double.doubleToLongBits(value)); } + @Override public void writeString(final String value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.STRING); getBuffer().writeNullableString(value); } + @Override public void writeBytes(final byte[] value) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.BYTES); @@ -299,6 +320,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre getBuffer().writeBytes(value); } + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { checkWrite(); getBuffer().writeByte(DataConstants.BYTES); @@ -306,6 +328,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre getBuffer().writeBytes(value, offset, length); } + @Override public void writeObject(final Object value) throws JMSException { if (value instanceof String) { writeString((String) value); @@ -345,6 +368,7 @@ public final class ActiveMQStreamMessage extends ActiveMQMessage implements Stre } } + @Override public void reset() throws JMSException { if (!readOnly) { readOnly = true; diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java index bd0a61592b..aa3633632e 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java @@ -74,6 +74,7 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage // TextMessage implementation ------------------------------------ + @Override public void setText(final String text) throws JMSException { checkWrite(); @@ -87,6 +88,7 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage writeBodyText(message.getBodyBuffer(), this.text); } + @Override public String getText() { if (text != null) { return text.toString(); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java index d959d2655e..14f4e50398 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopic.java @@ -59,6 +59,7 @@ public class ActiveMQTopic extends ActiveMQDestination implements Topic { // Topic implementation ------------------------------------------ + @Override public String getTopicName() { return name; } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java index bc588d3ecf..08a51872c6 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTopicConnectionFactory.java @@ -54,6 +54,7 @@ public class ActiveMQTopicConnectionFactory extends ActiveMQConnectionFactory im super(ha, initialConnectors); } + @Override public int getFactoryType() { return JMSFactoryType.TOPIC_CF.intValue(); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java index fca68567d6..5724dacca6 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXAQueueConnectionFactory.java @@ -54,6 +54,7 @@ public class ActiveMQXAQueueConnectionFactory extends ActiveMQConnectionFactory super(ha, initialConnectors); } + @Override public int getFactoryType() { return JMSFactoryType.QUEUE_XA_CF.intValue(); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXATopicConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXATopicConnectionFactory.java index de20159f7f..b184cb31ec 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXATopicConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQXATopicConnectionFactory.java @@ -54,6 +54,7 @@ public class ActiveMQXATopicConnectionFactory extends ActiveMQConnectionFactory super(ha, initialConnectors); } + @Override public int getFactoryType() { return JMSFactoryType.TOPIC_XA_CF.intValue(); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSMessageListenerWrapper.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSMessageListenerWrapper.java index 1a6c95a016..0d831f0f1a 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSMessageListenerWrapper.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSMessageListenerWrapper.java @@ -61,6 +61,7 @@ public class JMSMessageListenerWrapper implements MessageHandler { * In this method we apply the JMS acknowledgement and redelivery semantics * as per JMS spec */ + @Override public void onMessage(final ClientMessage message) { ActiveMQMessage msg = ActiveMQMessage.createMessage(message, session.getCoreSession()); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java index b61a51ee8f..69db241df8 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/ConnectionFactoryObjectFactory.java @@ -30,6 +30,7 @@ import javax.naming.spi.ObjectFactory; */ public class ConnectionFactoryObjectFactory implements ObjectFactory { + @Override public Object getObjectInstance(final Object ref, final Name name, final Context ctx, diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java index 59533e05a1..4f4ea65f77 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/referenceable/DestinationObjectFactory.java @@ -30,6 +30,7 @@ import javax.naming.spi.ObjectFactory; */ public class DestinationObjectFactory implements ObjectFactory { + @Override public Object getObjectInstance(final Object ref, final Name name, final Context ctx, diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java index ba7474f19d..4f019c95d6 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ActiveMQInitialContextFactory.java @@ -47,6 +47,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory { private String queuePrefix = "queue."; private String topicPrefix = "topic."; + @Override public Context getInitialContext(Hashtable environment) throws NamingException { // lets create a factory Map data = new ConcurrentHashMap<>(); @@ -72,6 +73,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory { data.put(DYNAMIC_QUEUE_CONTEXT, new LazyCreateContext() { private static final long serialVersionUID = 6503881346214855588L; + @Override protected Object createEntry(String name) { return ActiveMQJMSClient.createQueue(name); } @@ -79,6 +81,7 @@ public class ActiveMQInitialContextFactory implements InitialContextFactory { data.put(DYNAMIC_TOPIC_CONTEXT, new LazyCreateContext() { private static final long serialVersionUID = 2019166796234979615L; + @Override protected Object createEntry(String name) { return ActiveMQJMSClient.createTopic(name); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/LazyCreateContext.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/LazyCreateContext.java index a817d69e46..ff2c62c0fa 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/LazyCreateContext.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/LazyCreateContext.java @@ -21,6 +21,7 @@ import javax.naming.NamingException; public abstract class LazyCreateContext extends ReadOnlyContext { + @Override public Object lookup(String name) throws NamingException { try { return super.lookup(name); diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/NameParserImpl.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/NameParserImpl.java index b469cb8cd0..fa7a4e98ac 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/NameParserImpl.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/NameParserImpl.java @@ -23,6 +23,7 @@ import javax.naming.NamingException; public class NameParserImpl implements NameParser { + @Override public Name parse(String name) throws NamingException { return new CompositeName(name); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java index f0daa9f2a1..e94377d584 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jndi/ReadOnlyContext.java @@ -196,18 +196,22 @@ public class ReadOnlyContext implements Context, Serializable { return new ReadOnlyContext(); } + @Override public Object addToEnvironment(String propName, Object propVal) throws NamingException { return environment.put(propName, propVal); } + @Override public Hashtable getEnvironment() throws NamingException { return (Hashtable) environment.clone(); } + @Override public Object removeFromEnvironment(String propName) throws NamingException { return environment.remove(propName); } + @Override public Object lookup(String name) throws NamingException { if (name.length() == 0) { return this; @@ -273,26 +277,31 @@ public class ReadOnlyContext implements Context, Serializable { return result; } + @Override public Object lookup(Name name) throws NamingException { return lookup(name.toString()); } + @Override public Object lookupLink(String name) throws NamingException { return lookup(name); } + @Override public Name composeName(Name name, Name prefix) throws NamingException { Name result = (Name) prefix.clone(); result.addAll(name); return result; } + @Override public String composeName(String name, String prefix) throws NamingException { CompositeName result = new CompositeName(prefix); result.addAll(new CompositeName(name)); return result.toString(); } + @Override public NamingEnumeration list(String name) throws NamingException { Object o = lookup(name); if (o == this) { @@ -306,6 +315,7 @@ public class ReadOnlyContext implements Context, Serializable { } } + @Override public NamingEnumeration listBindings(String name) throws NamingException { Object o = lookup(name); if (o == this) { @@ -319,78 +329,97 @@ public class ReadOnlyContext implements Context, Serializable { } } + @Override public Object lookupLink(Name name) throws NamingException { return lookupLink(name.toString()); } + @Override public NamingEnumeration list(Name name) throws NamingException { return list(name.toString()); } + @Override public NamingEnumeration listBindings(Name name) throws NamingException { return listBindings(name.toString()); } + @Override public void bind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void bind(String name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void close() throws NamingException { // ignore } + @Override public Context createSubcontext(Name name) throws NamingException { throw new OperationNotSupportedException(); } + @Override public Context createSubcontext(String name) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void destroySubcontext(Name name) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void destroySubcontext(String name) throws NamingException { throw new OperationNotSupportedException(); } + @Override public String getNameInNamespace() throws NamingException { return nameInNamespace; } + @Override public NameParser getNameParser(Name name) throws NamingException { return NAME_PARSER; } + @Override public NameParser getNameParser(String name) throws NamingException { return NAME_PARSER; } + @Override public void rebind(Name name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void rebind(String name, Object obj) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void rename(Name oldName, Name newName) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void rename(String oldName, String newName) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void unbind(Name name) throws NamingException { throw new OperationNotSupportedException(); } + @Override public void unbind(String name) throws NamingException { throw new OperationNotSupportedException(); } @@ -399,10 +428,12 @@ public class ReadOnlyContext implements Context, Serializable { private final Iterator i = bindings.entrySet().iterator(); + @Override public boolean hasMore() throws NamingException { return i.hasNext(); } + @Override public boolean hasMoreElements() { return i.hasNext(); } @@ -411,6 +442,7 @@ public class ReadOnlyContext implements Context, Serializable { return (Map.Entry) i.next(); } + @Override public void close() throws NamingException { } } @@ -420,10 +452,12 @@ public class ReadOnlyContext implements Context, Serializable { ListEnumeration() { } + @Override public Object next() throws NamingException { return nextElement(); } + @Override public Object nextElement() { Map.Entry entry = getNext(); return new NameClassPair((String) entry.getKey(), entry.getValue().getClass().getName()); @@ -435,10 +469,12 @@ public class ReadOnlyContext implements Context, Serializable { ListBindingEnumeration() { } + @Override public Object next() throws NamingException { return nextElement(); } + @Override public Object nextElement() { Map.Entry entry = getNext(); return new Binding((String) entry.getKey(), entry.getValue()); diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java index 79b10d747d..7734c9eef7 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeControlImpl.java @@ -35,46 +35,57 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont // Public -------------------------------------------------------- + @Override public void pause() throws Exception { bridge.pause(); } + @Override public void resume() throws Exception { bridge.resume(); } + @Override public boolean isStarted() { return bridge.isStarted(); } + @Override public void start() throws Exception { bridge.start(); } + @Override public void stop() throws Exception { bridge.stop(); } + @Override public String getClientID() { return bridge.getClientID(); } + @Override public long getFailureRetryInterval() { return bridge.getFailureRetryInterval(); } + @Override public int getMaxBatchSize() { return bridge.getMaxBatchSize(); } + @Override public long getMaxBatchTime() { return bridge.getMaxBatchTime(); } + @Override public int getMaxRetries() { return bridge.getMaxRetries(); } + @Override public String getQualityOfServiceMode() { QualityOfServiceMode mode = bridge.getQualityOfServiceMode(); if (mode != null) { @@ -85,66 +96,82 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont } } + @Override public String getSelector() { return bridge.getSelector(); } + @Override public String getSourcePassword() { return bridge.getSourcePassword(); } + @Override public String getSourceUsername() { return bridge.getSourceUsername(); } + @Override public String getSubscriptionName() { return bridge.getSubscriptionName(); } + @Override public String getTargetPassword() { return bridge.getTargetPassword(); } + @Override public String getTargetUsername() { return bridge.getTargetUsername(); } + @Override public boolean isAddMessageIDInHeader() { return bridge.isAddMessageIDInHeader(); } + @Override public boolean isFailed() { return bridge.isFailed(); } + @Override public boolean isPaused() { return bridge.isPaused(); } + @Override public void setAddMessageIDInHeader(final boolean value) { bridge.setAddMessageIDInHeader(value); } + @Override public void setClientID(final String clientID) { bridge.setClientID(clientID); } + @Override public void setFailureRetryInterval(final long interval) { bridge.setFailureRetryInterval(interval); } + @Override public void setMaxBatchSize(final int size) { bridge.setMaxBatchSize(size); } + @Override public void setMaxBatchTime(final long time) { bridge.setMaxBatchTime(time); } + @Override public void setMaxRetries(final int retries) { bridge.setMaxRetries(retries); } + @Override public void setQualityOfServiceMode(String mode) { if (mode != null) { bridge.setQualityOfServiceMode(QualityOfServiceMode.valueOf(mode)); @@ -154,26 +181,32 @@ public class JMSBridgeControlImpl extends StandardMBean implements JMSBridgeCont } } + @Override public void setSelector(final String selector) { bridge.setSelector(selector); } + @Override public void setSourcePassword(final String pwd) { bridge.setSourcePassword(pwd); } + @Override public void setSourceUsername(final String name) { bridge.setSourceUsername(name); } + @Override public void setSubscriptionName(final String subname) { bridge.setSubscriptionName(subname); } + @Override public void setTargetPassword(final String pwd) { bridge.setTargetPassword(pwd); } + @Override public void setTargetUsername(final String name) { bridge.setTargetUsername(name); } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java index f3bd337c3d..6e190eb7fb 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JMSBridgeImpl.java @@ -319,12 +319,14 @@ public final class JMSBridgeImpl implements JMSBridge { // ActiveMQComponent overrides -------------------------------------------------- + @Override public synchronized void start() throws Exception { synchronized (stoppingGuard) { stopping = false; } moduleTccl = AccessController.doPrivileged(new PrivilegedAction() { + @Override public ClassLoader run() { return Thread.currentThread().getContextClassLoader(); } @@ -448,6 +450,7 @@ public final class JMSBridgeImpl implements JMSBridge { } } + @Override public void stop() throws Exception { synchronized (stoppingGuard) { if (stopping) @@ -523,6 +526,7 @@ public final class JMSBridgeImpl implements JMSBridge { } } + @Override public synchronized boolean isStarted() { return started; } @@ -540,6 +544,7 @@ public final class JMSBridgeImpl implements JMSBridge { // JMSBridge implementation ------------------------------------------------------------ + @Override public synchronized void pause() throws Exception { if (JMSBridgeImpl.trace) { ActiveMQJMSBridgeLogger.LOGGER.trace("Pausing " + this); @@ -556,6 +561,7 @@ public final class JMSBridgeImpl implements JMSBridge { } } + @Override public synchronized void resume() throws Exception { if (JMSBridgeImpl.trace) { ActiveMQJMSBridgeLogger.LOGGER.trace("Resuming " + this); @@ -572,10 +578,12 @@ public final class JMSBridgeImpl implements JMSBridge { } } + @Override public DestinationFactory getSourceDestinationFactory() { return sourceDestinationFactory; } + @Override public void setSourceDestinationFactory(final DestinationFactory dest) { checkBridgeNotStarted(); JMSBridgeImpl.checkNotNull(dest, "TargetDestinationFactory"); @@ -583,10 +591,12 @@ public final class JMSBridgeImpl implements JMSBridge { sourceDestinationFactory = dest; } + @Override public DestinationFactory getTargetDestinationFactory() { return targetDestinationFactory; } + @Override public void setTargetDestinationFactory(final DestinationFactory dest) { checkBridgeNotStarted(); JMSBridgeImpl.checkNotNull(dest, "TargetDestinationFactory"); @@ -594,60 +604,72 @@ public final class JMSBridgeImpl implements JMSBridge { targetDestinationFactory = dest; } + @Override public synchronized String getSourceUsername() { return sourceUsername; } + @Override public synchronized void setSourceUsername(final String name) { checkBridgeNotStarted(); sourceUsername = name; } + @Override public synchronized String getSourcePassword() { return sourcePassword; } + @Override public synchronized void setSourcePassword(final String pwd) { checkBridgeNotStarted(); sourcePassword = pwd; } + @Override public synchronized String getTargetUsername() { return targetUsername; } + @Override public synchronized void setTargetUsername(final String name) { checkBridgeNotStarted(); targetUsername = name; } + @Override public synchronized String getTargetPassword() { return targetPassword; } + @Override public synchronized void setTargetPassword(final String pwd) { checkBridgeNotStarted(); targetPassword = pwd; } + @Override public synchronized String getSelector() { return selector; } + @Override public synchronized void setSelector(final String selector) { checkBridgeNotStarted(); this.selector = selector; } + @Override public synchronized long getFailureRetryInterval() { return failureRetryInterval; } + @Override public synchronized void setFailureRetryInterval(final long interval) { checkBridgeNotStarted(); if (interval < 1) { @@ -657,10 +679,12 @@ public final class JMSBridgeImpl implements JMSBridge { failureRetryInterval = interval; } + @Override public synchronized int getMaxRetries() { return maxRetries; } + @Override public synchronized void setMaxRetries(final int retries) { checkBridgeNotStarted(); JMSBridgeImpl.checkValidValue(retries, "MaxRetries"); @@ -668,10 +692,12 @@ public final class JMSBridgeImpl implements JMSBridge { maxRetries = retries; } + @Override public synchronized QualityOfServiceMode getQualityOfServiceMode() { return qualityOfServiceMode; } + @Override public synchronized void setQualityOfServiceMode(final QualityOfServiceMode mode) { checkBridgeNotStarted(); JMSBridgeImpl.checkNotNull(mode, "QualityOfServiceMode"); @@ -679,10 +705,12 @@ public final class JMSBridgeImpl implements JMSBridge { qualityOfServiceMode = mode; } + @Override public synchronized int getMaxBatchSize() { return maxBatchSize; } + @Override public synchronized void setMaxBatchSize(final int size) { checkBridgeNotStarted(); JMSBridgeImpl.checkMaxBatchSize(size); @@ -690,10 +718,12 @@ public final class JMSBridgeImpl implements JMSBridge { maxBatchSize = size; } + @Override public synchronized long getMaxBatchTime() { return maxBatchTime; } + @Override public synchronized void setMaxBatchTime(final long time) { checkBridgeNotStarted(); JMSBridgeImpl.checkValidValue(time, "MaxBatchTime"); @@ -701,41 +731,50 @@ public final class JMSBridgeImpl implements JMSBridge { maxBatchTime = time; } + @Override public synchronized String getSubscriptionName() { return subName; } + @Override public synchronized void setSubscriptionName(final String subname) { checkBridgeNotStarted(); subName = subname; } + @Override public synchronized String getClientID() { return clientID; } + @Override public synchronized void setClientID(final String clientID) { checkBridgeNotStarted(); this.clientID = clientID; } + @Override public boolean isAddMessageIDInHeader() { return addMessageIDInHeader; } + @Override public void setAddMessageIDInHeader(final boolean value) { addMessageIDInHeader = value; } + @Override public synchronized boolean isPaused() { return paused; } + @Override public synchronized boolean isFailed() { return failed; } + @Override public synchronized void setSourceConnectionFactoryFactory(final ConnectionFactoryFactory cff) { checkBridgeNotStarted(); JMSBridgeImpl.checkNotNull(cff, "SourceConnectionFactoryFactory"); @@ -743,6 +782,7 @@ public final class JMSBridgeImpl implements JMSBridge { sourceCff = cff; } + @Override public synchronized void setTargetConnectionFactoryFactory(final ConnectionFactoryFactory cff) { checkBridgeNotStarted(); JMSBridgeImpl.checkNotNull(cff, "TargetConnectionFactoryFactory"); @@ -750,6 +790,7 @@ public final class JMSBridgeImpl implements JMSBridge { targetCff = cff; } + @Override public void setTransactionManager(final TransactionManager tm) { this.tm = tm; } @@ -1562,6 +1603,7 @@ public final class JMSBridgeImpl implements JMSBridge { final Thread thr = new Thread(r); if (moduleTccl != null) { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { thr.setContextClassLoader(moduleTccl); return null; @@ -1706,6 +1748,7 @@ public final class JMSBridgeImpl implements JMSBridge { } } + @Override public void run() { if (JMSBridgeImpl.trace) { ActiveMQJMSBridgeLogger.LOGGER.trace("Failure handler running"); @@ -1771,6 +1814,7 @@ public final class JMSBridgeImpl implements JMSBridge { private class BatchTimeChecker implements Runnable { + @Override public void run() { if (JMSBridgeImpl.trace) { ActiveMQJMSBridgeLogger.LOGGER.trace(this + " running"); @@ -1841,6 +1885,7 @@ public final class JMSBridgeImpl implements JMSBridge { this.isSource = isSource; } + @Override public void onException(final JMSException e) { if (stopping) { return; @@ -1901,18 +1946,22 @@ public final class JMSBridgeImpl implements JMSBridge { } } + @Override public boolean isUseMaskedPassword() { return useMaskedPassword; } + @Override public void setUseMaskedPassword(boolean maskPassword) { this.useMaskedPassword = maskPassword; } + @Override public String getPasswordCodec() { return passwordCodec; } + @Override public void setPasswordCodec(String passwordCodec) { this.passwordCodec = passwordCodec; } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java index 15e6a225e8..9a9d41aafb 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIConnectionFactoryFactory.java @@ -26,6 +26,7 @@ public class JNDIConnectionFactoryFactory extends JNDIFactorySupport implements super(jndiProperties, lookup); } + @Override public Object createConnectionFactory() throws Exception { return createObject(); } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java index 3479267095..93877f2c36 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/bridge/impl/JNDIDestinationFactory.java @@ -28,6 +28,7 @@ public class JNDIDestinationFactory extends JNDIFactorySupport implements Destin super(jndiProperties, lookup); } + @Override public Destination createDestination() throws Exception { return (Destination) createObject(); } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSConnectionFactoryControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSConnectionFactoryControlImpl.java index efa1df541c..15f165e3ea 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSConnectionFactoryControlImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSConnectionFactoryControlImpl.java @@ -61,308 +61,377 @@ public class JMSConnectionFactoryControlImpl extends StandardMBean implements Co // ManagedConnectionFactoryMBean implementation ------------------ + @Override public String[] getRegistryBindings() { return jmsManager.getBindingsOnConnectionFactory(name); } + @Override public boolean isCompressLargeMessages() { return cf.isCompressLargeMessage(); } + @Override public void setCompressLargeMessages(final boolean compress) { cfConfig.setCompressLargeMessages(compress); recreateCF(); } + @Override public boolean isHA() { return cfConfig.isHA(); } + @Override public int getFactoryType() { return cfConfig.getFactoryType().intValue(); } + @Override public String getClientID() { return cfConfig.getClientID(); } + @Override public long getClientFailureCheckPeriod() { return cfConfig.getClientFailureCheckPeriod(); } + @Override public void setClientID(String clientID) { cfConfig.setClientID(clientID); recreateCF(); } + @Override public void setDupsOKBatchSize(int dupsOKBatchSize) { cfConfig.setDupsOKBatchSize(dupsOKBatchSize); recreateCF(); } + @Override public void setTransactionBatchSize(int transactionBatchSize) { cfConfig.setTransactionBatchSize(transactionBatchSize); recreateCF(); } + @Override public void setClientFailureCheckPeriod(long clientFailureCheckPeriod) { cfConfig.setClientFailureCheckPeriod(clientFailureCheckPeriod); recreateCF(); } + @Override public void setConnectionTTL(long connectionTTL) { cfConfig.setConnectionTTL(connectionTTL); recreateCF(); } + @Override public void setCallTimeout(long callTimeout) { cfConfig.setCallTimeout(callTimeout); recreateCF(); } + @Override public void setCallFailoverTimeout(long callTimeout) { cfConfig.setCallFailoverTimeout(callTimeout); recreateCF(); } + @Override public void setConsumerWindowSize(int consumerWindowSize) { cfConfig.setConsumerWindowSize(consumerWindowSize); recreateCF(); } + @Override public void setConsumerMaxRate(int consumerMaxRate) { cfConfig.setConsumerMaxRate(consumerMaxRate); recreateCF(); } + @Override public void setConfirmationWindowSize(int confirmationWindowSize) { cfConfig.setConfirmationWindowSize(confirmationWindowSize); recreateCF(); } + @Override public void setProducerMaxRate(int producerMaxRate) { cfConfig.setProducerMaxRate(producerMaxRate); recreateCF(); } + @Override public int getProducerWindowSize() { return cfConfig.getProducerWindowSize(); } + @Override public void setProducerWindowSize(int producerWindowSize) { cfConfig.setProducerWindowSize(producerWindowSize); recreateCF(); } + @Override public void setCacheLargeMessagesClient(boolean cacheLargeMessagesClient) { cfConfig.setCacheLargeMessagesClient(cacheLargeMessagesClient); recreateCF(); } + @Override public boolean isCacheLargeMessagesClient() { return cfConfig.isCacheLargeMessagesClient(); } + @Override public void setMinLargeMessageSize(int minLargeMessageSize) { cfConfig.setMinLargeMessageSize(minLargeMessageSize); recreateCF(); } + @Override public void setBlockOnNonDurableSend(boolean blockOnNonDurableSend) { cfConfig.setBlockOnNonDurableSend(blockOnNonDurableSend); recreateCF(); } + @Override public void setBlockOnAcknowledge(boolean blockOnAcknowledge) { cfConfig.setBlockOnAcknowledge(blockOnAcknowledge); recreateCF(); } + @Override public void setBlockOnDurableSend(boolean blockOnDurableSend) { cfConfig.setBlockOnDurableSend(blockOnDurableSend); recreateCF(); } + @Override public void setAutoGroup(boolean autoGroup) { cfConfig.setAutoGroup(autoGroup); recreateCF(); } + @Override public void setPreAcknowledge(boolean preAcknowledge) { cfConfig.setPreAcknowledge(preAcknowledge); recreateCF(); } + @Override public void setMaxRetryInterval(long retryInterval) { cfConfig.setMaxRetryInterval(retryInterval); recreateCF(); } + @Override public void setRetryIntervalMultiplier(double retryIntervalMultiplier) { cfConfig.setRetryIntervalMultiplier(retryIntervalMultiplier); recreateCF(); } + @Override public void setReconnectAttempts(int reconnectAttempts) { cfConfig.setReconnectAttempts(reconnectAttempts); recreateCF(); } + @Override public void setFailoverOnInitialConnection(boolean failover) { cfConfig.setFailoverOnInitialConnection(failover); recreateCF(); } + @Override public boolean isUseGlobalPools() { return cfConfig.isUseGlobalPools(); } + @Override public void setScheduledThreadPoolMaxSize(int scheduledThreadPoolMaxSize) { cfConfig.setScheduledThreadPoolMaxSize(scheduledThreadPoolMaxSize); recreateCF(); } + @Override public int getThreadPoolMaxSize() { return cfConfig.getThreadPoolMaxSize(); } + @Override public void setThreadPoolMaxSize(int threadPoolMaxSize) { cfConfig.setThreadPoolMaxSize(threadPoolMaxSize); recreateCF(); } + @Override public int getInitialMessagePacketSize() { return cf.getInitialMessagePacketSize(); } + @Override public void setGroupID(String groupID) { cfConfig.setGroupID(groupID); recreateCF(); } + @Override public String getGroupID() { return cfConfig.getGroupID(); } + @Override public void setUseGlobalPools(boolean useGlobalPools) { cfConfig.setUseGlobalPools(useGlobalPools); recreateCF(); } + @Override public int getScheduledThreadPoolMaxSize() { return cfConfig.getScheduledThreadPoolMaxSize(); } + @Override public void setRetryInterval(long retryInterval) { cfConfig.setRetryInterval(retryInterval); recreateCF(); } + @Override public long getMaxRetryInterval() { return cfConfig.getMaxRetryInterval(); } + @Override public String getConnectionLoadBalancingPolicyClassName() { return cfConfig.getLoadBalancingPolicyClassName(); } + @Override public void setConnectionLoadBalancingPolicyClassName(String name) { cfConfig.setLoadBalancingPolicyClassName(name); recreateCF(); } + @Override public TransportConfiguration[] getStaticConnectors() { return cf.getStaticConnectors(); } + @Override public DiscoveryGroupConfiguration getDiscoveryGroupConfiguration() { return cf.getDiscoveryGroupConfiguration(); } + @Override public void addBinding(@Parameter(name = "binding", desc = "the name of the binding for the Registry") String binding) throws Exception { jmsManager.addConnectionFactoryToBindingRegistry(name, binding); } + @Override public void removeBinding(@Parameter(name = "binding", desc = "the name of the binding for the Registry") String binding) throws Exception { jmsManager.removeConnectionFactoryFromBindingRegistry(name, binding); } + @Override public long getCallTimeout() { return cfConfig.getCallTimeout(); } + @Override public long getCallFailoverTimeout() { return cfConfig.getCallFailoverTimeout(); } + @Override public int getConsumerMaxRate() { return cfConfig.getConsumerMaxRate(); } + @Override public int getConsumerWindowSize() { return cfConfig.getConsumerWindowSize(); } + @Override public int getProducerMaxRate() { return cfConfig.getProducerMaxRate(); } + @Override public int getConfirmationWindowSize() { return cfConfig.getConfirmationWindowSize(); } + @Override public int getDupsOKBatchSize() { return cfConfig.getDupsOKBatchSize(); } + @Override public boolean isBlockOnAcknowledge() { return cfConfig.isBlockOnAcknowledge(); } + @Override public boolean isBlockOnNonDurableSend() { return cfConfig.isBlockOnNonDurableSend(); } + @Override public boolean isBlockOnDurableSend() { return cfConfig.isBlockOnDurableSend(); } + @Override public boolean isPreAcknowledge() { return cfConfig.isPreAcknowledge(); } + @Override public String getName() { return name; } + @Override public long getConnectionTTL() { return cfConfig.getConnectionTTL(); } + @Override public int getReconnectAttempts() { return cfConfig.getReconnectAttempts(); } + @Override public boolean isFailoverOnInitialConnection() { return cfConfig.isFailoverOnInitialConnection(); } + @Override public int getMinLargeMessageSize() { return cfConfig.getMinLargeMessageSize(); } + @Override public long getRetryInterval() { return cfConfig.getRetryInterval(); } + @Override public double getRetryIntervalMultiplier() { return cfConfig.getRetryIntervalMultiplier(); } + @Override public int getTransactionBatchSize() { return cfConfig.getTransactionBatchSize(); } + @Override public boolean isAutoGroup() { return cfConfig.isAutoGroup(); } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java index ff7a387bcb..b64a14f669 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSQueueControlImpl.java @@ -85,34 +85,42 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro // ManagedJMSQueueMBean implementation --------------------------- + @Override public String getName() { return managedQueue.getName(); } + @Override public String getAddress() { return managedQueue.getAddress(); } + @Override public boolean isTemporary() { return managedQueue.isTemporary(); } + @Override public long getMessageCount() { return coreQueueControl.getMessageCount(); } + @Override public long getMessagesAdded() { return coreQueueControl.getMessagesAdded(); } + @Override public int getConsumerCount() { return coreQueueControl.getConsumerCount(); } + @Override public int getDeliveringCount() { return coreQueueControl.getDeliveringCount(); } + @Override public long getScheduledCount() { return coreQueueControl.getScheduledCount(); } @@ -121,22 +129,27 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return coreQueueControl.isDurable(); } + @Override public String getDeadLetterAddress() { return coreQueueControl.getDeadLetterAddress(); } + @Override public String getExpiryAddress() { return coreQueueControl.getExpiryAddress(); } + @Override public String getFirstMessageAsJSON() throws Exception { return coreQueueControl.getFirstMessageAsJSON(); } + @Override public Long getFirstMessageTimestamp() throws Exception { return coreQueueControl.getFirstMessageTimestamp(); } + @Override public Long getFirstMessageAge() throws Exception { return coreQueueControl.getFirstMessageAge(); } @@ -146,10 +159,12 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro jmsServerManager.addQueueToBindingRegistry(managedQueue.getName(), binding); } + @Override public String[] getRegistryBindings() { return jmsServerManager.getBindingsOnQueue(managedQueue.getName()); } + @Override public boolean removeMessage(final String messageID) throws Exception { String filter = JMSQueueControlImpl.createFilterForJMSMessageID(messageID); int removed = coreQueueControl.removeMessages(filter); @@ -159,11 +174,13 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return true; } + @Override public int removeMessages(final String filterStr) throws Exception { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); return coreQueueControl.removeMessages(filter); } + @Override public Map[] listMessages(final String filterStr) throws Exception { try { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); @@ -224,15 +241,18 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return coreQueueControl.listDeliveringMessagesAsJSON(); } + @Override public String listMessagesAsJSON(final String filter) throws Exception { return JMSQueueControlImpl.toJSON(listMessages(filter)); } + @Override public long countMessages(final String filterStr) throws Exception { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); return coreQueueControl.countMessages(filter); } + @Override public boolean expireMessage(final String messageID) throws Exception { String filter = JMSQueueControlImpl.createFilterForJMSMessageID(messageID); int expired = coreQueueControl.expireMessages(filter); @@ -242,11 +262,13 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return true; } + @Override public int expireMessages(final String filterStr) throws Exception { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); return coreQueueControl.expireMessages(filter); } + @Override public boolean sendMessageToDeadLetterAddress(final String messageID) throws Exception { String filter = JMSQueueControlImpl.createFilterForJMSMessageID(messageID); int dead = coreQueueControl.sendMessagesToDeadLetterAddress(filter); @@ -256,11 +278,13 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return true; } + @Override public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); return coreQueueControl.sendMessagesToDeadLetterAddress(filter); } + @Override public boolean changeMessagePriority(final String messageID, final int newPriority) throws Exception { String filter = JMSQueueControlImpl.createFilterForJMSMessageID(messageID); int changed = coreQueueControl.changeMessagesPriority(filter, newPriority); @@ -270,11 +294,13 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return true; } + @Override public int changeMessagesPriority(final String filterStr, final int newPriority) throws Exception { String filter = JMSQueueControlImpl.createFilterFromJMSSelector(filterStr); return coreQueueControl.changeMessagesPriority(filter, newPriority); } + @Override public boolean retryMessage(final String jmsMessageID) throws Exception { // Figure out messageID from JMSMessageID. @@ -289,15 +315,18 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return messageID != null && coreQueueControl.retryMessage(messageID); } + @Override public int retryMessages() throws Exception { return coreQueueControl.retryMessages(); } + @Override public boolean moveMessage(final String messageID, final String otherQueueName) throws Exception { return moveMessage(messageID, otherQueueName, false); } + @Override public boolean moveMessage(final String messageID, final String otherQueueName, final boolean rejectDuplicates) throws Exception { @@ -311,6 +340,7 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return true; } + @Override public int moveMessages(final String filterStr, final String otherQueueName, final boolean rejectDuplicates) throws Exception { @@ -319,15 +349,18 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro return coreQueueControl.moveMessages(filter, otherQueue.getAddress(), rejectDuplicates); } + @Override public int moveMessages(final String filterStr, final String otherQueueName) throws Exception { return moveMessages(filterStr, otherQueueName, false); } + @Override @Operation(desc = "List all the existent consumers on the Queue") public String listConsumersAsJSON() throws Exception { return coreQueueControl.listConsumersAsJSON(); } + @Override public String listMessageCounter() { try { return MessageCounterInfo.toJSon(counter); @@ -337,38 +370,47 @@ public class JMSQueueControlImpl extends StandardMBean implements JMSQueueContro } } + @Override public void resetMessageCounter() throws Exception { coreQueueControl.resetMessageCounter(); } + @Override public String listMessageCounterAsHTML() { return MessageCounterHelper.listMessageCounterAsHTML(new MessageCounter[]{counter}); } + @Override public String listMessageCounterHistory() throws Exception { return MessageCounterHelper.listMessageCounterHistory(counter); } + @Override public String listMessageCounterHistoryAsHTML() { return MessageCounterHelper.listMessageCounterHistoryAsHTML(new MessageCounter[]{counter}); } + @Override public boolean isPaused() throws Exception { return coreQueueControl.isPaused(); } + @Override public void pause() throws Exception { coreQueueControl.pause(); } + @Override public void resume() throws Exception { coreQueueControl.resume(); } + @Override public String getSelector() { return coreQueueControl.getFilter(); } + @Override public void flushExecutor() { coreQueueControl.flushExecutor(); } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java index eacc91f9ee..5c0aea8fc3 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSServerControlImpl.java @@ -143,6 +143,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo /** * See the interface definition for the javadoc. */ + @Override public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, @@ -284,6 +285,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo *
* The ConnectionFactory is bound to the Registry for all the specified bindings Strings. */ + @Override public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, @@ -293,10 +295,12 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo createConnectionFactory(name, ha, useDiscovery, cfType, toArray(connectors), toArray(bindings)); } + @Override public boolean createQueue(final String name) throws Exception { return createQueue(name, null, null, true); } + @Override public boolean createQueue(final String name, final String bindings) throws Exception { return createQueue(name, bindings, null, true); } @@ -306,6 +310,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo return createQueue(name, bindings, selector, true); } + @Override public boolean createQueue(@Parameter(name = "name", desc = "Name of the queue to create") String name, @Parameter(name = "bindings", desc = "comma-separated list of Registry bindings (use ',' if u need to use commas in your bindings name)") String bindings, @Parameter(name = "selector", desc = "the jms selector") String selector, @@ -322,10 +327,12 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean destroyQueue(final String name) throws Exception { return destroyQueue(name, false); } + @Override public boolean destroyQueue(final String name, final boolean removeConsumers) throws Exception { checkStarted(); @@ -339,10 +346,12 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean createTopic(String name) throws Exception { return createTopic(name, null); } + @Override public boolean createTopic(final String topicName, final String bindings) throws Exception { checkStarted(); @@ -356,10 +365,12 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean destroyTopic(final String name) throws Exception { return destroyTopic(name, true); } + @Override public boolean destroyTopic(final String name, final boolean removeConsumers) throws Exception { checkStarted(); @@ -373,6 +384,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public void destroyConnectionFactory(final String name) throws Exception { checkStarted(); @@ -386,16 +398,19 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean isStarted() { return server.isStarted(); } + @Override public String getVersion() { checkStarted(); return server.getVersion(); } + @Override public String[] getQueueNames() { checkStarted(); @@ -415,6 +430,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String[] getTopicNames() { checkStarted(); @@ -434,6 +450,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String[] getConnectionFactoryNames() { checkStarted(); @@ -455,26 +472,31 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo // NotificationEmitter implementation ---------------------------- + @Override public void removeNotificationListener(final NotificationListener listener, final NotificationFilter filter, final Object handback) throws ListenerNotFoundException { broadcaster.removeNotificationListener(listener, filter, handback); } + @Override public void removeNotificationListener(final NotificationListener listener) throws ListenerNotFoundException { broadcaster.removeNotificationListener(listener); } + @Override public void addNotificationListener(final NotificationListener listener, final NotificationFilter filter, final Object handback) throws IllegalArgumentException { broadcaster.addNotificationListener(listener, filter, handback); } + @Override public MBeanNotificationInfo[] getNotificationInfo() { return JMSServerControlImpl.getNotificationInfos(); } + @Override public String[] listRemoteAddresses() throws Exception { checkStarted(); @@ -488,6 +510,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String[] listRemoteAddresses(final String ipAddress) throws Exception { checkStarted(); @@ -501,6 +524,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean closeConnectionsForAddress(final String ipAddress) throws Exception { checkStarted(); @@ -514,6 +538,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean closeConsumerConnectionsForAddress(final String address) throws Exception { checkStarted(); @@ -527,6 +552,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public boolean closeConnectionsForUser(final String userName) throws Exception { checkStarted(); @@ -540,6 +566,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String[] listConnectionIDs() throws Exception { checkStarted(); @@ -553,6 +580,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String listConnectionsAsJSON() throws Exception { checkStarted(); @@ -594,6 +622,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String listConsumersAsJSON(String connectionID) throws Exception { checkStarted(); @@ -624,6 +653,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String listAllConsumersAsJSON() throws Exception { checkStarted(); @@ -649,6 +679,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String[] listSessions(final String connectionID) throws Exception { checkStarted(); @@ -662,6 +693,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String listPreparedTransactionDetailsAsJSON() throws Exception { checkStarted(); @@ -675,6 +707,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo } } + @Override public String listPreparedTransactionDetailsAsHTML() throws Exception { checkStarted(); @@ -709,6 +742,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo // Inner classes ------------------------------------------------- + @Override public String[] listTargetDestinations(String sessionID) throws Exception { String[] addresses = server.getActiveMQServer().getActiveMQServerControl().listTargetAddresses(sessionID); Map allDests = new HashMap(); @@ -735,6 +769,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo return destinations.toArray(new String[0]); } + @Override public String getLastSentMessageID(String sessionID, String address) throws Exception { ServerSession session = server.getActiveMQServer().getSessionByID(sessionID); if (session != null) { @@ -743,6 +778,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo return null; } + @Override public String getSessionCreationTime(String sessionID) throws Exception { ServerSession session = server.getActiveMQServer().getSessionByID(sessionID); if (session != null) { @@ -751,6 +787,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo return null; } + @Override public String listSessionsAsJSON(final String connectionID) throws Exception { checkStarted(); @@ -772,6 +809,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo return array.toString(); } + @Override public String closeConnectionWithClientID(final String clientID) throws Exception { return server.getActiveMQServer().destroyConnectionWithSessionMetadata(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java index 213f243513..e7711aee6e 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/management/impl/JMSTopicControlImpl.java @@ -76,26 +76,32 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { jmsServerManager.addTopicToBindingRegistry(managedTopic.getName(), binding); } + @Override public String[] getRegistryBindings() { return jmsServerManager.getBindingsOnTopic(managedTopic.getName()); } + @Override public String getName() { return managedTopic.getName(); } + @Override public boolean isTemporary() { return managedTopic.isTemporary(); } + @Override public String getAddress() { return managedTopic.getAddress(); } + @Override public long getMessageCount() { return getMessageCount(DurabilityType.ALL); } + @Override public int getDeliveringCount() { List queues = getQueues(DurabilityType.ALL); int count = 0; @@ -105,6 +111,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { return count; } + @Override public long getMessagesAdded() { List queues = getQueues(DurabilityType.ALL); int count = 0; @@ -114,50 +121,62 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { return count; } + @Override public int getDurableMessageCount() { return getMessageCount(DurabilityType.DURABLE); } + @Override public int getNonDurableMessageCount() { return getMessageCount(DurabilityType.NON_DURABLE); } + @Override public int getSubscriptionCount() { return getQueues(DurabilityType.ALL).size(); } + @Override public int getDurableSubscriptionCount() { return getQueues(DurabilityType.DURABLE).size(); } + @Override public int getNonDurableSubscriptionCount() { return getQueues(DurabilityType.NON_DURABLE).size(); } + @Override public Object[] listAllSubscriptions() { return listSubscribersInfos(DurabilityType.ALL); } + @Override public String listAllSubscriptionsAsJSON() throws Exception { return listSubscribersInfosAsJSON(DurabilityType.ALL); } + @Override public Object[] listDurableSubscriptions() { return listSubscribersInfos(DurabilityType.DURABLE); } + @Override public String listDurableSubscriptionsAsJSON() throws Exception { return listSubscribersInfosAsJSON(DurabilityType.DURABLE); } + @Override public Object[] listNonDurableSubscriptions() { return listSubscribersInfos(DurabilityType.NON_DURABLE); } + @Override public String listNonDurableSubscriptionsAsJSON() throws Exception { return listSubscribersInfosAsJSON(DurabilityType.NON_DURABLE); } + @Override public Map[] listMessagesForSubscription(final String queueName) throws Exception { QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE + queueName); if (coreQueueControl == null) { @@ -176,10 +195,12 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { return jmsMessages; } + @Override public String listMessagesForSubscriptionAsJSON(final String queueName) throws Exception { return JMSQueueControlImpl.toJSON(listMessagesForSubscription(queueName)); } + @Override public int countMessagesForSubscription(final String clientID, final String subscriptionName, final String filterStr) throws Exception { @@ -192,6 +213,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { return coreQueueControl.listMessages(filter).length; } + @Override public int removeMessages(final String filterStr) throws Exception { String filter = JMSTopicControlImpl.createFilterFromJMSSelector(filterStr); int count = 0; @@ -206,6 +228,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { return count; } + @Override public void dropDurableSubscription(final String clientID, final String subscriptionName) throws Exception { String queueName = ActiveMQDestination.createQueueNameForDurableSubscription(true, clientID, subscriptionName); QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE + queueName); @@ -216,6 +239,7 @@ public class JMSTopicControlImpl extends StandardMBean implements TopicControl { serverControl.destroyQueue(queueName); } + @Override public void dropAllSubscriptions() throws Exception { ActiveMQServerControl serverControl = (ActiveMQServerControl) managementService.getResource(ResourceNames.CORE_SERVER); String[] queues = addressControl.getQueueNames(); diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/config/PersistedDestination.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/config/PersistedDestination.java index a1097fe61c..602f982e26 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/config/PersistedDestination.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/config/PersistedDestination.java @@ -91,6 +91,7 @@ public class PersistedDestination implements EncodingSupport { return durable; } + @Override public int getEncodeSize() { return DataConstants.SIZE_BYTE + BufferHelper.sizeOfSimpleString(name) + @@ -98,6 +99,7 @@ public class PersistedDestination implements EncodingSupport { DataConstants.SIZE_BOOLEAN; } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(type.getType()); buffer.writeSimpleString(SimpleString.toSimpleString(name)); @@ -105,6 +107,7 @@ public class PersistedDestination implements EncodingSupport { buffer.writeBoolean(durable); } + @Override public void decode(final ActiveMQBuffer buffer) { type = PersistedType.getType(buffer.readByte()); name = buffer.readSimpleString().toString(); diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java index 7d7c37d844..dc9314913d 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java @@ -114,6 +114,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { mapFactories.put(connectionFactory.getName(), connectionFactory); } + @Override public void deleteConnectionFactory(final String cfName) throws Exception { PersistedConnectionFactory oldCF = mapFactories.remove(cfName); if (oldCF != null) { @@ -136,11 +137,13 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { destinations.put(new Pair(destination.getType(), destination.getName()), destination); } + @Override public List recoverPersistedBindings() throws Exception { ArrayList list = new ArrayList(mapBindings.values()); return list; } + @Override public void addBindings(PersistedType type, String name, String... address) throws Exception { Pair key = new Pair(type, name); @@ -169,6 +172,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { jmsJournal.appendCommitRecord(tx, true); } + @Override public void deleteBindings(PersistedType type, String name, String address) throws Exception { Pair key = new Pair(type, name); @@ -196,6 +200,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { jmsJournal.appendCommitRecord(tx, true); } + @Override public void deleteBindings(PersistedType type, String name) throws Exception { Pair key = new Pair(type, name); @@ -206,6 +211,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { } } + @Override public void deleteDestination(final PersistedType type, final String name) throws Exception { PersistedDestination destination = destinations.remove(new Pair(type, name)); if (destination != null) { @@ -233,6 +239,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager { jmsJournal.stop(); } + @Override public void load() throws Exception { mapFactories.clear(); diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java index 7f6bb88d2f..879e7cb166 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/JMSServerManager.java @@ -40,6 +40,7 @@ public interface JMSServerManager extends ActiveMQComponent { * * @return true if the server us running */ + @Override boolean isStarted(); /** diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java index b5efcd7690..187d6c4673 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/ConnectionFactoryConfigurationImpl.java @@ -127,24 +127,29 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf // ConnectionFactoryConfiguration implementation ----------------- + @Override public String[] getBindings() { return bindings; } + @Override public ConnectionFactoryConfiguration setBindings(final String... bindings) { this.bindings = bindings; return this; } + @Override public String getName() { return name; } + @Override public ConnectionFactoryConfiguration setName(String name) { this.name = name; return this; } + @Override public boolean isPersisted() { return persisted; } @@ -152,6 +157,7 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf /** * @return the discoveryGroupName */ + @Override public String getDiscoveryGroupName() { return discoveryGroupName; } @@ -159,209 +165,255 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf /** * @param discoveryGroupName the discoveryGroupName to set */ + @Override public ConnectionFactoryConfiguration setDiscoveryGroupName(String discoveryGroupName) { this.discoveryGroupName = discoveryGroupName; return this; } + @Override public List getConnectorNames() { return connectorNames; } + @Override public ConnectionFactoryConfiguration setConnectorNames(final List connectorNames) { this.connectorNames = connectorNames; return this; } + @Override public ConnectionFactoryConfiguration setConnectorNames(final String...names) { return this.setConnectorNames(Arrays.asList(names)); } + @Override public boolean isHA() { return ha; } + @Override public ConnectionFactoryConfiguration setHA(final boolean ha) { this.ha = ha; return this; } + @Override public String getClientID() { return clientID; } + @Override public ConnectionFactoryConfiguration setClientID(final String clientID) { this.clientID = clientID; return this; } + @Override public long getClientFailureCheckPeriod() { return clientFailureCheckPeriod; } + @Override public ConnectionFactoryConfiguration setClientFailureCheckPeriod(final long clientFailureCheckPeriod) { this.clientFailureCheckPeriod = clientFailureCheckPeriod; return this; } + @Override public long getConnectionTTL() { return connectionTTL; } + @Override public ConnectionFactoryConfiguration setConnectionTTL(final long connectionTTL) { this.connectionTTL = connectionTTL; return this; } + @Override public long getCallTimeout() { return callTimeout; } + @Override public ConnectionFactoryConfiguration setCallTimeout(final long callTimeout) { this.callTimeout = callTimeout; return this; } + @Override public long getCallFailoverTimeout() { return callFailoverTimeout; } + @Override public ConnectionFactoryConfiguration setCallFailoverTimeout(long callFailoverTimeout) { this.callFailoverTimeout = callFailoverTimeout; return this; } + @Override public boolean isCacheLargeMessagesClient() { return cacheLargeMessagesClient; } + @Override public ConnectionFactoryConfiguration setCacheLargeMessagesClient(final boolean cacheLargeMessagesClient) { this.cacheLargeMessagesClient = cacheLargeMessagesClient; return this; } + @Override public int getMinLargeMessageSize() { return minLargeMessageSize; } + @Override public ConnectionFactoryConfiguration setMinLargeMessageSize(final int minLargeMessageSize) { this.minLargeMessageSize = minLargeMessageSize; return this; } + @Override public int getConsumerWindowSize() { return consumerWindowSize; } + @Override public ConnectionFactoryConfiguration setConsumerWindowSize(final int consumerWindowSize) { this.consumerWindowSize = consumerWindowSize; return this; } + @Override public int getConsumerMaxRate() { return consumerMaxRate; } + @Override public ConnectionFactoryConfiguration setConsumerMaxRate(final int consumerMaxRate) { this.consumerMaxRate = consumerMaxRate; return this; } + @Override public int getConfirmationWindowSize() { return confirmationWindowSize; } + @Override public ConnectionFactoryConfiguration setConfirmationWindowSize(final int confirmationWindowSize) { this.confirmationWindowSize = confirmationWindowSize; return this; } + @Override public int getProducerMaxRate() { return producerMaxRate; } + @Override public ConnectionFactoryConfiguration setProducerMaxRate(final int producerMaxRate) { this.producerMaxRate = producerMaxRate; return this; } + @Override public int getProducerWindowSize() { return producerWindowSize; } + @Override public ConnectionFactoryConfiguration setProducerWindowSize(final int producerWindowSize) { this.producerWindowSize = producerWindowSize; return this; } + @Override public boolean isBlockOnAcknowledge() { return blockOnAcknowledge; } + @Override public ConnectionFactoryConfiguration setBlockOnAcknowledge(final boolean blockOnAcknowledge) { this.blockOnAcknowledge = blockOnAcknowledge; return this; } + @Override public boolean isBlockOnDurableSend() { return blockOnDurableSend; } + @Override public ConnectionFactoryConfiguration setBlockOnDurableSend(final boolean blockOnDurableSend) { this.blockOnDurableSend = blockOnDurableSend; return this; } + @Override public boolean isBlockOnNonDurableSend() { return blockOnNonDurableSend; } + @Override public ConnectionFactoryConfiguration setBlockOnNonDurableSend(final boolean blockOnNonDurableSend) { this.blockOnNonDurableSend = blockOnNonDurableSend; return this; } + @Override public boolean isAutoGroup() { return autoGroup; } + @Override public ConnectionFactoryConfiguration setAutoGroup(final boolean autoGroup) { this.autoGroup = autoGroup; return this; } + @Override public boolean isPreAcknowledge() { return preAcknowledge; } + @Override public ConnectionFactoryConfiguration setPreAcknowledge(final boolean preAcknowledge) { this.preAcknowledge = preAcknowledge; return this; } + @Override public String getLoadBalancingPolicyClassName() { return loadBalancingPolicyClassName; } + @Override public ConnectionFactoryConfiguration setLoadBalancingPolicyClassName(final String loadBalancingPolicyClassName) { this.loadBalancingPolicyClassName = loadBalancingPolicyClassName; return this; } + @Override public int getTransactionBatchSize() { return transactionBatchSize; } + @Override public ConnectionFactoryConfiguration setTransactionBatchSize(final int transactionBatchSize) { this.transactionBatchSize = transactionBatchSize; return this; } + @Override public int getDupsOKBatchSize() { return dupsOKBatchSize; } + @Override public ConnectionFactoryConfiguration setDupsOKBatchSize(final int dupsOKBatchSize) { this.dupsOKBatchSize = dupsOKBatchSize; return this; @@ -376,82 +428,100 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf return this; } + @Override public boolean isUseGlobalPools() { return useGlobalPools; } + @Override public ConnectionFactoryConfiguration setUseGlobalPools(final boolean useGlobalPools) { this.useGlobalPools = useGlobalPools; return this; } + @Override public int getScheduledThreadPoolMaxSize() { return scheduledThreadPoolMaxSize; } + @Override public ConnectionFactoryConfiguration setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize) { this.scheduledThreadPoolMaxSize = scheduledThreadPoolMaxSize; return this; } + @Override public int getThreadPoolMaxSize() { return threadPoolMaxSize; } + @Override public ConnectionFactoryConfiguration setThreadPoolMaxSize(final int threadPoolMaxSize) { this.threadPoolMaxSize = threadPoolMaxSize; return this; } + @Override public long getRetryInterval() { return retryInterval; } + @Override public ConnectionFactoryConfiguration setRetryInterval(final long retryInterval) { this.retryInterval = retryInterval; return this; } + @Override public double getRetryIntervalMultiplier() { return retryIntervalMultiplier; } + @Override public ConnectionFactoryConfiguration setRetryIntervalMultiplier(final double retryIntervalMultiplier) { this.retryIntervalMultiplier = retryIntervalMultiplier; return this; } + @Override public long getMaxRetryInterval() { return maxRetryInterval; } + @Override public ConnectionFactoryConfiguration setMaxRetryInterval(final long maxRetryInterval) { this.maxRetryInterval = maxRetryInterval; return this; } + @Override public int getReconnectAttempts() { return reconnectAttempts; } + @Override public ConnectionFactoryConfiguration setReconnectAttempts(final int reconnectAttempts) { this.reconnectAttempts = reconnectAttempts; return this; } + @Override public boolean isFailoverOnInitialConnection() { return failoverOnInitialConnection; } + @Override public ConnectionFactoryConfiguration setFailoverOnInitialConnection(final boolean failover) { failoverOnInitialConnection = failover; return this; } + @Override public String getGroupID() { return groupID; } + @Override public ConnectionFactoryConfiguration setGroupID(final String groupID) { this.groupID = groupID; return this; @@ -744,11 +814,13 @@ public class ConnectionFactoryConfigurationImpl implements ConnectionFactoryConf return size; } + @Override public ConnectionFactoryConfiguration setFactoryType(final JMSFactoryType factoryType) { this.factoryType = factoryType; return this; } + @Override public JMSFactoryType getFactoryType() { return factoryType; } diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSConfigurationImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSConfigurationImpl.java index 9b36cfc210..eb058c6c8d 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSConfigurationImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSConfigurationImpl.java @@ -40,37 +40,45 @@ public class JMSConfigurationImpl implements JMSConfiguration { public JMSConfigurationImpl() { } + @Override public List getConnectionFactoryConfigurations() { return connectionFactoryConfigurations; } + @Override public JMSConfigurationImpl setConnectionFactoryConfigurations(List connectionFactoryConfigurations) { this.connectionFactoryConfigurations = connectionFactoryConfigurations; return this; } + @Override public List getQueueConfigurations() { return queueConfigurations; } + @Override public JMSConfigurationImpl setQueueConfigurations(List queueConfigurations) { this.queueConfigurations = queueConfigurations; return this; } + @Override public List getTopicConfigurations() { return topicConfigurations; } + @Override public JMSConfigurationImpl setTopicConfigurations(List topicConfigurations) { this.topicConfigurations = topicConfigurations; return this; } + @Override public String getDomain() { return domain; } + @Override public JMSConfigurationImpl setDomain(final String domain) { this.domain = domain; return this; diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSQueueConfigurationImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSQueueConfigurationImpl.java index 52be423043..fbf77d4d82 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSQueueConfigurationImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/JMSQueueConfigurationImpl.java @@ -41,37 +41,45 @@ public class JMSQueueConfigurationImpl implements JMSQueueConfiguration { // QueueConfiguration implementation ----------------------------- + @Override public String[] getBindings() { return bindings; } + @Override public JMSQueueConfigurationImpl setBindings(String... bindings) { this.bindings = bindings; return this; } + @Override public String getName() { return name; } + @Override public JMSQueueConfigurationImpl setName(String name) { this.name = name; return this; } + @Override public String getSelector() { return selector; } + @Override public JMSQueueConfigurationImpl setSelector(String selector) { this.selector = selector; return this; } + @Override public boolean isDurable() { return durable; } + @Override public JMSQueueConfigurationImpl setDurable(boolean durable) { this.durable = durable; return this; diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/TopicConfigurationImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/TopicConfigurationImpl.java index e8ad224c6b..1617db2e10 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/TopicConfigurationImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/config/impl/TopicConfigurationImpl.java @@ -37,19 +37,23 @@ public class TopicConfigurationImpl implements TopicConfiguration { // TopicConfiguration implementation ----------------------------- + @Override public String[] getBindings() { return bindings; } + @Override public TopicConfigurationImpl setBindings(String... bindings) { this.bindings = bindings; return this; } + @Override public String getName() { return name; } + @Override public TopicConfigurationImpl setName(String name) { this.name = name; return this; diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java index 9361e8efcb..50c279ce6c 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java @@ -166,10 +166,12 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback // ActivateCallback implementation ------------------------------------- + @Override public void preActivate() { } + @Override public synchronized void activated() { if (!startCalled) { return; @@ -362,6 +364,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback * must already be true. * */ + @Override public synchronized void start() throws Exception { if (startCalled) { return; @@ -382,6 +385,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } + @Override public void stop() throws Exception { synchronized (this) { if (!startCalled) { @@ -400,46 +404,56 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback server.stop(); } + @Override public boolean isStarted() { return server.isStarted(); } // JMSServerManager implementation ------------------------------- + @Override public BindingRegistry getRegistry() { return registry; } + @Override public void setRegistry(BindingRegistry registry) { this.registry = registry; } + @Override public ActiveMQServer getActiveMQServer() { return server; } + @Override public void addAddressSettings(final String address, final AddressSettings addressSettings) { server.getAddressSettingsRepository().addMatch(address, addressSettings); } + @Override public AddressSettings getAddressSettings(final String address) { return server.getAddressSettingsRepository().getMatch(address); } + @Override public void addSecurity(final String addressMatch, final Set roles) { server.getSecurityRepository().addMatch(addressMatch, roles); } + @Override public Set getSecurity(final String addressMatch) { return server.getSecurityRepository().getMatch(addressMatch); } + @Override public synchronized String getVersion() { checkInitialised(); return server.getVersion().getFullVersion(); } + @Override public synchronized boolean createQueue(final boolean storeConfig, final String queueName, final String selectorString, @@ -506,6 +520,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return true; } + @Override public synchronized boolean createTopic(final boolean storeConfig, final String topicName, final String... bindings) throws Exception { @@ -557,6 +572,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } + @Override public boolean addTopicToBindingRegistry(final String topicName, final String registryBinding) throws Exception { checkInitialised(); @@ -578,18 +594,22 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return added; } + @Override public String[] getBindingsOnQueue(String queue) { return getBindingsList(queueBindings, queue); } + @Override public String[] getBindingsOnTopic(String topic) { return getBindingsList(topicBindings, topic); } + @Override public String[] getBindingsOnConnectionFactory(String factoryName) { return getBindingsList(connectionFactoryBindings, factoryName); } + @Override public boolean addQueueToBindingRegistry(final String queueName, final String registryBinding) throws Exception { checkInitialised(); @@ -610,6 +630,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return added; } + @Override public boolean addConnectionFactoryToBindingRegistry(final String name, final String registryBinding) throws Exception { checkInitialised(); @@ -685,6 +706,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback /* (non-Javadoc) * @see org.apache.activemq.artemis.jms.server.JMSServerManager#removeTopicFromBindings(java.lang.String, java.lang.String) */ + @Override public boolean removeTopicFromBindingRegistry(final String name) throws Exception { final AtomicBoolean valueReturn = new AtomicBoolean(false); @@ -731,10 +753,12 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return true; } + @Override public synchronized boolean destroyQueue(final String name) throws Exception { return destroyQueue(name, true); } + @Override public synchronized boolean destroyQueue(final String name, final boolean removeConsumers) throws Exception { checkInitialised(); @@ -760,10 +784,12 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } + @Override public synchronized boolean destroyTopic(final String name) throws Exception { return destroyTopic(name, true); } + @Override public synchronized boolean destroyTopic(final String name, final boolean removeConsumers) throws Exception { checkInitialised(); AddressControl addressControl = (AddressControl) server.getManagementService().getResource(ResourceNames.CORE_ADDRESS + ActiveMQDestination.createTopicAddressFromName(name)); @@ -803,6 +829,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } + @Override public synchronized void createConnectionFactory(final String name, final boolean ha, final JMSFactoryType cfType, @@ -817,6 +844,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } + @Override public synchronized void createConnectionFactory(final String name, final boolean ha, JMSFactoryType cfType, @@ -861,6 +889,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } + @Override public synchronized void createConnectionFactory(final String name, final boolean ha, final JMSFactoryType cfType, @@ -904,6 +933,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } + @Override public synchronized void createConnectionFactory(final String name, final boolean ha, final JMSFactoryType cfType, @@ -917,6 +947,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback } } + @Override public synchronized ActiveMQConnectionFactory recreateCF(String name, ConnectionFactoryConfiguration cf) throws Exception { List bindings = connectionFactoryBindings.get(name); @@ -941,6 +972,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return realCF; } + @Override public synchronized void createConnectionFactory(final boolean storeConfig, final ConnectionFactoryConfiguration cfConfig, final String... bindings) throws Exception { @@ -1171,6 +1203,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return cf; } + @Override public synchronized boolean destroyConnectionFactory(final String name) throws Exception { final AtomicBoolean valueReturn = new AtomicBoolean(false); @@ -1220,40 +1253,48 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return true; } + @Override public String[] listRemoteAddresses() throws Exception { checkInitialised(); return server.getActiveMQServerControl().listRemoteAddresses(); } + @Override public String[] listRemoteAddresses(final String ipAddress) throws Exception { checkInitialised(); return server.getActiveMQServerControl().listRemoteAddresses(ipAddress); } + @Override public boolean closeConnectionsForAddress(final String ipAddress) throws Exception { checkInitialised(); return server.getActiveMQServerControl().closeConnectionsForAddress(ipAddress); } + @Override public boolean closeConsumerConnectionsForAddress(final String address) throws Exception { checkInitialised(); return server.getActiveMQServerControl().closeConsumerConnectionsForAddress(address); } + @Override public boolean closeConnectionsForUser(final String userName) throws Exception { checkInitialised(); return server.getActiveMQServerControl().closeConnectionsForUser(userName); } + @Override public String[] listConnectionIDs() throws Exception { return server.getActiveMQServerControl().listConnectionIDs(); } + @Override public String[] listSessions(final String connectionID) throws Exception { checkInitialised(); return server.getActiveMQServerControl().listSessions(connectionID); } + @Override public String listPreparedTransactionDetailsAsJSON() throws Exception { ResourceManager resourceManager = server.getResourceManager(); Map xids = resourceManager.getPreparedTransactionsWithCreationTime(); @@ -1263,6 +1304,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback ArrayList> xidsSortedByCreationTime = new ArrayList>(xids.entrySet()); Collections.sort(xidsSortedByCreationTime, new Comparator>() { + @Override public int compare(final Entry entry1, final Entry entry2) { // sort by creation time, oldest first return (int) (entry1.getValue() - entry2.getValue()); @@ -1282,6 +1324,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback return txDetailListJson.toString(); } + @Override public String listPreparedTransactionDetailsAsHTML() throws Exception { ResourceManager resourceManager = server.getResourceManager(); Map xids = resourceManager.getPreparedTransactionsWithCreationTime(); @@ -1291,6 +1334,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback ArrayList> xidsSortedByCreationTime = new ArrayList>(xids.entrySet()); Collections.sort(xidsSortedByCreationTime, new Comparator>() { + @Override public int compare(final Entry entry1, final Entry entry2) { // sort by creation time, oldest first return (int) (entry1.getValue() - entry2.getValue()); @@ -1536,6 +1580,7 @@ public class JMSServerManagerImpl implements JMSServerManager, ActivateCallback private abstract class WrappedRunnable implements Runnable { + @Override public void run() { try { runException(); diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/management/impl/JMSManagementServiceImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/management/impl/JMSManagementServiceImpl.java index 9549d91ba7..0c56e247fa 100644 --- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/management/impl/JMSManagementServiceImpl.java +++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/management/impl/JMSManagementServiceImpl.java @@ -64,6 +64,7 @@ public class JMSManagementServiceImpl implements JMSManagementService { // JMSManagementRegistration implementation ---------------------- + @Override public synchronized JMSServerControl registerJMSServer(final JMSServerManager server) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getJMSServerObjectName(); JMSServerControlImpl control = new JMSServerControlImpl(server); @@ -72,12 +73,14 @@ public class JMSManagementServiceImpl implements JMSManagementService { return control; } + @Override public synchronized void unregisterJMSServer() throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getJMSServerObjectName(); managementService.unregisterFromJMX(objectName); managementService.unregisterFromRegistry(ResourceNames.JMS_SERVER); } + @Override public synchronized void registerQueue(final ActiveMQQueue queue, final Queue serverQueue) throws Exception { QueueControl coreQueueControl = (QueueControl) managementService.getResource(ResourceNames.CORE_QUEUE + queue.getAddress()); MessageCounterManager messageCounterManager = managementService.getMessageCounterManager(); @@ -89,12 +92,14 @@ public class JMSManagementServiceImpl implements JMSManagementService { managementService.registerInRegistry(ResourceNames.JMS_QUEUE + queue.getQueueName(), control); } + @Override public synchronized void unregisterQueue(final String name) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getJMSQueueObjectName(name); managementService.unregisterFromJMX(objectName); managementService.unregisterFromRegistry(ResourceNames.JMS_QUEUE + name); } + @Override public synchronized void registerTopic(final ActiveMQTopic topic) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getJMSTopicObjectName(topic.getTopicName()); AddressControl addressControl = (AddressControl) managementService.getResource(ResourceNames.CORE_ADDRESS + topic.getAddress()); @@ -103,12 +108,14 @@ public class JMSManagementServiceImpl implements JMSManagementService { managementService.registerInRegistry(ResourceNames.JMS_TOPIC + topic.getTopicName(), control); } + @Override public synchronized void unregisterTopic(final String name) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getJMSTopicObjectName(name); managementService.unregisterFromJMX(objectName); managementService.unregisterFromRegistry(ResourceNames.JMS_TOPIC + name); } + @Override public synchronized void registerConnectionFactory(final String name, final ConnectionFactoryConfiguration cfConfig, final ActiveMQConnectionFactory connectionFactory) throws Exception { @@ -118,12 +125,14 @@ public class JMSManagementServiceImpl implements JMSManagementService { managementService.registerInRegistry(ResourceNames.JMS_CONNECTION_FACTORY + name, control); } + @Override public synchronized void unregisterConnectionFactory(final String name) throws Exception { ObjectName objectName = managementService.getObjectNameBuilder().getConnectionFactoryObjectName(name); managementService.unregisterFromJMX(objectName); managementService.unregisterFromRegistry(ResourceNames.JMS_CONNECTION_FACTORY + name); } + @Override public void stop() throws Exception { for (Object resource : managementService.getResources(ConnectionFactoryControl.class)) { unregisterConnectionFactory(((ConnectionFactoryControl) resource).getName()); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java index dcb22ab37f..43142674d7 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java @@ -78,14 +78,17 @@ public abstract class AbstractSequentialFile implements SequentialFile { // Public -------------------------------------------------------- + @Override public final boolean exists() { return file.exists(); } + @Override public final String getFileName() { return file.getName(); } + @Override public final void delete() throws IOException, InterruptedException, ActiveMQException { if (isOpen()) { close(); @@ -96,6 +99,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public void copyTo(SequentialFile newFileName) throws Exception { try { ActiveMQJournalLogger.LOGGER.debug("Copying " + this + " as " + newFileName); @@ -134,10 +138,12 @@ public abstract class AbstractSequentialFile implements SequentialFile { position.set(pos); } + @Override public long position() { return position.get(); } + @Override public final void renameTo(final String newFileName) throws IOException, InterruptedException, ActiveMQException { try { close(); @@ -161,11 +167,13 @@ public abstract class AbstractSequentialFile implements SequentialFile { * @throws IOException we declare throwing IOException because sub-classes need to do it * @throws ActiveMQException */ + @Override public synchronized void close() throws IOException, InterruptedException, ActiveMQException { final CountDownLatch donelatch = new CountDownLatch(1); if (writerExecutor != null) { writerExecutor.execute(new Runnable() { + @Override public void run() { donelatch.countDown(); } @@ -177,6 +185,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public final boolean fits(final int size) { if (timedBuffer == null) { return position.get() + size <= fileSize; @@ -186,6 +195,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public void setTimedBuffer(final TimedBuffer buffer) { if (timedBuffer != null) { timedBuffer.setObserver(null); @@ -199,6 +209,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } + @Override public void write(final ActiveMQBuffer bytes, final boolean sync, final IOCallback callback) throws IOException { if (timedBuffer != null) { bytes.setIndex(0, bytes.capacity()); @@ -212,6 +223,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public void write(final ActiveMQBuffer bytes, final boolean sync) throws IOException, InterruptedException, ActiveMQException { if (sync) { @@ -226,6 +238,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public void write(final EncodingSupport bytes, final boolean sync, final IOCallback callback) { if (timedBuffer != null) { timedBuffer.addBytes(bytes, sync, callback); @@ -244,6 +257,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public void write(final EncodingSupport bytes, final boolean sync) throws InterruptedException, ActiveMQException { if (sync) { SimpleWaitIOCallback completion = new SimpleWaitIOCallback(); @@ -269,6 +283,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { this.delegates = delegates; } + @Override public void done() { for (IOCallback callback : delegates) { try { @@ -280,6 +295,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public void onError(final int errorCode, final String errorMessage) { for (IOCallback callback : delegates) { try { @@ -303,6 +319,7 @@ public abstract class AbstractSequentialFile implements SequentialFile { protected class LocalBufferObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean requestedSync, final List callbacks) { buffer.flip(); @@ -314,10 +331,12 @@ public abstract class AbstractSequentialFile implements SequentialFile { } } + @Override public ByteBuffer newBuffer(final int size, final int limit) { return AbstractSequentialFile.this.newBuffer(size, limit); } + @Override public int getRemainingBytes() { if (fileSize - position.get() > Integer.MAX_VALUE) { return Integer.MAX_VALUE; diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java index 16589bf15a..9f9a883190 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFileFactory.java @@ -82,6 +82,7 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac this.maxIO = maxIO; } + @Override public void stop() { if (timedBuffer != null) { timedBuffer.stop(); @@ -106,6 +107,7 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac return journalDir; } + @Override public void start() { if (timedBuffer != null) { timedBuffer.start(); @@ -121,6 +123,7 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac } } + @Override public int getMaxIO() { return maxIO; } @@ -139,12 +142,14 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac } } + @Override public void flush() { if (timedBuffer != null) { timedBuffer.flush(); } } + @Override public void deactivateBuffer() { if (timedBuffer != null) { // When moving to a new file, we need to make sure any pending buffer will be transferred to the buffer @@ -153,12 +158,14 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac } } + @Override public void releaseBuffer(final ByteBuffer buffer) { } /** * Create the directory if it doesn't exist yet */ + @Override public void createDirs() throws Exception { boolean ok = journalDir.mkdirs(); if (!ok) { @@ -166,8 +173,10 @@ public abstract class AbstractSequentialFileFactory implements SequentialFileFac } } + @Override public List listFiles(final String extension) throws Exception { FilenameFilter fnf = new FilenameFilter() { + @Override public boolean accept(final File file, final String name) { return name.endsWith("." + extension); } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java index cf59fc4ea4..2ee5186f6d 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/DummyCallback.java @@ -27,9 +27,11 @@ public class DummyCallback extends SyncIOCompletion { return DummyCallback.instance; } + @Override public void done() { } + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQJournalLogger.LOGGER.errorWritingData(new Exception(errorMessage), errorMessage, errorCode); } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java index e011b088d7..9bac49d33c 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFile.java @@ -72,16 +72,19 @@ public class AIOSequentialFile extends AbstractSequentialFile { this.aioFactory = factory; } + @Override public boolean isOpen() { return opened; } + @Override public int getAlignment() { checkOpened(); return aioFile.getBlockSize(); } + @Override public int calculateBlockStart(final int position) { int alignment = getAlignment(); @@ -90,6 +93,7 @@ public class AIOSequentialFile extends AbstractSequentialFile { return pos; } + @Override public SequentialFile cloneFile() { return new AIOSequentialFile(aioFactory, -1, -1, getFile().getParentFile(), getFile().getName(), writerExecutor); } @@ -114,6 +118,7 @@ public class AIOSequentialFile extends AbstractSequentialFile { aioFile = null; } + @Override public synchronized void fill(final int size) throws Exception { checkOpened(); aioFile.fill(size); @@ -121,10 +126,12 @@ public class AIOSequentialFile extends AbstractSequentialFile { fileSize = aioFile.getSize(); } + @Override public void open() throws Exception { open(aioFactory.getMaxIO(), true); } + @Override public synchronized void open(final int maxIO, final boolean useExecutor) throws ActiveMQException { opened = true; @@ -141,6 +148,7 @@ public class AIOSequentialFile extends AbstractSequentialFile { fileSize = aioFile.getSize(); } + @Override public int read(final ByteBuffer bytes, final IOCallback callback) throws ActiveMQException { checkOpened(); int bytesToRead = bytes.limit(); @@ -163,6 +171,7 @@ public class AIOSequentialFile extends AbstractSequentialFile { return bytesToRead; } + @Override public int read(final ByteBuffer bytes) throws Exception { SimpleWaitIOCallback waitCompletion = new SimpleWaitIOCallback(); @@ -173,6 +182,7 @@ public class AIOSequentialFile extends AbstractSequentialFile { return bytesRead; } + @Override public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Exception { if (sync) { SimpleWaitIOCallback completion = new SimpleWaitIOCallback(); @@ -189,6 +199,7 @@ public class AIOSequentialFile extends AbstractSequentialFile { /** * Note: Parameter sync is not used on AIO */ + @Override public void writeDirect(final ByteBuffer bytes, final boolean sync, final IOCallback callback) { checkOpened(); @@ -240,10 +251,12 @@ public class AIOSequentialFile extends AbstractSequentialFile { } } + @Override public void sync() { throw new UnsupportedOperationException("This method is not supported on AIO"); } + @Override public long size() throws Exception { if (aioFile == null) { return getFile().length(); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java index 0af2a0ef94..92d1b3b4a1 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/aio/AIOSequentialFileFactory.java @@ -106,10 +106,12 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor this.reuseBuffers = false; } + @Override public SequentialFile createSequentialFile(final String fileName) { return new AIOSequentialFile(this, bufferSize, bufferTimeout, journalDir, fileName, writeExecutor); } + @Override public boolean isSupportsCallbacks() { return true; } @@ -118,6 +120,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor return LibaioContext.isLoaded(); } + @Override public ByteBuffer allocateDirectBuffer(final int size) { int blocks = size / 512; @@ -133,10 +136,12 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor return buffer; } + @Override public void releaseDirectBuffer(final ByteBuffer buffer) { LibaioContext.freeBuffer(buffer); } + @Override public ByteBuffer newBuffer(int size) { if (size % 512 != 0) { size = (size / 512 + 1) * 512; @@ -145,22 +150,26 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor return buffersControl.newBuffer(size); } + @Override public void clearBuffer(final ByteBuffer directByteBuffer) { directByteBuffer.position(0); libaioContext.memsetBuffer(directByteBuffer); } + @Override public int getAlignment() { return 512; } // For tests only + @Override public ByteBuffer wrapBuffer(final byte[] bytes) { ByteBuffer newbuffer = newBuffer(bytes.length); newbuffer.put(bytes); return newbuffer; } + @Override public int calculateBlockSize(final int position) { int alignment = getAlignment(); @@ -263,6 +272,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor return this; } + @Override public void run() { try { libaioFile.write(position, bytes, buffer, this); @@ -272,6 +282,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor } } + @Override public int compareTo(AIOSequentialCallback other) { if (this == other || this.writeSequence == other.writeSequence) { return 0; @@ -309,6 +320,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor /** * this is called by libaio. */ + @Override public void done() { this.sequentialFile.done(this); } @@ -338,6 +350,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor private class PollerRunnable implements Runnable { + @Override public void run() { libaioContext.poll(); } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java index d72717a7f6..20761a571f 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/buffer/TimedBuffer.java @@ -365,6 +365,7 @@ public class TimedBuffer { final int sleepMillis = timeout / 1000000; // truncates final int sleepNanos = timeout % 1000000; + @Override public void run() { long lastFlushTime = 0; diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java index ae93a31aec..548b9a3aa9 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFile.java @@ -60,14 +60,17 @@ public final class NIOSequentialFile extends AbstractSequentialFile { defaultMaxIO = maxIO; } + @Override public int getAlignment() { return 1; } + @Override public int calculateBlockStart(final int position) { return position; } + @Override public synchronized boolean isOpen() { return channel != null; } @@ -76,10 +79,12 @@ public final class NIOSequentialFile extends AbstractSequentialFile { * this.maxIO represents the default maxIO. * Some operations while initializing files on the journal may require a different maxIO */ + @Override public synchronized void open() throws IOException { open(defaultMaxIO, true); } + @Override public void open(final int maxIO, final boolean useExecutor) throws IOException { try { rfile = new RandomAccessFile(getFile(), "rw"); @@ -99,6 +104,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile { } } + @Override public void fill(final int size) throws IOException { ByteBuffer bb = ByteBuffer.allocate(size); @@ -150,10 +156,12 @@ public final class NIOSequentialFile extends AbstractSequentialFile { notifyAll(); } + @Override public int read(final ByteBuffer bytes) throws Exception { return read(bytes, null); } + @Override public synchronized int read(final ByteBuffer bytes, final IOCallback callback) throws IOException, ActiveMQIllegalStateException { try { @@ -181,6 +189,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile { } } + @Override public void sync() throws IOException { if (channel != null) { try { @@ -193,6 +202,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile { } } + @Override public long size() throws IOException { if (channel == null) { return getFile().length(); @@ -224,10 +234,12 @@ public final class NIOSequentialFile extends AbstractSequentialFile { return "NIOSequentialFile " + getFile(); } + @Override public SequentialFile cloneFile() { return new NIOSequentialFile(factory, directory, getFileName(), maxIO, writerExecutor); } + @Override public void writeDirect(final ByteBuffer bytes, final boolean sync, final IOCallback callback) { if (callback == null) { throw new NullPointerException("callback parameter need to be set"); @@ -241,6 +253,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile { } } + @Override public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Exception { internalWrite(bytes, sync, null); } @@ -287,6 +300,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile { maxIOSemaphore.acquire(); writerExecutor.execute(new Runnable() { + @Override public void run() { try { try { diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFileFactory.java index 8880f1a752..d949f0b74c 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFileFactory.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/nio/NIOSequentialFileFactory.java @@ -65,14 +65,17 @@ public class NIOSequentialFileFactory extends AbstractSequentialFileFactory { super(journalDir, buffered, bufferSize, bufferTimeout, maxIO, logRates, listener); } + @Override public SequentialFile createSequentialFile(final String fileName) { return new NIOSequentialFile(this, journalDir, fileName, maxIO, writeExecutor); } + @Override public boolean isSupportsCallbacks() { return timedBuffer != null; } + @Override public ByteBuffer allocateDirectBuffer(final int size) { // Using direct buffer, as described on https://jira.jboss.org/browse/HORNETQ-467 ByteBuffer buffer2 = null; @@ -101,14 +104,17 @@ public class NIOSequentialFileFactory extends AbstractSequentialFileFactory { return buffer2; } + @Override public void releaseDirectBuffer(ByteBuffer buffer) { // nothing we can do on this case. we can just have good faith on GC } + @Override public ByteBuffer newBuffer(final int size) { return ByteBuffer.allocate(size); } + @Override public void clearBuffer(final ByteBuffer buffer) { final int limit = buffer.limit(); buffer.rewind(); @@ -120,14 +126,17 @@ public class NIOSequentialFileFactory extends AbstractSequentialFileFactory { buffer.rewind(); } + @Override public ByteBuffer wrapBuffer(final byte[] bytes) { return ByteBuffer.wrap(bytes); } + @Override public int getAlignment() { return 1; } + @Override public int calculateBlockSize(final int bytes) { return bytes; } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/TestableJournal.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/TestableJournal.java index 4f8dc4a2b7..dfe7e56730 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/TestableJournal.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/TestableJournal.java @@ -32,6 +32,7 @@ public interface TestableJournal extends Journal { void debugWait() throws Exception; + @Override int getFileSize(); int getMinFiles(); @@ -42,6 +43,7 @@ public interface TestableJournal extends Journal { int getMaxAIO(); + @Override void forceMoveNextFile() throws Exception; void setAutoReclaim(boolean autoReclaim); @@ -63,5 +65,6 @@ public interface TestableJournal extends Journal { */ boolean checkReclaimStatus() throws Exception; + @Override JournalFile[] getDataFiles(); } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalBase.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalBase.java index 5a844f30f5..50632fa7e6 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalBase.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalBase.java @@ -36,54 +36,65 @@ abstract class JournalBase implements Journal { this.fileSize = fileSize; } + @Override public abstract void appendAddRecord(final long id, final byte recordType, final EncodingSupport record, final boolean sync, final IOCompletion callback) throws Exception; + @Override public abstract void appendAddRecordTransactional(final long txID, final long id, final byte recordType, final EncodingSupport record) throws Exception; + @Override public abstract void appendCommitRecord(final long txID, final boolean sync, final IOCompletion callback, boolean lineUpContext) throws Exception; + @Override public abstract void appendDeleteRecord(final long id, final boolean sync, final IOCompletion callback) throws Exception; + @Override public abstract void appendDeleteRecordTransactional(final long txID, final long id, final EncodingSupport record) throws Exception; + @Override public abstract void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync, final IOCompletion callback) throws Exception; + @Override public abstract void appendUpdateRecord(final long id, final byte recordType, final EncodingSupport record, final boolean sync, final IOCompletion callback) throws Exception; + @Override public abstract void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType, final EncodingSupport record) throws Exception; + @Override public abstract void appendRollbackRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception; + @Override public void appendAddRecord(long id, byte recordType, byte[] record, boolean sync) throws Exception { appendAddRecord(id, recordType, new ByteArrayEncoding(record), sync); } + @Override public void appendAddRecord(long id, byte recordType, EncodingSupport record, boolean sync) throws Exception { SyncIOCompletion callback = getSyncCallback(sync); @@ -94,6 +105,7 @@ abstract class JournalBase implements Journal { } } + @Override public void appendCommitRecord(final long txID, final boolean sync) throws Exception { SyncIOCompletion syncCompletion = getSyncCallback(sync); @@ -104,10 +116,12 @@ abstract class JournalBase implements Journal { } } + @Override public void appendCommitRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception { appendCommitRecord(txID, sync, callback, true); } + @Override public void appendUpdateRecord(final long id, final byte recordType, final byte[] record, @@ -115,6 +129,7 @@ abstract class JournalBase implements Journal { appendUpdateRecord(id, recordType, new ByteArrayEncoding(record), sync); } + @Override public void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType, @@ -122,6 +137,7 @@ abstract class JournalBase implements Journal { appendUpdateRecordTransactional(txID, id, recordType, new ByteArrayEncoding(record)); } + @Override public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, @@ -129,14 +145,17 @@ abstract class JournalBase implements Journal { appendAddRecordTransactional(txID, id, recordType, new ByteArrayEncoding(record)); } + @Override public void appendDeleteRecordTransactional(final long txID, final long id) throws Exception { appendDeleteRecordTransactional(txID, id, NullEncoding.instance); } + @Override public void appendPrepareRecord(final long txID, final byte[] transactionData, final boolean sync) throws Exception { appendPrepareRecord(txID, new ByteArrayEncoding(transactionData), sync); } + @Override public void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync) throws Exception { @@ -149,10 +168,12 @@ abstract class JournalBase implements Journal { } } + @Override public void appendDeleteRecordTransactional(final long txID, final long id, final byte[] record) throws Exception { appendDeleteRecordTransactional(txID, id, new ByteArrayEncoding(record)); } + @Override public void appendUpdateRecord(final long id, final byte recordType, final EncodingSupport record, @@ -166,6 +187,7 @@ abstract class JournalBase implements Journal { } } + @Override public void appendRollbackRecord(final long txID, final boolean sync) throws Exception { SyncIOCompletion syncCompletion = getSyncCallback(sync); @@ -177,6 +199,7 @@ abstract class JournalBase implements Journal { } + @Override public void appendDeleteRecord(final long id, final boolean sync) throws Exception { SyncIOCompletion callback = getSyncCallback(sync); @@ -203,19 +226,23 @@ abstract class JournalBase implements Journal { private static NullEncoding instance = new NullEncoding(); + @Override public void decode(final ActiveMQBuffer buffer) { // no-op } + @Override public void encode(final ActiveMQBuffer buffer) { // no-op } + @Override public int getEncodeSize() { return 0; } } + @Override public int getFileSize() { return fileSize; } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java index 0216c19daa..3637f56093 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalCompactor.java @@ -254,6 +254,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ // JournalReaderCallback implementation ------------------------------------------- + @Override public void onReadAddRecord(final RecordInfo info) throws Exception { if (lookupRecord(info.id)) { JournalInternalRecord addRecord = new JournalAddRecord(true, info.id, info.getUserRecordType(), new ByteArrayEncoding(info.data)); @@ -267,6 +268,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } } + @Override public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception { if (pendingTransactions.get(transactionID) != null || lookupRecord(info.id)) { JournalTransaction newTransaction = getNewJournalTransaction(transactionID); @@ -283,6 +285,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } } + @Override public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { if (pendingTransactions.get(transactionID) != null) { @@ -303,6 +306,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } } + @Override public void onReadDeleteRecord(final long recordID) throws Exception { if (newRecords.get(recordID) != null) { // Sanity check, it should never happen @@ -311,6 +315,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } + @Override public void onReadDeleteRecordTX(final long transactionID, final RecordInfo info) throws Exception { if (pendingTransactions.get(transactionID) != null) { JournalTransaction newTransaction = getNewJournalTransaction(transactionID); @@ -326,10 +331,12 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ // else.. nothing to be done } + @Override public void markAsDataFile(final JournalFile file) { // nothing to be done here } + @Override public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception { @@ -348,6 +355,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } } + @Override public void onReadRollbackRecord(final long transactionID) throws Exception { if (pendingTransactions.get(transactionID) != null) { // Sanity check, this should never happen @@ -370,6 +378,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } } + @Override public void onReadUpdateRecord(final RecordInfo info) throws Exception { if (lookupRecord(info.id)) { JournalInternalRecord updateRecord = new JournalAddRecord(false, info.id, info.userRecordType, new ByteArrayEncoding(info.data)); @@ -391,6 +400,7 @@ public class JournalCompactor extends AbstractJournalUpdateTask implements Journ } } + @Override public void onReadUpdateRecordTX(final long transactionID, final RecordInfo info) throws Exception { if (pendingTransactions.get(transactionID) != null || lookupRecord(info.id)) { JournalTransaction newTransaction = getNewJournalTransaction(transactionID); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java index 4cc23f1347..4c766b7692 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFileImpl.java @@ -55,6 +55,7 @@ public class JournalFileImpl implements JournalFile { recordID = (int) (fileID & Integer.MAX_VALUE); } + @Override public int getPosCount() { return posCount.intValue(); } @@ -69,6 +70,7 @@ public class JournalFileImpl implements JournalFile { this.canReclaim = canReclaim; } + @Override public void incNegCount(final JournalFile file) { if (file != this) { totalNegativeToOthers.incrementAndGet(); @@ -76,6 +78,7 @@ public class JournalFileImpl implements JournalFile { getOrCreateNegCount(file).incrementAndGet(); } + @Override public int getNegCount(final JournalFile file) { AtomicInteger count = negCounts.get(file); @@ -87,14 +90,17 @@ public class JournalFileImpl implements JournalFile { } } + @Override public int getJournalVersion() { return version; } + @Override public void incPosCount() { posCount.incrementAndGet(); } + @Override public void decPosCount() { posCount.decrementAndGet(); } @@ -103,10 +109,12 @@ public class JournalFileImpl implements JournalFile { return offset; } + @Override public long getFileID() { return fileID; } + @Override public int getRecordID() { return recordID; } @@ -115,6 +123,7 @@ public class JournalFileImpl implements JournalFile { this.offset = offset; } + @Override public SequentialFile getFile() { return file; } @@ -169,6 +178,7 @@ public class JournalFileImpl implements JournalFile { return liveBytes.get(); } + @Override public int getTotalNegativeToOthers() { return totalNegativeToOthers.get(); } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java index a837dd3bd1..159690d4a0 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java @@ -86,6 +86,7 @@ public class JournalFilesRepository { private Executor openFilesExecutor; private final Runnable pushOpenRunnable = new Runnable() { + @Override public void run() { try { pushOpenedFile(); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java index 865cf72423..f8aa784a40 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java @@ -267,6 +267,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal return "JournalImpl(state=" + state + ", currentFile=[" + currentFile + "], hash=" + super.toString() + ")"; } + @Override public void runDirectJournalBlast() throws Exception { final int numIts = 100000000; @@ -276,14 +277,17 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal class MyAIOCallback implements IOCompletion { + @Override public void done() { latch.countDown(); } + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void storeLineUp() { } } @@ -296,13 +300,16 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal class MyRecord implements EncodingSupport { + @Override public void decode(final ActiveMQBuffer buffer) { } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(bytes); } + @Override public int getEncodeSize() { return recordSize; } @@ -319,14 +326,17 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal latch.await(); } + @Override public Map getRecords() { return records; } + @Override public JournalFile getCurrentFile() { return currentFile; } + @Override public JournalCompactor getCompactor() { return compactor; } @@ -1101,6 +1111,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } // XXX make it protected? + @Override public int getAlignment() throws Exception { return fileFactory.getAlignment(); } @@ -1109,33 +1120,41 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal static final LoaderCallback INSTANCE = new DummyLoader(); + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { } + @Override public void updateRecord(final RecordInfo info) { } + @Override public void deleteRecord(final long id) { } + @Override public void addRecord(final RecordInfo info) { } + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { } } + @Override public synchronized JournalLoadInformation loadInternalOnly() throws Exception { return load(DummyLoader.INSTANCE, true, null); } + @Override public synchronized JournalLoadInformation loadSyncOnly(JournalState syncState) throws Exception { assert syncState == JournalState.SYNCING || syncState == JournalState.SYNCING_UP_TO_DATE; return load(DummyLoader.INSTANCE, true, syncState); } + @Override public JournalLoadInformation load(final List committedRecords, final List preparedTransactions, final TransactionFailureCallback failureCallback) throws Exception { @@ -1179,26 +1198,31 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { preparedTransactions.add(preparedTransaction); checkDeleteSize(); } + @Override public void addRecord(final RecordInfo info) { records.add(info); checkDeleteSize(); } + @Override public void updateRecord(final RecordInfo info) { records.add(info); checkDeleteSize(); } + @Override public void deleteRecord(final long id) { recordsToDelete.add(id); checkDeleteSize(); } + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { @@ -1217,6 +1241,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal return info; } + @Override public void scheduleCompactAndBlock(int timeout) throws Exception { final AtomicInteger errors = new AtomicInteger(0); @@ -1227,6 +1252,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // We can't use the executor for the compacting... or we would dead lock because of file open and creation // operations (that will use the executor) compactorExecutor.execute(new Runnable() { + @Override public void run() { try { @@ -1469,6 +1495,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal *

*

* FileID and NumberOfElements are the transaction summary, and they will be repeated (N)umberOfFiles times

*/ + @Override public JournalLoadInformation load(final LoaderCallback loadManager) throws Exception { return load(loadManager, true, null); } @@ -1524,6 +1551,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void onReadAddRecord(final RecordInfo info) throws Exception { checkID(info.id); @@ -1534,6 +1562,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal records.put(info.id, new JournalRecord(file, info.data.length + JournalImpl.SIZE_ADD_RECORD + 1)); } + @Override public void onReadUpdateRecord(final RecordInfo info) throws Exception { checkID(info.id); @@ -1553,6 +1582,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void onReadDeleteRecord(final long recordID) throws Exception { hasData.set(true); @@ -1565,10 +1595,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void onReadUpdateRecordTX(final long transactionID, final RecordInfo info) throws Exception { onReadAddRecordTX(transactionID, info); } + @Override public void onReadAddRecordTX(final long transactionID, final RecordInfo info) throws Exception { checkID(info.id); @@ -1597,6 +1629,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // count } + @Override public void onReadDeleteRecordTX(final long transactionID, final RecordInfo info) throws Exception { hasData.set(true); @@ -1622,6 +1655,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } + @Override public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception { @@ -1659,6 +1693,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { TransactionHolder tx = loadTransactions.remove(transactionID); @@ -1705,6 +1740,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } + @Override public void onReadRollbackRecord(final long transactionID) throws Exception { TransactionHolder tx = loadTransactions.remove(transactionID); @@ -1727,6 +1763,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void markAsDataFile(final JournalFile file) { hasData.set(true); } @@ -1791,6 +1828,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal /** * @return true if cleanup was called */ + @Override public final boolean checkReclaimStatus() throws Exception { if (compactorRunning.get()) { @@ -1871,6 +1909,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // We can't use the executor for the compacting... or we would dead lock because of file open and creation // operations (that will use the executor) compactorExecutor.execute(new Runnable() { + @Override public void run() { try { @@ -1889,10 +1928,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // TestableJournal implementation // -------------------------------------------------------------- + @Override public final void setAutoReclaim(final boolean autoReclaim) { this.autoReclaim = autoReclaim; } + @Override public final boolean isAutoReclaim() { return autoReclaim; } @@ -1941,6 +1982,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal * Method for use on testcases. * It will call waitComplete on every transaction, so any assertions on the file system will be correct after this */ + @Override public void debugWait() throws InterruptedException { fileFactory.flush(); @@ -1954,6 +1996,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal final CountDownLatch latch = newLatch(1); filesExecutor.execute(new Runnable() { + @Override public void run() { latch.countDown(); } @@ -1964,22 +2007,27 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } + @Override public int getDataFilesCount() { return filesRepository.getDataFilesCount(); } + @Override public JournalFile[] getDataFiles() { return filesRepository.getDataFilesArray(); } + @Override public int getFreeFilesCount() { return filesRepository.getFreeFilesCount(); } + @Override public int getOpenedFilesCount() { return filesRepository.getOpenedFilesCount(); } + @Override public int getIDMapSize() { return records.size(); } @@ -1989,27 +2037,33 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal return fileSize; } + @Override public int getMinFiles() { return minFiles; } + @Override public String getFilePrefix() { return filesRepository.getFilePrefix(); } + @Override public String getFileExtension() { return filesRepository.getFileExtension(); } + @Override public int getMaxAIO() { return filesRepository.getMaxAIO(); } + @Override public int getUserVersion() { return userVersion; } // In some tests we need to force the journal to move to a next file + @Override public void forceMoveNextFile() throws Exception { journalLock.readLock().lock(); try { @@ -2027,6 +2081,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public void perfBlast(final int pages) { new PerfBlast(pages).start(); } @@ -2034,10 +2089,12 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal // ActiveMQComponent implementation // --------------------------------------------------- + @Override public synchronized boolean isStarted() { return state != JournalState.STOPPED; } + @Override public synchronized void start() { if (state != JournalState.STOPPED) { throw new IllegalStateException("Journal " + this + " is not stopped, state is " + state); @@ -2045,6 +2102,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal filesExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() { + @Override public Thread newThread(final Runnable r) { return new Thread(r, "JournalImpl::FilesExecutor"); } @@ -2052,6 +2110,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal compactorExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() { + @Override public Thread newThread(final Runnable r) { return new Thread(r, "JournalImpl::CompactorExecutor"); } @@ -2064,6 +2123,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal setJournalState(JournalState.STARTED); } + @Override public synchronized void stop() throws Exception { if (state == JournalState.STOPPED) { throw new IllegalStateException("Journal is already stopped"); @@ -2121,6 +2181,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public int getNumberOfRecords() { return records.size(); } @@ -2156,6 +2217,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal final CountDownLatch done = newLatch(1); filesExecutor.execute(new Runnable() { + @Override public void run() { try { for (JournalFile file : oldFiles) { @@ -2448,6 +2510,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal if (isAutoReclaim() && !compactorRunning.get()) { compactorExecutor.execute(new Runnable() { + @Override public void run() { try { if (!checkReclaimStatus()) { @@ -2582,6 +2645,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal private static final long serialVersionUID = -6264728973604070321L; + @Override public int compare(final JournalFile f1, final JournalFile f2) { long id1 = f1.getFileID(); long id2 = f2.getFileID(); @@ -2614,6 +2678,7 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal return byteEncoder.getEncodeSize(); } + @Override public void encode(final ActiveMQBuffer buffer) { byteEncoder.encode(buffer); } @@ -2632,11 +2697,13 @@ public class JournalImpl extends JournalBase implements TestableJournal, Journal } } + @Override public final void synchronizationLock() { compactorLock.writeLock().lock(); journalLock.writeLock().lock(); } + @Override public final void synchronizationUnlock() { try { compactorLock.writeLock().unlock(); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalReaderCallbackAbstract.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalReaderCallbackAbstract.java index 7bf9d0f460..de4ed051a4 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalReaderCallbackAbstract.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalReaderCallbackAbstract.java @@ -20,35 +20,45 @@ import org.apache.activemq.artemis.core.journal.RecordInfo; public class JournalReaderCallbackAbstract implements JournalReaderCallback { + @Override public void markAsDataFile(final JournalFile file) { } + @Override public void onReadAddRecord(final RecordInfo info) throws Exception { } + @Override public void onReadAddRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { } + @Override public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { } + @Override public void onReadDeleteRecord(final long recordID) throws Exception { } + @Override public void onReadDeleteRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { } + @Override public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception { } + @Override public void onReadRollbackRecord(final long transactionID) throws Exception { } + @Override public void onReadUpdateRecord(final RecordInfo recordInfo) throws Exception { } + @Override public void onReadUpdateRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SimpleWaitIOCallback.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SimpleWaitIOCallback.java index 0efdf8a487..7f98ec5a92 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SimpleWaitIOCallback.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SimpleWaitIOCallback.java @@ -36,10 +36,12 @@ public final class SimpleWaitIOCallback extends SyncIOCompletion { return SimpleWaitIOCallback.class.getName(); } + @Override public void done() { latch.countDown(); } + @Override public void onError(final int errorCode1, final String errorMessage1) { this.errorCode = errorCode1; diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/TransactionCallback.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/TransactionCallback.java index 3084dd50f0..faef4e85da 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/TransactionCallback.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/TransactionCallback.java @@ -40,6 +40,7 @@ public class TransactionCallback implements IOCallback { countLatch.countUp(); } + @Override public void done() { countLatch.countDown(); if (++done == up.get() && delegateCompletion != null) { @@ -59,6 +60,7 @@ public class TransactionCallback implements IOCallback { } } + @Override public void onError(final int errorCode, final String errorMessage) { this.errorMessage = errorMessage; diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/ByteArrayEncoding.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/ByteArrayEncoding.java index be04bc8e61..2c6f083d78 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/ByteArrayEncoding.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/ByteArrayEncoding.java @@ -29,14 +29,17 @@ public class ByteArrayEncoding implements EncodingSupport { // Public -------------------------------------------------------- + @Override public void decode(final ActiveMQBuffer buffer) { throw new IllegalStateException("operation not supported"); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(data); } + @Override public int getEncodeSize() { return data.length; } diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalDeleteRecord.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalDeleteRecord.java index 06444eb7e5..779eb78afb 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalDeleteRecord.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalDeleteRecord.java @@ -30,6 +30,7 @@ public class JournalDeleteRecord extends JournalInternalRecord { this.id = id; } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeByte(JournalImpl.DELETE_RECORD); diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalInternalRecord.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalInternalRecord.java index b05f1619bb..0087816731 100644 --- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalInternalRecord.java +++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/dataformat/JournalInternalRecord.java @@ -33,6 +33,7 @@ public abstract class JournalInternalRecord implements EncodingSupport { this.fileID = fileID; } + @Override public void decode(final ActiveMQBuffer buffer) { } @@ -56,5 +57,6 @@ public abstract class JournalInternalRecord implements EncodingSupport { } } + @Override public abstract int getEncodeSize(); } diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisAbstractPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisAbstractPlugin.java index e1ec2c6b24..0747ea8f2d 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisAbstractPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisAbstractPlugin.java @@ -64,6 +64,7 @@ public abstract class ArtemisAbstractPlugin extends AbstractMojo { + @Override public void execute() throws MojoExecutionException, MojoFailureException { if (isIgnore()) { getLog().debug("******************************************************************************************************"); diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java index d0ee8fc3aa..44104babb6 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisCLIPlugin.java @@ -94,6 +94,7 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin { } + @Override protected boolean isIgnore() { return ignore; } @@ -124,6 +125,7 @@ public class ArtemisCLIPlugin extends ArtemisAbstractPlugin { if (spawn) { final Process process = org.apache.activemq.artemis.cli.process.ProcessBuilder.build(name, location, true, args); Runtime.getRuntime().addShutdownHook(new Thread() { + @Override public void run() { process.destroy(); } diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java index 4ead90056c..3b00c99ec6 100644 --- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java +++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/ArtemisDependencyScanPlugin.java @@ -57,6 +57,7 @@ public class ArtemisDependencyScanPlugin extends ArtemisAbstractPlugin { @Parameter private File targetFolder; + @Override protected boolean isIgnore() { return false; } diff --git a/artemis-native/src/main/java/org/apache/activemq/artemis/jlibaio/LibaioContext.java b/artemis-native/src/main/java/org/apache/activemq/artemis/jlibaio/LibaioContext.java index 47e829cddd..9eb675d041 100644 --- a/artemis-native/src/main/java/org/apache/activemq/artemis/jlibaio/LibaioContext.java +++ b/artemis-native/src/main/java/org/apache/activemq/artemis/jlibaio/LibaioContext.java @@ -86,6 +86,7 @@ public class LibaioContext implements Closeable { if (loadLibrary(library)) { loaded = true; Runtime.getRuntime().addShutdownHook(new Thread() { + @Override public void run() { shuttingDown.set(true); checkShutdown(); diff --git a/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/LibaioTest.java b/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/LibaioTest.java index f9a1aeec02..af25dee6cd 100644 --- a/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/LibaioTest.java +++ b/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/LibaioTest.java @@ -608,6 +608,7 @@ public class LibaioTest { public void testBlockedCallback() throws Exception { final LibaioContext blockedContext = new LibaioContext(500, true); Thread t = new Thread() { + @Override public void run() { blockedContext.poll(); } diff --git a/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/OpenCloseContextTest.java b/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/OpenCloseContextTest.java index 432c05f014..6c7d69b058 100644 --- a/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/OpenCloseContextTest.java +++ b/artemis-native/src/test/java/org/apache/activemq/artemis/jlibaio/test/OpenCloseContextTest.java @@ -54,6 +54,7 @@ public class OpenCloseContextTest { System.out.println("#test " + i); final LibaioContext control = new LibaioContext<>(5, true); Thread t = new Thread() { + @Override public void run() { control.poll(); } @@ -113,6 +114,7 @@ public class OpenCloseContextTest { System.out.println("#test " + i); final LibaioContext control = new LibaioContext<>(5, true); Thread t = new Thread() { + @Override public void run() { control.poll(); } diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ActiveMQProtonRemotingConnection.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ActiveMQProtonRemotingConnection.java index ea8582aaa2..0edd6b955c 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ActiveMQProtonRemotingConnection.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/ActiveMQProtonRemotingConnection.java @@ -56,6 +56,7 @@ public class ActiveMQProtonRemotingConnection extends AbstractRemotingConnection /* * This can be called concurrently by more than one thread so needs to be locked */ + @Override public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { if (destroyed) { return; diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSBytesMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSBytesMessage.java index cc436f4673..990c7d7809 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSBytesMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSBytesMessage.java @@ -186,12 +186,14 @@ public class ServerJMSBytesMessage extends ServerJMSMessage implements BytesMess } } + @Override public void encode() throws Exception { super.encode(); // this is to make sure we encode the body-length before it's persisted getBodyLength(); } + @Override public void decode() throws Exception { super.decode(); diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMapMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMapMessage.java index e41a1a33d5..52f4f6aa7b 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMapMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMapMessage.java @@ -59,46 +59,57 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe // MapMessage implementation ------------------------------------- + @Override public void setBoolean(final String name, final boolean value) throws JMSException { map.putBooleanProperty(new SimpleString(name), value); } + @Override public void setByte(final String name, final byte value) throws JMSException { map.putByteProperty(new SimpleString(name), value); } + @Override public void setShort(final String name, final short value) throws JMSException { map.putShortProperty(new SimpleString(name), value); } + @Override public void setChar(final String name, final char value) throws JMSException { map.putCharProperty(new SimpleString(name), value); } + @Override public void setInt(final String name, final int value) throws JMSException { map.putIntProperty(new SimpleString(name), value); } + @Override public void setLong(final String name, final long value) throws JMSException { map.putLongProperty(new SimpleString(name), value); } + @Override public void setFloat(final String name, final float value) throws JMSException { map.putFloatProperty(new SimpleString(name), value); } + @Override public void setDouble(final String name, final double value) throws JMSException { map.putDoubleProperty(new SimpleString(name), value); } + @Override public void setString(final String name, final String value) throws JMSException { map.putSimpleStringProperty(new SimpleString(name), value == null ? null : new SimpleString(value)); } + @Override public void setBytes(final String name, final byte[] value) throws JMSException { map.putBytesProperty(new SimpleString(name), value); } + @Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { if (offset + length > value.length) { throw new JMSException("Invalid offset/length"); @@ -108,6 +119,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe map.putBytesProperty(new SimpleString(name), newBytes); } + @Override public void setObject(final String name, final Object value) throws JMSException { try { TypedProperties.setObjectProperty(new SimpleString(name), value, map); @@ -117,6 +129,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public boolean getBoolean(final String name) throws JMSException { try { return map.getBooleanProperty(new SimpleString(name)); @@ -126,6 +139,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public byte getByte(final String name) throws JMSException { try { return map.getByteProperty(new SimpleString(name)); @@ -135,6 +149,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public short getShort(final String name) throws JMSException { try { return map.getShortProperty(new SimpleString(name)); @@ -144,6 +159,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public char getChar(final String name) throws JMSException { try { return map.getCharProperty(new SimpleString(name)); @@ -153,6 +169,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); @@ -162,6 +179,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public long getLong(final String name) throws JMSException { try { return map.getLongProperty(new SimpleString(name)); @@ -171,6 +189,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public float getFloat(final String name) throws JMSException { try { return map.getFloatProperty(new SimpleString(name)); @@ -180,6 +199,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public double getDouble(final String name) throws JMSException { try { return map.getDoubleProperty(new SimpleString(name)); @@ -189,6 +209,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public String getString(final String name) throws JMSException { try { SimpleString str = map.getSimpleStringProperty(new SimpleString(name)); @@ -204,6 +225,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public byte[] getBytes(final String name) throws JMSException { try { return map.getBytesProperty(new SimpleString(name)); @@ -213,6 +235,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe } } + @Override public Object getObject(final String name) throws JMSException { Object val = map.getProperty(new SimpleString(name)); @@ -223,6 +246,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe return val; } + @Override public Enumeration getMapNames() throws JMSException { Set simplePropNames = map.getPropertyNames(); Set propNames = new HashSet(simplePropNames.size()); @@ -234,6 +258,7 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe return Collections.enumeration(propNames); } + @Override public boolean itemExists(final String name) throws JMSException { return map.containsProperty(new SimpleString(name)); } @@ -245,11 +270,13 @@ public final class ServerJMSMapMessage extends ServerJMSMessage implements MapMe map.clear(); } + @Override public void encode() throws Exception { super.encode(); writeBodyMap(getWriteBodyBuffer(), map); } + @Override public void decode() throws Exception { super.decode(); readBodyMap(getReadBodyBuffer(), map); diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMessage.java index afacd213f4..1686ea7837 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSMessage.java @@ -125,6 +125,7 @@ public class ServerJMSMessage implements Message { } + @Override public final Destination getJMSDestination() throws JMSException { SimpleString sdest = message.getAddress(); diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java index 9b70f5742b..492ae0a954 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSStreamMessage.java @@ -50,6 +50,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St // StreamMessage implementation ---------------------------------- + @Override public boolean readBoolean() throws JMSException { try { @@ -63,6 +64,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public byte readByte() throws JMSException { try { return streamReadByte(getReadBodyBuffer()); @@ -75,6 +77,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public short readShort() throws JMSException { try { @@ -88,6 +91,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public char readChar() throws JMSException { try { @@ -101,6 +105,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public int readInt() throws JMSException { try { @@ -114,6 +119,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public long readLong() throws JMSException { try { @@ -127,6 +133,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public float readFloat() throws JMSException { try { @@ -140,6 +147,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public double readDouble() throws JMSException { try { @@ -153,6 +161,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public String readString() throws JMSException { try { @@ -171,6 +180,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St */ private int len = 0; + @Override public int readBytes(final byte[] value) throws JMSException { try { @@ -187,6 +197,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public Object readObject() throws JMSException { if (getReadBodyBuffer().readerIndex() >= message.getEndOfBodyPosition()) { @@ -203,60 +214,70 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public void writeBoolean(final boolean value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.BOOLEAN); getWriteBodyBuffer().writeBoolean(value); } + @Override public void writeByte(final byte value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.BYTE); getWriteBodyBuffer().writeByte(value); } + @Override public void writeShort(final short value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.SHORT); getWriteBodyBuffer().writeShort(value); } + @Override public void writeChar(final char value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.CHAR); getWriteBodyBuffer().writeShort((short) value); } + @Override public void writeInt(final int value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.INT); getWriteBodyBuffer().writeInt(value); } + @Override public void writeLong(final long value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.LONG); getWriteBodyBuffer().writeLong(value); } + @Override public void writeFloat(final float value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.FLOAT); getWriteBodyBuffer().writeInt(Float.floatToIntBits(value)); } + @Override public void writeDouble(final double value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.DOUBLE); getWriteBodyBuffer().writeLong(Double.doubleToLongBits(value)); } + @Override public void writeString(final String value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.STRING); getWriteBodyBuffer().writeNullableString(value); } + @Override public void writeBytes(final byte[] value) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.BYTES); @@ -264,6 +285,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St getWriteBodyBuffer().writeBytes(value); } + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { getWriteBodyBuffer().writeByte(DataConstants.BYTES); @@ -271,6 +293,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St getWriteBodyBuffer().writeBytes(value, offset, length); } + @Override public void writeObject(final Object value) throws JMSException { if (value instanceof String) { writeString((String) value); @@ -310,6 +333,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St } } + @Override public void reset() throws JMSException { getWriteBodyBuffer().resetReaderIndex(); } @@ -323,6 +347,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St getWriteBodyBuffer().clear(); } + @Override public void decode() throws Exception { super.decode(); } @@ -330,6 +355,7 @@ public final class ServerJMSStreamMessage extends ServerJMSMessage implements St /** * Encode the body into the internal message */ + @Override public void encode() throws Exception { super.encode(); bodyLength = message.getEndOfBodyPosition(); diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSTextMessage.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSTextMessage.java index 3191067dfb..a055c8e5e5 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSTextMessage.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/converter/jms/ServerJMSTextMessage.java @@ -55,6 +55,7 @@ public class ServerJMSTextMessage extends ServerJMSMessage implements TextMessag } // TextMessage implementation ------------------------------------ + @Override public void setText(final String text) throws JMSException { if (text != null) { this.text = new SimpleString(text); @@ -66,6 +67,7 @@ public class ServerJMSTextMessage extends ServerJMSMessage implements TextMessag writeBodyText(getWriteBodyBuffer(), this.text); } + @Override public String getText() { if (text != null) { return text.toString(); @@ -82,11 +84,13 @@ public class ServerJMSTextMessage extends ServerJMSMessage implements TextMessag text = null; } + @Override public void encode() throws Exception { super.encode(); writeBodyText(getWriteBodyBuffer(), text); } + @Override public void decode() throws Exception { super.decode(); text = readBodyText(getReadBodyBuffer()); diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java index 03c6474d27..64a6232b0a 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/proton/plug/ActiveMQProtonConnectionCallback.java @@ -88,6 +88,7 @@ public class ActiveMQProtonConnectionCallback implements AMQPConnectionCallback this.protonConnectionDelegate = protonConnectionDelegate; } + @Override public void onTransport(ByteBuf byteBuf, AMQPConnectionContext amqpConnection) { final int size = byteBuf.writerIndex(); diff --git a/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientProtocolManager.java b/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientProtocolManager.java index a1d9a60dac..c6fec87c1d 100644 --- a/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientProtocolManager.java +++ b/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientProtocolManager.java @@ -30,10 +30,12 @@ import org.apache.activemq.artemis.spi.core.remoting.SessionContext; public class HornetQClientProtocolManager extends ActiveMQClientProtocolManager { private static final int VERSION_PLAYED = 123; + @Override protected void sendHandshake(Connection transportConnection) { } + @Override protected SessionContext newSessionContext(String name, int confirmationWindowSize, Channel sessionChannel, diff --git a/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientSessionContext.java b/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientSessionContext.java index 169a82a684..15d3ba1587 100644 --- a/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientSessionContext.java +++ b/artemis-protocols/artemis-hqclient-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/hornetq/client/HornetQClientSessionContext.java @@ -49,6 +49,7 @@ public class HornetQClientSessionContext extends ActiveMQSessionContext { } + @Override public ClientSession.QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { SessionQueueQueryMessage request = new SessionQueueQueryMessage(queueName); SessionQueueQueryResponseMessage response = (SessionQueueQueryResponseMessage) getSessionChannel().sendBlocking(request, PacketImpl.SESS_QUEUEQUERY_RESP); @@ -56,6 +57,7 @@ public class HornetQClientSessionContext extends ActiveMQSessionContext { return response.toQueueQuery(); } + @Override protected CreateSessionMessage newCreateSession(String username, String password, int minLargeMessageSize, @@ -68,12 +70,14 @@ public class HornetQClientSessionContext extends ActiveMQSessionContext { } + @Override public ClientSession.AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { SessionBindingQueryResponseMessage response = (SessionBindingQueryResponseMessage) getSessionChannel().sendBlocking(new SessionBindingQueryMessage(address), PacketImpl.SESS_BINDINGQUERY_RESP); return new AddressQueryImpl(response.isExists(), response.getQueueNames(), false); } + @Override public ClientConsumerInternal createConsumer(SimpleString queueName, SimpleString filterString, int windowSize, diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java index 7bb12c6e65..c11bd869c6 100644 --- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java +++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTConnection.java @@ -52,6 +52,7 @@ public class MQTTConnection implements RemotingConnection { this.destroyed = false; } + @Override public Object getID() { return transportConnection.getID(); } diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTMessageInfo.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTMessageInfo.java index ca7110f58c..ffa620202b 100644 --- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTMessageInfo.java +++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTMessageInfo.java @@ -46,6 +46,7 @@ class MQTTMessageInfo { return address; } + @Override public String toString() { return ("ServerMessageId: " + serverMessageId + " ConsumerId: " + consumerId + " addr: " + address); } diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java index 6db86df613..c38593c2f0 100644 --- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java +++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTProtocolHandler.java @@ -75,6 +75,7 @@ public class MQTTProtocolHandler extends ChannelInboundHandlerAdapter { stopped = true; } + @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { try { if (stopped) { diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java index bda4c22105..6d3ff135bb 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java @@ -102,6 +102,7 @@ public class OpenWireMessageConverter implements MessageConverter { return null; } + @Override public Object outbound(ServerMessage message, int deliveryCount) { // TODO: implement this return null; diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java index 9b35b90e81..0ef7669681 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManager.java @@ -155,6 +155,7 @@ public class OpenWireProtocolManager implements ProtocolManager, No return false; } + @Override public ProtocolManagerFactory getFactory() { return factory; } @@ -252,10 +253,12 @@ public class OpenWireProtocolManager implements ProtocolManager, No public void sendReply(final OpenWireConnection connection, final Command command) { server.getStorageManager().afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); } + @Override public void done() { send(connection, command); } diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java index f506f1a554..6b3076dd9d 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireProtocolManagerFactory.java @@ -36,6 +36,7 @@ public class OpenWireProtocolManagerFactory extends AbstractProtocolManagerFacto private static String[] SUPPORTED_PROTOCOLS = {OPENWIRE_PROTOCOL_NAME}; + @Override public ProtocolManager createProtocolManager(final ActiveMQServer server, final List incomingInterceptors, List outgoingInterceptors) { diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQCompositeConsumerBrokerExchange.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQCompositeConsumerBrokerExchange.java index e1f1db2e75..7e83767373 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQCompositeConsumerBrokerExchange.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQCompositeConsumerBrokerExchange.java @@ -31,6 +31,7 @@ public class AMQCompositeConsumerBrokerExchange extends AMQConsumerBrokerExchang this.consumerMap = consumerMap; } + @Override public void processMessagePull(MessagePull messagePull) throws Exception { AMQConsumer amqConsumer = consumerMap.get(messagePull.getDestination()); if (amqConsumer != null) { @@ -38,6 +39,7 @@ public class AMQCompositeConsumerBrokerExchange extends AMQConsumerBrokerExchang } } + @Override public void acknowledge(MessageAck ack) throws Exception { AMQConsumer amqConsumer = consumerMap.get(ack.getDestination()); if (amqConsumer != null) { @@ -45,6 +47,7 @@ public class AMQCompositeConsumerBrokerExchange extends AMQConsumerBrokerExchang } } + @Override public void removeConsumer() throws Exception { for (AMQConsumer amqConsumer : consumerMap.values()) { amqConsumer.removeConsumer(); diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerSession.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerSession.java index 642eda9be5..2a39e03ce4 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerSession.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQServerSession.java @@ -88,6 +88,7 @@ public class AMQServerSession extends ServerSessionImpl { super(name, username, password, minLargeMessageSize, autoCommitSends, autoCommitAcks, preAcknowledge, persistDeliveryCountBeforeDelivery, xa, connection, storageManager, postOffice, resourceManager, securityStore, managementService, activeMQServerImpl, managementAddress, simpleString, callback, context, new AMQTransactionFactory(), queueCreator); } + @Override protected void doClose(final boolean failed) throws Exception { synchronized (this) { if (tx != null && tx.getXid() == null) { diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSingleConsumerBrokerExchange.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSingleConsumerBrokerExchange.java index 7d3b2d1480..b29c448572 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSingleConsumerBrokerExchange.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSingleConsumerBrokerExchange.java @@ -28,14 +28,17 @@ public class AMQSingleConsumerBrokerExchange extends AMQConsumerBrokerExchange { this.consumer = consumer; } + @Override public void processMessagePull(MessagePull messagePull) throws Exception { consumer.processMessagePull(messagePull); } + @Override public void removeConsumer() throws Exception { consumer.removeConsumer(); } + @Override public void acknowledge(MessageAck ack) throws Exception { amqSession.acknowledge(ack, consumer); } diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java index 23447a79fa..023ee4fb48 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java @@ -68,6 +68,7 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl handler.addEventHandler(listener); } + @Override public SASLResult getSASLResult() { return handler.getSASLResult(); } @@ -88,10 +89,12 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl /** * See comment at {@link org.proton.plug.AMQPConnectionContext#isSyncOnFlush()} */ + @Override public boolean isSyncOnFlush() { return false; } + @Override public Object getLock() { return handler.getLock(); } @@ -106,10 +109,12 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl handler.outputDone(bytes); } + @Override public void flush() { handler.flush(); } + @Override public void close() { handler.close(); } @@ -233,10 +238,12 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl } } + @Override public void onRemoteDetach(Link link) throws Exception { link.detach(); } + @Override public void onDelivery(Delivery delivery) throws Exception { ProtonDeliveryHandler handler = (ProtonDeliveryHandler) delivery.getLink().getContext(); if (handler != null) { diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java index 64fd49edad..baf0710c00 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonContextSender.java @@ -49,6 +49,7 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im this.sessionSPI = server; } + @Override public void onFlow(int credits) { this.creditsSemaphore.setCredits(credits); } @@ -64,6 +65,7 @@ public abstract class AbstractProtonContextSender extends ProtonInitializable im /* * close the session * */ + @Override public void close() throws ActiveMQAMQPException { closed = true; protonSession.removeSender(sender); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java index 348f01ea39..00d1c67f5b 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/AbstractProtonSessionContext.java @@ -59,6 +59,7 @@ public abstract class AbstractProtonSessionContext extends ProtonInitializable i this.session = session; } + @Override public void initialise() throws Exception { if (!isInitialized()) { super.initialise(); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java index b8d9ee1489..5e5115f15e 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/ProtonTransactionHandler.java @@ -110,6 +110,7 @@ public class ProtonTransactionHandler implements ProtonDeliveryHandler { } } + @Override public void onFlow(int credits) { } diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java index a35ebab3f5..63e9250044 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContext.java @@ -43,6 +43,7 @@ public class ProtonClientConnectionContext extends AbstractConnectionContext imp } // Maybe a client interface? + @Override public void clientOpen(ClientSASL sasl) throws Exception { FutureRunnable future = new FutureRunnable(1); synchronized (handler.getLock()) { @@ -58,6 +59,7 @@ public class ProtonClientConnectionContext extends AbstractConnectionContext imp waitWithTimeout(future); } + @Override public AMQPClientSessionContext createClientSession() throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContextFactory.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContextFactory.java index 2f12043201..8bc54c5545 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContextFactory.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientConnectionContextFactory.java @@ -28,6 +28,7 @@ public class ProtonClientConnectionContextFactory extends AMQPConnectionContextF return theInstance; } + @Override public AMQPConnectionContext createConnection(AMQPConnectionCallback connectionCallback) { return new ProtonClientConnectionContext(connectionCallback); } diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java index 924ca3fd13..e03c99dc35 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientContext.java @@ -51,6 +51,7 @@ public class ProtonClientContext extends AbstractProtonContextSender implements } } + @Override public void send(ProtonJMessage message) { if (sender.getSenderSettleMode() != SenderSettleMode.SETTLED) { catchUpRunnable.countUp(); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java index fca6d8ee95..ca8dc98860 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientReceiverContext.java @@ -45,6 +45,7 @@ public class ProtonClientReceiverContext extends AbstractProtonReceiverContext i super(sessionSPI, connection, protonSession, receiver); } + @Override public void onFlow(int credits) { } @@ -56,6 +57,7 @@ public class ProtonClientReceiverContext extends AbstractProtonReceiverContext i * This may be called more than once per deliver so we have to cache the buffer until we have received it all. * * */ + @Override public void onMessage(Delivery delivery) throws ActiveMQAMQPException { ByteBuf buffer = PooledByteBufAllocator.DEFAULT.heapBuffer(1024); try { diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java index 04febda963..3b07a40e9b 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/client/ProtonClientSessionContext.java @@ -39,6 +39,7 @@ public class ProtonClientSessionContext extends AbstractProtonSessionContext imp super(sessionSPI, connection, session); } + @Override public AMQPClientSenderContext createSender(String address, boolean preSettled) throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); @@ -61,6 +62,7 @@ public class ProtonClientSessionContext extends AbstractProtonSessionContext imp return amqpSender; } + @Override public AMQPClientReceiverContext createReceiver(String address) throws ActiveMQAMQPException { FutureRunnable futureRunnable = new FutureRunnable(1); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java index 2dae0e6072..e4e554de86 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContext.java @@ -41,6 +41,7 @@ public class ProtonServerConnectionContext extends AbstractConnectionContext imp super(connectionSP, idleTimeout, maxFrameSize, channelMax); } + @Override protected AbstractProtonSessionContext newSessionExtension(Session realSession) throws ActiveMQAMQPException { AMQPSessionCallback sessionSPI = connectionCallback.createSessionCallback(this); AbstractProtonSessionContext protonSession = new ProtonServerSessionContext(sessionSPI, this, realSession); @@ -48,6 +49,7 @@ public class ProtonServerConnectionContext extends AbstractConnectionContext imp return protonSession; } + @Override protected void remoteLinkOpened(Link link) throws Exception { ProtonServerSessionContext protonSession = (ProtonServerSessionContext) getSessionExtension(link.getSession()); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContextFactory.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContextFactory.java index 87242332cd..0c5c95fe5f 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContextFactory.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerConnectionContextFactory.java @@ -32,6 +32,7 @@ public class ProtonServerConnectionContextFactory extends AMQPConnectionContextF return theInstance; } + @Override public AMQPServerConnectionContext createConnection(AMQPConnectionCallback connectionCallback) { return createConnection(connectionCallback, DEFAULT_IDLE_TIMEOUT, DEFAULT_MAX_FRAME_SIZE, DEFAULT_CHANNEL_MAX); } diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java index bbbfd759bb..c0c1ea3ee1 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerReceiverContext.java @@ -45,6 +45,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext { super(sessionSPI, connection, protonSession, receiver); } + @Override public void onFlow(int credits) { } @@ -94,6 +95,7 @@ public class ProtonServerReceiverContext extends AbstractProtonReceiverContext { * This may be called more than once per deliver so we have to cache the buffer until we have received it all. * * */ + @Override public void onMessage(Delivery delivery) throws ActiveMQAMQPException { Receiver receiver; try { diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java index 71efa3c1d4..db8b40923b 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSenderContext.java @@ -57,6 +57,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple return brokerConsumer; } + @Override public void onFlow(int currentCredits) { super.onFlow(currentCredits); sessionSPI.onFlowConsumer(brokerConsumer, currentCredits); @@ -65,6 +66,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /* * start the session * */ + @Override public void start() throws ActiveMQAMQPException { super.start(); // protonSession.getServerSession().start(); @@ -145,6 +147,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /* * close the session * */ + @Override public void close() throws ActiveMQAMQPException { super.close(); try { @@ -156,6 +159,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple } } + @Override public void onMessage(Delivery delivery) throws ActiveMQAMQPException { Object message = delivery.getContext(); @@ -215,6 +219,7 @@ public class ProtonServerSenderContext extends AbstractProtonContextSender imple /** * handle an out going message from ActiveMQ Artemis, send via the Proton Sender */ + @Override public int deliverMessage(Object message, int deliveryCount) throws Exception { if (closed) { System.err.println("Message can't be delivered as it's closed"); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java index bbeeebd2f2..adfacae4e0 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/context/server/ProtonServerSessionContext.java @@ -84,6 +84,7 @@ public class ProtonServerSessionContext extends AbstractProtonSessionContext { } } + @Override public void removeSender(Sender sender) throws ActiveMQAMQPException { ProtonServerSenderContext senderRemoved = (ProtonServerSenderContext) senders.remove(sender); if (senderRemoved != null) { diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java index f7f8f92102..1fac0dde3e 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/handler/impl/ProtonHandlerImpl.java @@ -89,6 +89,7 @@ public class ProtonHandlerImpl extends ProtonInitializable implements ProtonHand } } + @Override public Object getLock() { return lock; } @@ -229,6 +230,7 @@ public class ProtonHandlerImpl extends ProtonInitializable implements ProtonHand } } + @Override public void createClientSasl(ClientSASL clientSASL) { if (clientSASL != null) { clientSasl = transport.sasl(); diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/sasl/ClientSASLPlain.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/sasl/ClientSASLPlain.java index 341e7d80db..59685ada5e 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/sasl/ClientSASLPlain.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/sasl/ClientSASLPlain.java @@ -32,10 +32,12 @@ public class ClientSASLPlain implements ClientSASL { this.password = password; } + @Override public String getName() { return "PLAIN"; } + @Override public byte[] getBytes() { if (username == null) { diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/FutureRunnable.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/FutureRunnable.java index d878262077..20095ff2ff 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/FutureRunnable.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/FutureRunnable.java @@ -30,6 +30,7 @@ public class FutureRunnable implements Runnable { this(0); } + @Override public void run() { latch.countDown(); } diff --git a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/ProtonServerMessage.java b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/ProtonServerMessage.java index 9c69147b62..ff9cccadeb 100644 --- a/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/ProtonServerMessage.java +++ b/artemis-protocols/artemis-proton-plug/src/main/java/org/proton/plug/util/ProtonServerMessage.java @@ -122,6 +122,7 @@ public class ProtonServerMessage implements ProtonJMessage { encode(writableBuffer); } + @Override public int encode(WritableBuffer writableBuffer) { final int firstPosition = writableBuffer.position(); diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/ProtonTest.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/ProtonTest.java index e8be646089..317f3addf7 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/ProtonTest.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/ProtonTest.java @@ -77,6 +77,7 @@ public class ProtonTest extends AbstractJMSTest { connection = createConnection(); } + @Override @After public void tearDown() throws Exception { if (connection != null) { diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/invm/ProtonINVMSPI.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/invm/ProtonINVMSPI.java index 27271e4575..aff0fa1e82 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/invm/ProtonINVMSPI.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/invm/ProtonINVMSPI.java @@ -43,11 +43,13 @@ public class ProtonINVMSPI implements AMQPConnectionCallback { public ProtonINVMSPI() { mainExecutor.execute(new Runnable() { + @Override public void run() { Thread.currentThread().setName("MainExecutor-INVM"); } }); returningExecutor.execute(new Runnable() { + @Override public void run() { Thread.currentThread().setName("ReturningExecutor-INVM"); } @@ -73,6 +75,7 @@ public class ProtonINVMSPI implements AMQPConnectionCallback { bytes.retain(); mainExecutor.execute(new Runnable() { + @Override public void run() { try { if (DebugInfo.debug) { @@ -130,6 +133,7 @@ public class ProtonINVMSPI implements AMQPConnectionCallback { bytes.retain(); returningExecutor.execute(new Runnable() { + @Override public void run() { try { diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/AMQPClientSPI.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/AMQPClientSPI.java index 8ef45eb058..80ab8a8c35 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/AMQPClientSPI.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/AMQPClientSPI.java @@ -41,10 +41,12 @@ public class AMQPClientSPI implements AMQPConnectionCallback { this.channel = channel; } + @Override public void setConnection(AMQPConnectionContext connection) { this.connection = connection; } + @Override public AMQPConnectionContext getConnection() { return connection; } diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/SimpleAMQPConnector.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/SimpleAMQPConnector.java index 088e7a10a4..bb7d0d46b4 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/SimpleAMQPConnector.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalclient/SimpleAMQPConnector.java @@ -35,6 +35,7 @@ public class SimpleAMQPConnector implements Connector { private Bootstrap bootstrap; + @Override public void start() { bootstrap = new Bootstrap(); @@ -42,11 +43,13 @@ public class SimpleAMQPConnector implements Connector { bootstrap.group(new NioEventLoopGroup(10)); bootstrap.handler(new ChannelInitializer() { + @Override public void initChannel(Channel channel) throws Exception { } }); } + @Override public AMQPClientConnectionContext connect(String host, int port) throws Exception { SocketAddress remoteDestination = new InetSocketAddress(host, port); diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalConnectionSPI.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalConnectionSPI.java index 2dd6befbc9..412114fe1a 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalConnectionSPI.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalConnectionSPI.java @@ -51,10 +51,12 @@ public class MinimalConnectionSPI implements AMQPConnectionCallback { executorService.shutdown(); } + @Override public void setConnection(AMQPConnectionContext connection) { this.connection = connection; } + @Override public AMQPConnectionContext getConnection() { return connection; } diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalSessionSPI.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalSessionSPI.java index c4b939ca28..c6d8a0d829 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalSessionSPI.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/MinimalSessionSPI.java @@ -49,6 +49,7 @@ public class MinimalSessionSPI implements AMQPSessionCallback { static AtomicInteger tempQueueGenerator = new AtomicInteger(0); + @Override public String tempQueueName() { return "TempQueueName" + tempQueueGenerator.incrementAndGet(); } @@ -162,6 +163,7 @@ public class MinimalSessionSPI implements AMQPSessionCallback { if (thread == null) { System.out.println("Start!!!"); thread = new Thread() { + @Override public void run() { try { while (running) { diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java index 23da4260b0..ac1d28f8b4 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/minimalserver/SimpleServerThreadFactory.java @@ -43,6 +43,7 @@ public final class SimpleServerThreadFactory implements ThreadFactory { this.daemon = daemon; } + @Override public Thread newThread(final Runnable command) { final Thread t; // attach the thread to a group only if there is no security manager: @@ -55,6 +56,7 @@ public final class SimpleServerThreadFactory implements ThreadFactory { } AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { t.setDaemon(daemon); t.setPriority(threadPriority); @@ -64,6 +66,7 @@ public final class SimpleServerThreadFactory implements ThreadFactory { try { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { t.setContextClassLoader(tccl); return null; diff --git a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/util/CreditsSemaphoreTest.java b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/util/CreditsSemaphoreTest.java index 58e6774bf7..b7ae38b942 100644 --- a/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/util/CreditsSemaphoreTest.java +++ b/artemis-protocols/artemis-proton-plug/src/test/java/org/proton/plug/test/util/CreditsSemaphoreTest.java @@ -35,6 +35,7 @@ public class CreditsSemaphoreTest { final CountDownLatch waiting = new CountDownLatch(1); Thread thread = new Thread() { + @Override public void run() { try { for (int i = 0; i < 12; i++) { diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java index 61d565aa8c..08bc2e91f4 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java @@ -211,6 +211,7 @@ public final class StompConnection implements RemotingConnection { dataReceived = true; } + @Override public synchronized boolean checkDataReceived() { boolean res = dataReceived; @@ -251,6 +252,7 @@ public final class StompConnection implements RemotingConnection { return ActiveMQBuffers.dynamicBuffer(size); } + @Override public void destroy() { synchronized (failLock) { if (destroyed) { @@ -277,6 +279,7 @@ public final class StompConnection implements RemotingConnection { manager.cleanup(this); } + @Override public void fail(final ActiveMQException me) { synchronized (failLock) { if (destroyed) { @@ -295,43 +298,53 @@ public final class StompConnection implements RemotingConnection { internalClose(); } + @Override public void fail(final ActiveMQException me, String scaleDownTargetNodeID) { fail(me); } + @Override public void flush() { } + @Override public List getFailureListeners() { // we do not return the listeners otherwise the remoting service // would NOT destroy the connection. return Collections.emptyList(); } + @Override public Object getID() { return transportConnection.getID(); } + @Override public String getRemoteAddress() { return transportConnection.getRemoteAddress(); } + @Override public long getCreationTime() { return creationTime; } + @Override public Connection getTransportConnection() { return transportConnection; } + @Override public boolean isClient() { return false; } + @Override public boolean isDestroyed() { return destroyed; } + @Override public void bufferReceived(Object connectionID, ActiveMQBuffer buffer) { manager.handleBuffer(this, buffer); } diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java index 6dcd3512b5..7d069c2d5c 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManager.java @@ -130,6 +130,7 @@ class StompProtocolManager implements ProtocolManager, No // ProtocolManager implementation -------------------------------- + @Override public ConnectionEntry createConnectionEntry(final Acceptor acceptorUsed, final Connection connection) { StompConnection conn = new StompConnection(acceptorUsed, connection, this); @@ -157,9 +158,11 @@ class StompProtocolManager implements ProtocolManager, No } } + @Override public void removeHandler(String name) { } + @Override public void handleBuffer(final RemotingConnection connection, final ActiveMQBuffer buffer) { StompConnection conn = (StompConnection) connection; @@ -267,6 +270,7 @@ class StompProtocolManager implements ProtocolManager, No // Close the session outside of the lock on the StompConnection, otherwise it could dead lock this.executor.execute(new Runnable() { + @Override public void run() { StompSession session = sessions.remove(connection.getID()); if (session != null) { @@ -302,6 +306,7 @@ class StompProtocolManager implements ProtocolManager, No public void sendReply(final StompConnection connection, final StompFrame frame) { server.getStorageManager().afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); @@ -311,6 +316,7 @@ class StompProtocolManager implements ProtocolManager, No send(connection, error); } + @Override public void done() { send(connection, frame); } diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java index 328a74ec05..2d41e03bb2 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompProtocolManagerFactory.java @@ -34,6 +34,7 @@ public class StompProtocolManagerFactory extends AbstractProtocolManagerFactory< private static final String[] SUPPORTED_PROTOCOLS = {STOMP_PROTOCOL_NAME}; + @Override public ProtocolManager createProtocolManager(final ActiveMQServer server, final List incomingInterceptors, List outgoingInterceptors) { diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java index 227b2337da..2b1eaa68cc 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompSession.java @@ -86,12 +86,15 @@ public class StompSession implements SessionCallback { return true; } + @Override public void sendProducerCreditsMessage(int credits, SimpleString address) { } + @Override public void sendProducerCreditsFailMessage(int credits, SimpleString address) { } + @Override public int sendMessage(ServerMessage serverMessage, ServerConsumer consumer, int deliveryCount) { LargeServerMessageImpl largeMessage = null; ServerMessage newServerMessage = serverMessage; @@ -161,6 +164,7 @@ public class StompSession implements SessionCallback { } + @Override public int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, @@ -168,17 +172,21 @@ public class StompSession implements SessionCallback { return 0; } + @Override public int sendLargeMessage(ServerMessage msg, ServerConsumer consumer, long bodySize, int deliveryCount) { return 0; } + @Override public void closed() { } + @Override public void addReadyListener(final ReadyListener listener) { connection.getTransportConnection().addReadyListener(listener); } + @Override public void removeReadyListener(final ReadyListener listener) { connection.getTransportConnection().removeReadyListener(listener); } diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompVersions.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompVersions.java index a2e340d767..adf360c6e8 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompVersions.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompVersions.java @@ -30,6 +30,7 @@ public enum StompVersions { this.version = ver; } + @Override public String toString() { return this.version; } diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java index f606481ffc..6874173672 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameHandlerV11.java @@ -695,6 +695,7 @@ public class StompFrameHandlerV11 extends VersionedStompFrameHandler implements return true; } + @Override protected StompFrame parseBody() throws ActiveMQStompException { byte[] content = null; diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v12/StompFrameHandlerV12.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v12/StompFrameHandlerV12.java index 0aeafe4de4..c774d117cc 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v12/StompFrameHandlerV12.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v12/StompFrameHandlerV12.java @@ -244,6 +244,7 @@ public class StompFrameHandlerV12 extends StompFrameHandlerV11 implements FrameE return true; } + @Override protected StompFrame parseBody() throws ActiveMQStompException { byte[] content = null; diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java index 26ce7fb77d..667d4a572b 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRABytesMessage.java @@ -51,6 +51,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long getBodyLength() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("getBodyLength()"); @@ -65,6 +66,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean readBoolean() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readBoolean()"); @@ -79,6 +81,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public byte readByte() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readByte()"); @@ -95,6 +98,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The result * @throws JMSException Thrown if an error occurs */ + @Override public int readBytes(final byte[] value, final int length) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ", " + length + ")"); @@ -110,6 +114,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The result * @throws JMSException Thrown if an error occurs */ + @Override public int readBytes(final byte[] value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")"); @@ -124,6 +129,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public char readChar() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readChar()"); @@ -138,6 +144,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public double readDouble() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readDouble()"); @@ -152,6 +159,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public float readFloat() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readFloat()"); @@ -166,6 +174,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int readInt() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readInt()"); @@ -180,6 +189,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long readLong() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readLong()"); @@ -194,6 +204,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public short readShort() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readShort()"); @@ -208,6 +219,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int readUnsignedByte() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readUnsignedByte()"); @@ -222,6 +234,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int readUnsignedShort() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readUnsignedShort()"); @@ -236,6 +249,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String readUTF() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("readUTF()"); @@ -249,6 +263,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * * @throws JMSException Thrown if an error occurs */ + @Override public void reset() throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("reset()"); @@ -263,6 +278,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeBoolean(final boolean value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeBoolean(" + value + ")"); @@ -277,6 +293,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeByte(final byte value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeByte(" + value + ")"); @@ -293,6 +310,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param length The length * @throws JMSException Thrown if an error occurs */ + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")"); @@ -307,6 +325,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeBytes(final byte[] value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ")"); @@ -321,6 +340,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeChar(final char value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeChar(" + value + ")"); @@ -335,6 +355,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeDouble(final double value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeDouble(" + value + ")"); @@ -349,6 +370,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeFloat(final float value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeFloat(" + value + ")"); @@ -363,6 +385,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeInt(final int value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeInt(" + value + ")"); @@ -377,6 +400,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeLong(final long value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeLong(" + value + ")"); @@ -391,6 +415,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeObject(final Object value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeObject(" + value + ")"); @@ -405,6 +430,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeShort(final short value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeShort(" + value + ")"); @@ -419,6 +445,7 @@ public class ActiveMQRABytesMessage extends ActiveMQRAMessage implements BytesMe * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeUTF(final String value) throws JMSException { if (ActiveMQRABytesMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeUTF(" + value + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java index 65078c3ee4..2a1b706c02 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionFactoryImpl.java @@ -98,6 +98,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * * @param reference The reference */ + @Override public void setReference(final Reference reference) { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("setReference(" + reference + ")"); @@ -111,6 +112,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * * @return The reference */ + @Override public Reference getReference() { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("getReference()"); @@ -134,6 +136,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public QueueConnection createQueueConnection() throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createQueueConnection()"); @@ -156,6 +159,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public QueueConnection createQueueConnection(final String userName, final String password) throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createQueueConnection(" + userName + ", ****)"); @@ -180,6 +184,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public TopicConnection createTopicConnection() throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createTopicConnection()"); @@ -202,6 +207,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public TopicConnection createTopicConnection(final String userName, final String password) throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createTopicConnection(" + userName + ", ****)"); @@ -225,6 +231,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public Connection createConnection() throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createConnection()"); @@ -247,6 +254,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public Connection createConnection(final String userName, final String password) throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createConnection(" + userName + ", ****)"); @@ -271,6 +279,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public XAQueueConnection createXAQueueConnection() throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXAQueueConnection()"); @@ -293,6 +302,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public XAQueueConnection createXAQueueConnection(final String userName, final String password) throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXAQueueConnection(" + userName + ", ****)"); @@ -316,6 +326,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public XATopicConnection createXATopicConnection() throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXATopicConnection()"); @@ -338,6 +349,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public XATopicConnection createXATopicConnection(final String userName, final String password) throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXATopicConnection(" + userName + ", ****)"); @@ -361,6 +373,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public XAConnection createXAConnection() throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXAConnection()"); @@ -383,6 +396,7 @@ public class ActiveMQRAConnectionFactoryImpl implements ActiveMQRAConnectionFact * @return The connection * @throws JMSException Thrown if the operation fails */ + @Override public XAConnection createXAConnection(final String userName, final String password) throws JMSException { if (ActiveMQRAConnectionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXAConnection(" + userName + ", ****)"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java index e9784aa184..bb0d0f3831 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionManager.java @@ -57,6 +57,7 @@ public class ActiveMQRAConnectionManager implements ConnectionManager { * @return The connection * @throws ResourceException Thrown if there is a problem obtaining the connection */ + @Override public Object allocateConnection(final ManagedConnectionFactory mcf, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRAConnectionManager.trace) { diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java index 0b9251ac96..9a222892c7 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAConnectionMetaData.java @@ -45,6 +45,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The version */ + @Override public String getJMSVersion() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getJMSVersion()"); @@ -58,6 +59,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The major version */ + @Override public int getJMSMajorVersion() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getJMSMajorVersion()"); @@ -71,6 +73,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The minor version */ + @Override public int getJMSMinorVersion() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getJMSMinorVersion()"); @@ -84,6 +87,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The name */ + @Override public String getJMSProviderName() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getJMSProviderName()"); @@ -97,6 +101,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The version */ + @Override public String getProviderVersion() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getJMSProviderName()"); @@ -110,6 +115,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The version */ + @Override public int getProviderMajorVersion() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getProviderMajorVersion()"); @@ -123,6 +129,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The version */ + @Override public int getProviderMinorVersion() { if (ActiveMQRAConnectionMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getProviderMinorVersion()"); @@ -136,6 +143,7 @@ public class ActiveMQRAConnectionMetaData implements ConnectionMetaData { * * @return The names */ + @Override public Enumeration getJMSXPropertyNames() { Vector v = new Vector(); v.add("JMSXGroupID"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java index d6eccc790b..8a38e45666 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRACredential.java @@ -197,6 +197,7 @@ public class ActiveMQRACredential implements Serializable { * * @return The credential */ + @Override public PasswordCredential run() { if (ActiveMQRACredential.trace) { ActiveMQRALogger.LOGGER.trace("run()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java index c24cdea386..7857255e21 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRALocalTransaction.java @@ -53,6 +53,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction { * * @throws ResourceException Thrown if the operation fails */ + @Override public void begin() throws ResourceException { if (ActiveMQRALocalTransaction.trace) { ActiveMQRALogger.LOGGER.trace("begin()"); @@ -66,6 +67,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction { * * @throws ResourceException Thrown if the operation fails */ + @Override public void commit() throws ResourceException { if (ActiveMQRALocalTransaction.trace) { ActiveMQRALogger.LOGGER.trace("commit()"); @@ -91,6 +93,7 @@ public class ActiveMQRALocalTransaction implements LocalTransaction { * * @throws ResourceException Thrown if the operation fails */ + @Override public void rollback() throws ResourceException { if (ActiveMQRALocalTransaction.trace) { ActiveMQRALogger.LOGGER.trace("rollback()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnection.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnection.java index 9f628ed778..800972c863 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnection.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnection.java @@ -189,6 +189,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @return The connection * @throws ResourceException Thrown if an error occurs */ + @Override public synchronized Object getConnection(final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRAManagedConnection.trace) { @@ -248,6 +249,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * * @throws ResourceException Could not property close the session and connection. */ + @Override public void destroy() throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("destroy()"); @@ -314,6 +316,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * * @throws ResourceException Thrown if an error occurs */ + @Override public void cleanup() throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("cleanup()"); @@ -343,6 +346,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @throws ResourceException Failed to associate connection. * @throws IllegalStateException ManagedConnection in an illegal state. */ + @Override public void associateConnection(final Object obj) throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("associateConnection(" + obj + ")"); @@ -433,6 +437,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * * @param l The connection event listener to be added. */ + @Override public void addConnectionEventListener(final ConnectionEventListener l) { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("addConnectionEventListener(" + l + ")"); @@ -446,6 +451,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * * @param l The connection event listener to be removed. */ + @Override public void removeConnectionEventListener(final ConnectionEventListener l) { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("removeConnectionEventListener(" + l + ")"); @@ -460,6 +466,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @return The XAResource for the connection. * @throws ResourceException XA transaction not supported */ + @Override public XAResource getXAResource() throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("getXAResource()"); @@ -493,6 +500,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @return The local transaction for the connection. * @throws ResourceException Thrown if operation fails. */ + @Override public LocalTransaction getLocalTransaction() throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("getLocalTransaction()"); @@ -514,6 +522,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @throws ResourceException Thrown if the operation fails. * @throws IllegalStateException Thrown if the managed connection already is destroyed. */ + @Override public ManagedConnectionMetaData getMetaData() throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("getMetaData()"); @@ -532,6 +541,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @param out The log writer * @throws ResourceException If operation fails */ + @Override public void setLogWriter(final PrintWriter out) throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("setLogWriter(" + out + ")"); @@ -544,6 +554,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * @return Always null * @throws ResourceException If operation fails */ + @Override public PrintWriter getLogWriter() throws ResourceException { if (ActiveMQRAManagedConnection.trace) { ActiveMQRALogger.LOGGER.trace("getLogWriter()"); @@ -557,6 +568,7 @@ public final class ActiveMQRAManagedConnection implements ManagedConnection, Exc * * @param exception The JMS exception */ + @Override public void onException(final JMSException exception) { if (ActiveMQConnection.EXCEPTION_FAILOVER.equals(exception.getErrorCode())) { return; diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java index 6f4fdacebf..e2e7fc06b4 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAManagedConnectionFactory.java @@ -92,6 +92,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @return javax.resource.cci.ConnectionFactory instance * @throws ResourceException Thrown if a connection factory can't be created */ + @Override public Object createConnectionFactory() throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.debug("createConnectionFactory()"); @@ -107,6 +108,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @return javax.resource.cci.ConnectionFactory instance * @throws ResourceException Thrown if a connection factory can't be created */ + @Override public Object createConnectionFactory(final ConnectionManager cxManager) throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace("createConnectionFactory(" + cxManager + ")"); @@ -132,6 +134,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @return The managed connection * @throws ResourceException Thrown if a managed connection can't be created */ + @Override public ManagedConnection createManagedConnection(final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { @@ -180,6 +183,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @return The managed connection * @throws ResourceException Thrown if the managed connection can not be found */ + @Override public ManagedConnection matchManagedConnections(@SuppressWarnings("rawtypes") final Set connectionSet, final Subject subject, final ConnectionRequestInfo cxRequestInfo) throws ResourceException { @@ -233,6 +237,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @param out The writer * @throws ResourceException Thrown if the writer can't be set */ + @Override public void setLogWriter(final PrintWriter out) throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace("setLogWriter(" + out + ")"); @@ -245,6 +250,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @return The writer * @throws ResourceException Thrown if the writer can't be retrieved */ + @Override public PrintWriter getLogWriter() throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace("getLogWriter()"); @@ -258,6 +264,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * * @return The resource adapter */ + @Override public ResourceAdapter getResourceAdapter() { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace("getResourceAdapter()"); @@ -274,6 +281,7 @@ public final class ActiveMQRAManagedConnectionFactory implements ManagedConnecti * @param ra The resource adapter * @throws ResourceException Thrown if incorrect resource adapter */ + @Override public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException { if (ActiveMQRAManagedConnectionFactory.trace) { ActiveMQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java index a507a63f8c..c22cc8d9c3 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMapMessage.java @@ -53,6 +53,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean getBoolean(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getBoolean(" + name + ")"); @@ -68,6 +69,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public byte getByte(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getByte(" + name + ")"); @@ -83,6 +85,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public byte[] getBytes(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getBytes(" + name + ")"); @@ -98,6 +101,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public char getChar(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getChar(" + name + ")"); @@ -113,6 +117,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public double getDouble(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getDouble(" + name + ")"); @@ -128,6 +133,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public float getFloat(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getFloat(" + name + ")"); @@ -143,6 +149,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int getInt(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getInt(" + name + ")"); @@ -158,6 +165,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long getLong(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getLong(" + name + ")"); @@ -172,6 +180,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The values * @throws JMSException Thrown if an error occurs */ + @Override @SuppressWarnings("rawtypes") public Enumeration getMapNames() throws JMSException { if (ActiveMQRAMapMessage.trace) { @@ -188,6 +197,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public Object getObject(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getObject(" + name + ")"); @@ -203,6 +213,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public short getShort(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getShort(" + name + ")"); @@ -218,6 +229,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String getString(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("getString(" + name + ")"); @@ -233,6 +245,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @return True / false * @throws JMSException Thrown if an error occurs */ + @Override public boolean itemExists(final String name) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("itemExists(" + name + ")"); @@ -248,6 +261,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setBoolean(final String name, final boolean value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setBoolean(" + name + ", " + value + ")"); @@ -263,6 +277,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setByte(final String name, final byte value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setByte(" + name + ", " + value + ")"); @@ -280,6 +295,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param length The length * @throws JMSException Thrown if an error occurs */ + @Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ", " + offset + ", " + @@ -296,6 +312,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setBytes(final String name, final byte[] value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setBytes(" + name + ", " + Arrays.toString(value) + ")"); @@ -311,6 +328,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setChar(final String name, final char value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setChar(" + name + ", " + value + ")"); @@ -326,6 +344,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setDouble(final String name, final double value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setDouble(" + name + ", " + value + ")"); @@ -341,6 +360,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setFloat(final String name, final float value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setFloat(" + name + ", " + value + ")"); @@ -356,6 +376,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setInt(final String name, final int value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setInt(" + name + ", " + value + ")"); @@ -371,6 +392,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setLong(final String name, final long value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setLong(" + name + ", " + value + ")"); @@ -386,6 +408,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setObject(final String name, final Object value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setObject(" + name + ", " + value + ")"); @@ -401,6 +424,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setShort(final String name, final short value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setShort(" + name + ", " + value + ")"); @@ -416,6 +440,7 @@ public class ActiveMQRAMapMessage extends ActiveMQRAMessage implements MapMessag * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setString(final String name, final String value) throws JMSException { if (ActiveMQRAMapMessage.trace) { ActiveMQRALogger.LOGGER.trace("setString(" + name + ", " + value + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java index e9f25ffbab..7872459d62 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessage.java @@ -62,6 +62,7 @@ public class ActiveMQRAMessage implements Message { * * @throws JMSException Thrown if an error occurs */ + @Override public void acknowledge() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("acknowledge()"); @@ -76,6 +77,7 @@ public class ActiveMQRAMessage implements Message { * * @throws JMSException Thrown if an error occurs */ + @Override public void clearBody() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("clearBody()"); @@ -89,6 +91,7 @@ public class ActiveMQRAMessage implements Message { * * @throws JMSException Thrown if an error occurs */ + @Override public void clearProperties() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("clearProperties()"); @@ -104,6 +107,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean getBooleanProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getBooleanProperty(" + name + ")"); @@ -119,6 +123,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public byte getByteProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getByteProperty(" + name + ")"); @@ -134,6 +139,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public double getDoubleProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getDoubleProperty(" + name + ")"); @@ -149,6 +155,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public float getFloatProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getFloatProperty(" + name + ")"); @@ -164,6 +171,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int getIntProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getIntProperty(" + name + ")"); @@ -178,6 +186,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String getJMSCorrelationID() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSCorrelationID()"); @@ -192,6 +201,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public byte[] getJMSCorrelationIDAsBytes() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSCorrelationIDAsBytes()"); @@ -206,6 +216,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int getJMSDeliveryMode() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSDeliveryMode()"); @@ -220,6 +231,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public Destination getJMSDestination() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSDestination()"); @@ -234,6 +246,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long getJMSExpiration() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSExpiration()"); @@ -248,6 +261,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String getJMSMessageID() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSMessageID()"); @@ -262,6 +276,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int getJMSPriority() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSPriority()"); @@ -276,6 +291,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean getJMSRedelivered() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSRedelivered()"); @@ -290,6 +306,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public Destination getJMSReplyTo() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSReplyTo()"); @@ -304,6 +321,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long getJMSTimestamp() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSTimestamp()"); @@ -318,6 +336,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String getJMSType() throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getJMSType()"); @@ -333,6 +352,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long getLongProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getLongProperty(" + name + ")"); @@ -348,6 +368,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public Object getObjectProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getObjectProperty(" + name + ")"); @@ -362,6 +383,7 @@ public class ActiveMQRAMessage implements Message { * @return The values * @throws JMSException Thrown if an error occurs */ + @Override @SuppressWarnings("rawtypes") public Enumeration getPropertyNames() throws JMSException { if (ActiveMQRAMessage.trace) { @@ -378,6 +400,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public short getShortProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getShortProperty(" + name + ")"); @@ -393,6 +416,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String getStringProperty(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("getStringProperty(" + name + ")"); @@ -408,6 +432,7 @@ public class ActiveMQRAMessage implements Message { * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean propertyExists(final String name) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("propertyExists(" + name + ")"); @@ -423,6 +448,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setBooleanProperty(final String name, final boolean value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setBooleanProperty(" + name + ", " + value + ")"); @@ -438,6 +464,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setByteProperty(final String name, final byte value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setByteProperty(" + name + ", " + value + ")"); @@ -453,6 +480,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setDoubleProperty(final String name, final double value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setDoubleProperty(" + name + ", " + value + ")"); @@ -468,6 +496,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setFloatProperty(final String name, final float value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setFloatProperty(" + name + ", " + value + ")"); @@ -483,6 +512,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setIntProperty(final String name, final int value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setIntProperty(" + name + ", " + value + ")"); @@ -497,6 +527,7 @@ public class ActiveMQRAMessage implements Message { * @param correlationID The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSCorrelationID(final String correlationID) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSCorrelationID(" + correlationID + ")"); @@ -511,6 +542,7 @@ public class ActiveMQRAMessage implements Message { * @param correlationID The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSCorrelationIDAsBytes(" + Arrays.toString(correlationID) + ")"); @@ -525,6 +557,7 @@ public class ActiveMQRAMessage implements Message { * @param deliveryMode The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSDeliveryMode(final int deliveryMode) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSDeliveryMode(" + deliveryMode + ")"); @@ -539,6 +572,7 @@ public class ActiveMQRAMessage implements Message { * @param destination The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSDestination(final Destination destination) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSDestination(" + destination + ")"); @@ -553,6 +587,7 @@ public class ActiveMQRAMessage implements Message { * @param expiration The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSExpiration(final long expiration) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSExpiration(" + expiration + ")"); @@ -567,6 +602,7 @@ public class ActiveMQRAMessage implements Message { * @param id The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSMessageID(final String id) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSMessageID(" + id + ")"); @@ -581,6 +617,7 @@ public class ActiveMQRAMessage implements Message { * @param priority The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSPriority(final int priority) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSPriority(" + priority + ")"); @@ -595,6 +632,7 @@ public class ActiveMQRAMessage implements Message { * @param redelivered The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSRedelivered(final boolean redelivered) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSRedelivered(" + redelivered + ")"); @@ -609,6 +647,7 @@ public class ActiveMQRAMessage implements Message { * @param replyTo The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSReplyTo(final Destination replyTo) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSReplyTo(" + replyTo + ")"); @@ -623,6 +662,7 @@ public class ActiveMQRAMessage implements Message { * @param timestamp The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSTimestamp(final long timestamp) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSTimestamp(" + timestamp + ")"); @@ -637,6 +677,7 @@ public class ActiveMQRAMessage implements Message { * @param type The value * @throws JMSException Thrown if an error occurs */ + @Override public void setJMSType(final String type) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setJMSType(" + type + ")"); @@ -652,6 +693,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setLongProperty(final String name, final long value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setLongProperty(" + name + ", " + value + ")"); @@ -667,6 +709,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setObjectProperty(final String name, final Object value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setObjectProperty(" + name + ", " + value + ")"); @@ -682,6 +725,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setShortProperty(final String name, final short value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setShortProperty(" + name + ", " + value + ")"); @@ -697,6 +741,7 @@ public class ActiveMQRAMessage implements Message { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setStringProperty(final String name, final String value) throws JMSException { if (ActiveMQRAMessage.trace) { ActiveMQRALogger.LOGGER.trace("setStringProperty(" + name + ", " + value + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java index 957cbdc833..73ec6c2757 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageConsumer.java @@ -70,6 +70,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * * @throws JMSException Thrown if an error occurs */ + @Override public void close() throws JMSException { if (ActiveMQRAMessageConsumer.trace) { ActiveMQRALogger.LOGGER.trace("close " + this); @@ -100,6 +101,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * @return The listener * @throws JMSException Thrown if an error occurs */ + @Override public MessageListener getMessageListener() throws JMSException { if (ActiveMQRAMessageConsumer.trace) { ActiveMQRALogger.LOGGER.trace("getMessageListener()"); @@ -116,6 +118,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * @param listener The listener * @throws JMSException Thrown if an error occurs */ + @Override public void setMessageListener(final MessageListener listener) throws JMSException { session.lock(); try { @@ -139,6 +142,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * @return The selector * @throws JMSException Thrown if an error occurs */ + @Override public String getMessageSelector() throws JMSException { if (ActiveMQRAMessageConsumer.trace) { ActiveMQRALogger.LOGGER.trace("getMessageSelector()"); @@ -154,6 +158,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public Message receive() throws JMSException { session.lock(); try { @@ -187,6 +192,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public Message receive(final long timeout) throws JMSException { session.lock(); try { @@ -219,6 +225,7 @@ public class ActiveMQRAMessageConsumer implements MessageConsumer { * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public Message receiveNoWait() throws JMSException { session.lock(); try { diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java index d6110d587f..8ad0736ec2 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageListener.java @@ -59,6 +59,7 @@ public class ActiveMQRAMessageListener implements MessageListener { * * @param message The message */ + @Override public void onMessage(Message message) { if (ActiveMQRAMessageListener.trace) { ActiveMQRALogger.LOGGER.trace("onMessage(" + message + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java index 561245f033..41337f65a3 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMessageProducer.java @@ -66,6 +66,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * * @throws JMSException Thrown if an error occurs */ + @Override public void close() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("close " + this); @@ -88,6 +89,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param timeToLive The time to live * @throws JMSException Thrown if an error occurs */ + @Override public void send(final Destination destination, final Message message, final int deliveryMode, @@ -129,6 +131,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param message The message * @throws JMSException Thrown if an error occurs */ + @Override public void send(final Destination destination, final Message message) throws JMSException { session.lock(); try { @@ -158,6 +161,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param timeToLive The time to live * @throws JMSException Thrown if an error occurs */ + @Override public void send(final Message message, final int deliveryMode, final int priority, @@ -195,6 +199,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param message The message * @throws JMSException Thrown if an error occurs */ + @Override public void send(final Message message) throws JMSException { session.lock(); try { @@ -221,6 +226,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @return The mode * @throws JMSException Thrown if an error occurs */ + @Override public int getDeliveryMode() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("getDeliveryMode()"); @@ -235,6 +241,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @return The destination * @throws JMSException Thrown if an error occurs */ + @Override public Destination getDestination() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("getDestination()"); @@ -249,6 +256,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @return True if disable * @throws JMSException Thrown if an error occurs */ + @Override public boolean getDisableMessageID() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("getDisableMessageID()"); @@ -263,6 +271,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @return True if disable * @throws JMSException Thrown if an error occurs */ + @Override public boolean getDisableMessageTimestamp() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("getDisableMessageTimestamp()"); @@ -277,6 +286,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @return The priority * @throws JMSException Thrown if an error occurs */ + @Override public int getPriority() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("getPriority()"); @@ -291,6 +301,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @return The ttl * @throws JMSException Thrown if an error occurs */ + @Override public long getTimeToLive() throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("getTimeToLive()"); @@ -305,6 +316,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param deliveryMode The mode * @throws JMSException Thrown if an error occurs */ + @Override public void setDeliveryMode(final int deliveryMode) throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("setDeliveryMode(" + deliveryMode + ")"); @@ -319,6 +331,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setDisableMessageID(final boolean value) throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("setDisableMessageID(" + value + ")"); @@ -333,6 +346,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void setDisableMessageTimestamp(final boolean value) throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("setDisableMessageTimestamp(" + value + ")"); @@ -347,6 +361,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param defaultPriority The value * @throws JMSException Thrown if an error occurs */ + @Override public void setPriority(final int defaultPriority) throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("setPriority(" + defaultPriority + ")"); @@ -361,6 +376,7 @@ public class ActiveMQRAMessageProducer implements MessageProducer { * @param timeToLive The value * @throws JMSException Thrown if an error occurs */ + @Override public void setTimeToLive(final long timeToLive) throws JMSException { if (ActiveMQRAMessageProducer.trace) { ActiveMQRALogger.LOGGER.trace("setTimeToLive(" + timeToLive + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java index da33ca9388..387b886f8d 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAMetaData.java @@ -53,6 +53,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData { * @return The name * @throws ResourceException Thrown if operation fails */ + @Override public String getEISProductName() throws ResourceException { if (ActiveMQRAMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getEISProductName()"); @@ -67,6 +68,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData { * @return The version * @throws ResourceException Thrown if operation fails */ + @Override public String getEISProductVersion() throws ResourceException { if (ActiveMQRAMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getEISProductVersion()"); @@ -81,6 +83,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData { * @return The user name * @throws ResourceException Thrown if operation fails */ + @Override public String getUserName() throws ResourceException { if (ActiveMQRAMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getUserName()"); @@ -95,6 +98,7 @@ public class ActiveMQRAMetaData implements ManagedConnectionMetaData { * @return The number * @throws ResourceException Thrown if operation fails */ + @Override public int getMaxConnections() throws ResourceException { if (ActiveMQRAMetaData.trace) { ActiveMQRALogger.LOGGER.trace("getMaxConnections()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java index 340450de92..c343917a71 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAObjectMessage.java @@ -51,6 +51,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object * @return The object * @throws JMSException Thrown if an error occurs */ + @Override public Serializable getObject() throws JMSException { if (ActiveMQRAObjectMessage.trace) { ActiveMQRALogger.LOGGER.trace("getObject()"); @@ -65,6 +66,7 @@ public class ActiveMQRAObjectMessage extends ActiveMQRAMessage implements Object * @param object The object * @throws JMSException Thrown if an error occurs */ + @Override public void setObject(final Serializable object) throws JMSException { if (ActiveMQRAObjectMessage.trace) { ActiveMQRALogger.LOGGER.trace("setObject(" + object + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java index 8bcf6ec782..bfd8227415 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueReceiver.java @@ -50,6 +50,7 @@ public class ActiveMQRAQueueReceiver extends ActiveMQRAMessageConsumer implement * @return The queue * @throws JMSException Thrown if an error occurs */ + @Override public Queue getQueue() throws JMSException { if (ActiveMQRAQueueReceiver.trace) { ActiveMQRALogger.LOGGER.trace("getQueue()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java index 66128ee694..90fb8eaf0b 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAQueueSender.java @@ -51,6 +51,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements * @return The queue * @throws JMSException Thrown if an error occurs */ + @Override public Queue getQueue() throws JMSException { if (ActiveMQRAQueueSender.trace) { ActiveMQRALogger.LOGGER.trace("getQueue()"); @@ -69,6 +70,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements * @param timeToLive The time to live * @throws JMSException Thrown if an error occurs */ + @Override public void send(final Queue destination, final Message message, final int deliveryMode, @@ -109,6 +111,7 @@ public class ActiveMQRAQueueSender extends ActiveMQRAMessageProducer implements * @param message The message * @throws JMSException Thrown if an error occurs */ + @Override public void send(final Queue destination, final Message message) throws JMSException { session.lock(); try { diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java index b5b588a25e..2ea9626d11 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASession.java @@ -165,6 +165,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public BytesMessage createBytesMessage() throws JMSException { Session session = getSessionInternal(); @@ -181,6 +182,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public MapMessage createMapMessage() throws JMSException { Session session = getSessionInternal(); @@ -197,6 +199,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public Message createMessage() throws JMSException { Session session = getSessionInternal(); @@ -213,6 +216,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public ObjectMessage createObjectMessage() throws JMSException { Session session = getSessionInternal(); @@ -230,6 +234,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public ObjectMessage createObjectMessage(final Serializable object) throws JMSException { Session session = getSessionInternal(); @@ -246,6 +251,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public StreamMessage createStreamMessage() throws JMSException { Session session = getSessionInternal(); @@ -262,6 +268,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public TextMessage createTextMessage() throws JMSException { Session session = getSessionInternal(); @@ -279,6 +286,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message * @throws JMSException Thrown if an error occurs */ + @Override public TextMessage createTextMessage(final String string) throws JMSException { Session session = getSessionInternal(); @@ -295,6 +303,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return True if transacted; otherwise false * @throws JMSException Thrown if an error occurs */ + @Override public boolean getTransacted() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getTransacted()"); @@ -310,6 +319,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message listener * @throws JMSException Thrown if an error occurs */ + @Override public MessageListener getMessageListener() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getMessageListener()"); @@ -324,6 +334,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @param listener The message listener * @throws JMSException Thrown if an error occurs */ + @Override public void setMessageListener(final MessageListener listener) throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("setMessageListener(" + listener + ")"); @@ -337,6 +348,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * * @throws Error Method not allowed. */ + @Override public void run() { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("run()"); @@ -351,6 +363,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * * @throws JMSException Failed to close session. */ + @Override public void close() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("close()"); @@ -365,6 +378,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * * @throws JMSException Failed to close session. */ + @Override public void commit() throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.XA_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { @@ -395,6 +409,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * * @throws JMSException Failed to close session. */ + @Override public void rollback() throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.XA_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { @@ -425,6 +440,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * * @throws JMSException Failed to close session. */ + @Override public void recover() throws JMSException { lock(); try { @@ -452,6 +468,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The topic * @throws JMSException Thrown if an error occurs */ + @Override public Topic createTopic(final String topicName) throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot create topic for javax.jms.QueueSession"); @@ -479,6 +496,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The subscriber * @throws JMSException Thrown if an error occurs */ + @Override public TopicSubscriber createSubscriber(final Topic topic) throws JMSException { lock(); try { @@ -513,6 +531,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The subscriber * @throws JMSException Thrown if an error occurs */ + @Override public TopicSubscriber createSubscriber(final Topic topic, final String messageSelector, final boolean noLocal) throws JMSException { @@ -554,6 +573,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The subscriber * @throws JMSException Thrown if an error occurs */ + @Override public TopicSubscriber createDurableSubscriber(final Topic topic, final String name) throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot create durable subscriber from javax.jms.QueueSession"); @@ -593,6 +613,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The subscriber * @throws JMSException Thrown if an error occurs */ + @Override public TopicSubscriber createDurableSubscriber(final Topic topic, final String name, final String messageSelector, @@ -636,6 +657,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The publisher * @throws JMSException Thrown if an error occurs */ + @Override public TopicPublisher createPublisher(final Topic topic) throws JMSException { lock(); try { @@ -667,6 +689,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The temporary topic * @throws JMSException Thrown if an error occurs */ + @Override public TemporaryTopic createTemporaryTopic() throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot create temporary topic for javax.jms.QueueSession"); @@ -701,6 +724,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @param name The name * @throws JMSException Thrown if an error occurs */ + @Override public void unsubscribe(final String name) throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.QUEUE_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_QUEUE_CONNECTION) { throw new IllegalStateException("Cannot unsubscribe for javax.jms.QueueSession"); @@ -728,6 +752,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The browser * @throws JMSException Thrown if an error occurs */ + @Override public QueueBrowser createBrowser(final Queue queue) throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create browser for javax.jms.TopicSession"); @@ -756,6 +781,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The browser * @throws JMSException Thrown if an error occurs */ + @Override public QueueBrowser createBrowser(final Queue queue, final String messageSelector) throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create browser for javax.jms.TopicSession"); @@ -783,6 +809,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The queue * @throws JMSException Thrown if an error occurs */ + @Override public Queue createQueue(final String queueName) throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create browser or javax.jms.TopicSession"); @@ -810,6 +837,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The queue receiver * @throws JMSException Thrown if an error occurs */ + @Override public QueueReceiver createReceiver(final Queue queue) throws JMSException { lock(); try { @@ -843,6 +871,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The queue receiver * @throws JMSException Thrown if an error occurs */ + @Override public QueueReceiver createReceiver(final Queue queue, final String messageSelector) throws JMSException { lock(); try { @@ -875,6 +904,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The queue sender * @throws JMSException Thrown if an error occurs */ + @Override public QueueSender createSender(final Queue queue) throws JMSException { lock(); try { @@ -906,6 +936,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The temporary queue * @throws JMSException Thrown if an error occurs */ + @Override public TemporaryQueue createTemporaryQueue() throws JMSException { if (cri.getType() == ActiveMQRAConnectionFactory.TOPIC_CONNECTION || cri.getType() == ActiveMQRAConnectionFactory.XA_TOPIC_CONNECTION) { throw new IllegalStateException("Cannot create temporary queue for javax.jms.TopicSession"); @@ -941,6 +972,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message consumer * @throws JMSException Thrown if an error occurs */ + @Override public MessageConsumer createConsumer(final Destination destination) throws JMSException { lock(); try { @@ -974,6 +1006,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message consumer * @throws JMSException Thrown if an error occurs */ + @Override public MessageConsumer createConsumer(final Destination destination, final String messageSelector) throws JMSException { lock(); @@ -1013,6 +1046,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message consumer * @throws JMSException Thrown if an error occurs */ + @Override public MessageConsumer createConsumer(final Destination destination, final String messageSelector, final boolean noLocal) throws JMSException { @@ -1053,6 +1087,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The message producer * @throws JMSException Thrown if an error occurs */ + @Override public MessageProducer createProducer(final Destination destination) throws JMSException { lock(); try { @@ -1084,6 +1119,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The mode * @throws JMSException Thrown if an error occurs */ + @Override public int getAcknowledgeMode() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getAcknowledgeMode()"); @@ -1096,6 +1132,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu /** * Get the XA resource */ + @Override public XAResource getXAResource() { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getXAResource()"); @@ -1136,6 +1173,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The session * @throws JMSException Thrown if an error occurs */ + @Override public Session getSession() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getNonXAsession()"); @@ -1161,6 +1199,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The queue session * @throws JMSException Thrown if an error occurs */ + @Override public QueueSession getQueueSession() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getQueueSession()"); @@ -1186,6 +1225,7 @@ public final class ActiveMQRASession implements QueueSession, TopicSession, XAQu * @return The topic session * @throws JMSException Thrown if an error occurs */ + @Override public TopicSession getTopicSession() throws JMSException { if (ActiveMQRASession.trace) { ActiveMQRALogger.LOGGER.trace("getTopicSession()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java index d6d2eabef0..655ad25172 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRASessionFactoryImpl.java @@ -149,6 +149,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon } } + @Override public JMSContext createContext(int sessionMode) { boolean inJtaTx = inJtaTransaction(); int sessionModeToUse; @@ -180,6 +181,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon return new ActiveMQRAJMSContext(this, sessionModeToUse, threadAwareContext); } + @Override public XAJMSContext createXAContext() { incrementRefCounter(); @@ -191,6 +193,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * * @param reference The reference */ + @Override public void setReference(final Reference reference) { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("setReference(" + reference + ")"); @@ -204,6 +207,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * * @return The reference */ + @Override public Reference getReference() { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("getReference()"); @@ -282,6 +286,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The queue session * @throws JMSException Thrown if an error occurs */ + @Override public QueueSession createQueueSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createQueueSession(" + transacted + ", " + acknowledgeMode + ")"); @@ -302,6 +307,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The XA queue session * @throws JMSException Thrown if an error occurs */ + @Override public XAQueueSession createXAQueueSession() throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXAQueueSession()"); @@ -327,6 +333,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The connection consumer * @throws JMSException Thrown if an error occurs */ + @Override public ConnectionConsumer createConnectionConsumer(final Queue queue, final String messageSelector, final ServerSessionPool sessionPool, @@ -353,6 +360,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The topic session * @throws JMSException Thrown if an error occurs */ + @Override public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createTopicSession(" + transacted + ", " + acknowledgeMode + ")"); @@ -373,6 +381,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The XA topic session * @throws JMSException Thrown if an error occurs */ + @Override public XATopicSession createXATopicSession() throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXATopicSession()"); @@ -398,6 +407,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The connection consumer * @throws JMSException Thrown if an error occurs */ + @Override public ConnectionConsumer createConnectionConsumer(final Topic topic, final String messageSelector, final ServerSessionPool sessionPool, @@ -526,6 +536,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @return The XA session * @throws JMSException Thrown if an error occurs */ + @Override public XASession createXASession() throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("createXASession()"); @@ -689,6 +700,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * @param session The session * @throws JMSException Thrown if an error occurs */ + @Override public void closeSession(final ActiveMQRASession session) throws JMSException { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("closeSession(" + session + ")"); @@ -704,6 +716,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * * @param temp The temporary queue */ + @Override public void addTemporaryQueue(final TemporaryQueue temp) { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("addTemporaryQueue(" + temp + ")"); @@ -719,6 +732,7 @@ public final class ActiveMQRASessionFactoryImpl extends ActiveMQConnectionForCon * * @param temp The temporary topic */ + @Override public void addTemporaryTopic(final TemporaryTopic temp) { if (ActiveMQRASessionFactoryImpl.trace) { ActiveMQRALogger.LOGGER.trace("addTemporaryTopic(" + temp + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java index 2465ae8b11..02cfd738d1 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAStreamMessage.java @@ -51,6 +51,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean readBoolean() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readBoolean()"); @@ -65,6 +66,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public byte readByte() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readByte()"); @@ -80,6 +82,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int readBytes(final byte[] value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readBytes(" + Arrays.toString(value) + ")"); @@ -94,6 +97,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public char readChar() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readChar()"); @@ -108,6 +112,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public double readDouble() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readDouble()"); @@ -122,6 +127,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public float readFloat() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readFloat()"); @@ -136,6 +142,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public int readInt() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readInt()"); @@ -150,6 +157,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public long readLong() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readLong()"); @@ -164,6 +172,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public Object readObject() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readObject()"); @@ -178,6 +187,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public short readShort() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readShort()"); @@ -192,6 +202,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public String readString() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("readString()"); @@ -205,6 +216,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * * @throws JMSException Thrown if an error occurs */ + @Override public void reset() throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("reset()"); @@ -219,6 +231,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeBoolean(final boolean value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeBoolean(" + value + ")"); @@ -233,6 +246,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeByte(final byte value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeByte(" + value + ")"); @@ -249,6 +263,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param length The length * @throws JMSException Thrown if an error occurs */ + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ", " + offset + ", " + length + ")"); @@ -263,6 +278,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeBytes(final byte[] value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeBytes(" + Arrays.toString(value) + ")"); @@ -277,6 +293,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeChar(final char value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeChar(" + value + ")"); @@ -291,6 +308,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeDouble(final double value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeDouble(" + value + ")"); @@ -305,6 +323,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeFloat(final float value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeFloat(" + value + ")"); @@ -319,6 +338,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeInt(final int value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeInt(" + value + ")"); @@ -333,6 +353,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeLong(final long value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeLong(" + value + ")"); @@ -347,6 +368,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeObject(final Object value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeObject(" + value + ")"); @@ -361,6 +383,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeShort(final short value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeShort(" + value + ")"); @@ -375,6 +398,7 @@ public class ActiveMQRAStreamMessage extends ActiveMQRAMessage implements Stream * @param value The value * @throws JMSException Thrown if an error occurs */ + @Override public void writeString(final String value) throws JMSException { if (ActiveMQRAStreamMessage.trace) { ActiveMQRALogger.LOGGER.trace("writeString(" + value + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java index 0ab9fb3b07..d4c3c07f6f 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATextMessage.java @@ -49,6 +49,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess * @return The text * @throws JMSException Thrown if an error occurs */ + @Override public String getText() throws JMSException { if (ActiveMQRATextMessage.trace) { ActiveMQRALogger.LOGGER.trace("getText()"); @@ -63,6 +64,7 @@ public class ActiveMQRATextMessage extends ActiveMQRAMessage implements TextMess * @param string The text * @throws JMSException Thrown if an error occurs */ + @Override public void setText(final String string) throws JMSException { if (ActiveMQRATextMessage.trace) { ActiveMQRALogger.LOGGER.trace("setText(" + string + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java index 87ddd227f3..6f37049283 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicPublisher.java @@ -51,6 +51,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen * @return The topic * @throws JMSException Thrown if an error occurs */ + @Override public Topic getTopic() throws JMSException { if (ActiveMQRATopicPublisher.trace) { ActiveMQRALogger.LOGGER.trace("getTopic()"); @@ -68,6 +69,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen * @param timeToLive The time to live * @throws JMSException Thrown if an error occurs */ + @Override public void publish(final Message message, final int deliveryMode, final int priority, @@ -105,6 +107,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen * @param message The message * @throws JMSException Thrown if an error occurs */ + @Override public void publish(final Message message) throws JMSException { session.lock(); try { @@ -135,6 +138,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen * @param timeToLive The time to live * @throws JMSException Thrown if an error occurs */ + @Override public void publish(final Topic destination, final Message message, final int deliveryMode, @@ -176,6 +180,7 @@ public class ActiveMQRATopicPublisher extends ActiveMQRAMessageProducer implemen * @param message The message * @throws JMSException Thrown if an error occurs */ + @Override public void publish(final Topic destination, final Message message) throws JMSException { session.lock(); try { diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java index 626020f650..7c9115b63d 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRATopicSubscriber.java @@ -50,6 +50,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme * @return The value * @throws JMSException Thrown if an error occurs */ + @Override public boolean getNoLocal() throws JMSException { if (ActiveMQRATopicSubscriber.trace) { ActiveMQRALogger.LOGGER.trace("getNoLocal()"); @@ -65,6 +66,7 @@ public class ActiveMQRATopicSubscriber extends ActiveMQRAMessageConsumer impleme * @return The topic * @throws JMSException Thrown if an error occurs */ + @Override public Topic getTopic() throws JMSException { if (ActiveMQRATopicSubscriber.trace) { ActiveMQRALogger.LOGGER.trace("getTopic()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java index e2baea6853..093ee0f21b 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRAXAResource.java @@ -66,6 +66,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @param flags One of TMNOFLAGS, TMJOIN, or TMRESUME * @throws XAException An error has occurred */ + @Override public void start(final Xid xid, final int flags) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("start(" + xid + ", " + flags + ")"); @@ -97,6 +98,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @param flags One of TMSUCCESS, TMFAIL, or TMSUSPEND. * @throws XAException An error has occurred */ + @Override public void end(final Xid xid, final int flags) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("end(" + xid + ", " + flags + ")"); @@ -119,6 +121,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @return XA_RDONLY or XA_OK * @throws XAException An error has occurred */ + @Override public int prepare(final Xid xid) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("prepare(" + xid + ")"); @@ -134,6 +137,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @param onePhase If true, the resource manager should use a one-phase commit protocol to commit the work done on behalf of xid. * @throws XAException An error has occurred */ + @Override public void commit(final Xid xid, final boolean onePhase) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("commit(" + xid + ", " + onePhase + ")"); @@ -148,6 +152,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @param xid A global transaction identifier * @throws XAException An error has occurred */ + @Override public void rollback(final Xid xid) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("rollback(" + xid + ")"); @@ -162,6 +167,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @param xid A global transaction identifier * @throws XAException An error has occurred */ + @Override public void forget(final Xid xid) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("forget(" + xid + ")"); @@ -185,6 +191,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @return True if its the same RM instance; otherwise false. * @throws XAException An error has occurred */ + @Override public boolean isSameRM(final XAResource xaRes) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("isSameRM(" + xaRes + ")"); @@ -200,6 +207,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @return Zero or more XIDs * @throws XAException An error has occurred */ + @Override public Xid[] recover(final int flag) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("recover(" + flag + ")"); @@ -214,6 +222,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @return The transaction timeout * @throws XAException An error has occurred */ + @Override public int getTransactionTimeout() throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("getTransactionTimeout()"); @@ -229,6 +238,7 @@ public class ActiveMQRAXAResource implements ActiveMQXAResource { * @return True if the transaction timeout value is set successfully; otherwise false. * @throws XAException An error has occurred */ + @Override public boolean setTransactionTimeout(final int seconds) throws XAException { if (ActiveMQRAXAResource.trace) { ActiveMQRALogger.LOGGER.trace("setTransactionTimeout(" + seconds + ")"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java index c72084df76..cd438978ce 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQRaUtils.java @@ -231,6 +231,7 @@ public final class ActiveMQRaUtils { */ public static JChannel locateJGroupsChannel(final String locatorClass, final String name) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public JChannel run() { try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); @@ -254,6 +255,7 @@ public final class ActiveMQRaUtils { */ private static Object safeInitNewInstance(final String className) { return AccessController.doPrivileged(new PrivilegedAction() { + @Override public Object run() { ClassLoader loader = getClass().getClassLoader(); try { diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java index 2a40e01463..f1d6d03966 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/ActiveMQResourceAdapter.java @@ -156,6 +156,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { * @param spec The activation spec * @throws ResourceException Thrown if an error occurs */ + @Override public void endpointActivation(final MessageEndpointFactory endpointFactory, final ActivationSpec spec) throws ResourceException { if (spec == null) { @@ -184,6 +185,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { * @param endpointFactory The endpoint factory * @param spec The activation spec */ + @Override public void endpointDeactivation(final MessageEndpointFactory endpointFactory, final ActivationSpec spec) { if (ActiveMQResourceAdapter.trace) { ActiveMQRALogger.LOGGER.trace("endpointDeactivation(" + endpointFactory + ", " + spec + ")"); @@ -202,6 +204,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { * @return The XA resources * @throws ResourceException Thrown if an error occurs or unsupported */ + @Override public XAResource[] getXAResources(final ActivationSpec[] specs) throws ResourceException { if (ActiveMQResourceAdapter.trace) { ActiveMQRALogger.LOGGER.trace("getXAResources(" + Arrays.toString(specs) + ")"); @@ -229,6 +232,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { * @param ctx The bootstrap context * @throws ResourceAdapterInternalException Thrown if an error occurs */ + @Override public void start(final BootstrapContext ctx) throws ResourceAdapterInternalException { if (ActiveMQResourceAdapter.trace) { ActiveMQRALogger.LOGGER.trace("start(" + ctx + ")"); @@ -255,6 +259,7 @@ public class ActiveMQResourceAdapter implements ResourceAdapter, Serializable { /** * Stop */ + @Override public void stop() { if (ActiveMQResourceAdapter.trace) { ActiveMQRALogger.LOGGER.trace("stop()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java index cb439f9aa3..af5fec206d 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivation.java @@ -400,6 +400,7 @@ public class ActiveMQActivation { } Thread threadTearDown = new Thread("TearDown/ActiveMQActivation") { + @Override public void run() { for (ActiveMQMessageHandler handler : handlersCopy) { handler.teardown(); @@ -711,6 +712,7 @@ public class ActiveMQActivation { */ private class SetupActivation implements Work { + @Override public void run() { try { setup(); @@ -720,6 +722,7 @@ public class ActiveMQActivation { } } + @Override public void release() { } } diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java index 32d253e3d8..feb195f02c 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java @@ -163,6 +163,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen * * @return The resource adapter */ + @Override public ResourceAdapter getResourceAdapter() { if (ActiveMQActivationSpec.trace) { ActiveMQRALogger.LOGGER.trace("getResourceAdapter()"); @@ -216,6 +217,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen * @param ra The resource adapter * @throws ResourceException Thrown if incorrect resource adapter */ + @Override public void setResourceAdapter(final ResourceAdapter ra) throws ResourceException { if (ActiveMQActivationSpec.trace) { ActiveMQRALogger.LOGGER.trace("setResourceAdapter(" + ra + ")"); @@ -683,6 +685,7 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen * * @throws InvalidPropertyException Thrown if a validation exception occurs */ + @Override public void validate() throws InvalidPropertyException { if (ActiveMQActivationSpec.trace) { ActiveMQRALogger.LOGGER.trace("validate()"); diff --git a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java index 82eb50d3b9..835363476d 100644 --- a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java +++ b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQMessageHandler.java @@ -280,6 +280,7 @@ public class ActiveMQMessageHandler implements MessageHandler, FailoverEventList } } + @Override public void onMessage(final ClientMessage message) { if (ActiveMQMessageHandler.trace) { ActiveMQRALogger.LOGGER.trace("onMessage(" + message + ")"); diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ActiveMQBootstrapListener.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ActiveMQBootstrapListener.java index 6f08dd219b..c4b6c341e4 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ActiveMQBootstrapListener.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ActiveMQBootstrapListener.java @@ -26,6 +26,7 @@ public class ActiveMQBootstrapListener implements ServletContextListener { private EmbeddedJMS jms; + @Override public void contextInitialized(ServletContextEvent contextEvent) { ServletContext context = contextEvent.getServletContext(); jms = new EmbeddedJMS(); @@ -38,6 +39,7 @@ public class ActiveMQBootstrapListener implements ServletContextListener { } } + @Override public void contextDestroyed(ServletContextEvent servletContextEvent) { try { if (jms != null) diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/RestMessagingBootstrapListener.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/RestMessagingBootstrapListener.java index d777435699..20ce51da91 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/RestMessagingBootstrapListener.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/RestMessagingBootstrapListener.java @@ -27,6 +27,7 @@ public class RestMessagingBootstrapListener implements ServletContextListener { MessageServiceManager manager; + @Override public void contextInitialized(ServletContextEvent contextEvent) { ServletContext context = contextEvent.getServletContext(); String configfile = context.getInitParameter("rest.messaging.config.file"); @@ -49,6 +50,7 @@ public class RestMessagingBootstrapListener implements ServletContextListener { } } + @Override public void contextDestroyed(ServletContextEvent servletContextEvent) { if (manager != null) { manager.stop(); diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ServletContextBindingRegistry.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ServletContextBindingRegistry.java index f6e0699882..8955221d96 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ServletContextBindingRegistry.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/integration/ServletContextBindingRegistry.java @@ -28,19 +28,23 @@ public class ServletContextBindingRegistry implements BindingRegistry { this.servletContext = servletContext; } + @Override public Object lookup(String name) { return servletContext.getAttribute(name); } + @Override public boolean bind(String name, Object obj) { servletContext.setAttribute(name, obj); return true; } + @Override public void unbind(String name) { servletContext.removeAttribute(name); } + @Override public void close() { } } diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/AcknowledgedQueueConsumer.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/AcknowledgedQueueConsumer.java index e78603b74d..e0dabc8701 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/AcknowledgedQueueConsumer.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/AcknowledgedQueueConsumer.java @@ -57,6 +57,7 @@ public class AcknowledgedQueueConsumer extends QueueConsumer { return ack; } + @Override @Path("acknowledge-next{index}") @POST public synchronized Response poll(@HeaderParam(Constants.WAIT_HEADER) @DefaultValue("0") long wait, diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumersResource.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumersResource.java index 4c742472ca..278461c84f 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumersResource.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/ConsumersResource.java @@ -83,6 +83,7 @@ public class ConsumersResource implements TimeoutTask.Callback { this.consumerTimeoutSeconds = consumerTimeoutSeconds; } + @Override public boolean testTimeout(String target, boolean autoShutdown) { QueueConsumer consumer = queueConsumers.get(target); if (consumer == null) @@ -99,6 +100,7 @@ public class ConsumersResource implements TimeoutTask.Callback { } } + @Override public void shutdown(String target) { QueueConsumer consumer = queueConsumers.get(target); if (consumer == null) diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/ActiveMQPushStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/ActiveMQPushStrategy.java index db5eb4a51f..b3dc1d5d5b 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/ActiveMQPushStrategy.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/ActiveMQPushStrategy.java @@ -30,6 +30,7 @@ public class ActiveMQPushStrategy extends UriTemplateStrategy { protected boolean initialized = false; + @Override public void start() throws Exception { // initialize(); } diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java index f1bbe10923..70e0d64456 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/FilePushStore.java @@ -62,6 +62,7 @@ public class FilePushStore implements PushStore { return list; } + @Override public synchronized List getByDestination(String destination) { List list = new ArrayList(); for (PushRegistration reg : map.values()) { @@ -72,6 +73,7 @@ public class FilePushStore implements PushStore { return list; } + @Override public synchronized void update(PushRegistration reg) throws Exception { if (reg.getLoadedFrom() == null) return; @@ -84,6 +86,7 @@ public class FilePushStore implements PushStore { marshaller.marshal(reg, (File) reg.getLoadedFrom()); } + @Override public synchronized void add(PushRegistration reg) throws Exception { map.put(reg.getId(), reg); if (!this.dir.exists()) @@ -94,6 +97,7 @@ public class FilePushStore implements PushStore { save(reg); } + @Override public synchronized void remove(PushRegistration reg) throws Exception { map.remove(reg.getId()); if (reg.getLoadedFrom() == null) @@ -102,6 +106,7 @@ public class FilePushStore implements PushStore { fp.delete(); } + @Override public synchronized void removeAll() throws Exception { ArrayList copy = new ArrayList(map.values()); for (PushRegistration reg : copy) diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java index fcc7da8bb5..f04c1bb877 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriStrategy.java @@ -64,10 +64,12 @@ public class UriStrategy implements PushStrategy { connManager.setMaxTotal(1000); } + @Override public void setRegistration(PushRegistration reg) { this.registration = reg; } + @Override public void start() throws Exception { initAuthentication(); method = registration.getTarget().getMethod(); @@ -98,10 +100,12 @@ public class UriStrategy implements PushStrategy { } } + @Override public void stop() { connManager.shutdown(); } + @Override public boolean push(ClientMessage message) { ActiveMQRestLogger.LOGGER.debug("Pushing " + message); String uri = createUri(message); @@ -193,6 +197,7 @@ public class UriStrategy implements PushStrategy { static class PreemptiveAuth implements HttpRequestInterceptor { + @Override public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException { AuthState authState = (AuthState) context.getAttribute(ClientContext.TARGET_AUTH_STATE); diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriTemplateStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriTemplateStrategy.java index ee595e7fb6..f08d3fc0e4 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriTemplateStrategy.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/queue/push/UriTemplateStrategy.java @@ -20,6 +20,7 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage; public class UriTemplateStrategy extends UriStrategy { + @Override protected String createUri(ClientMessage message) { String dupId = registration.getId() + "-" + message.getMessageID() + "-" + message.getTimestamp(); String uri = targetUri.build(dupId).toString(); diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/AcknowledgedSubscriptionResource.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/AcknowledgedSubscriptionResource.java index 93f7eddd3e..44922f73fa 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/AcknowledgedSubscriptionResource.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/AcknowledgedSubscriptionResource.java @@ -39,26 +39,32 @@ public class AcknowledgedSubscriptionResource extends AcknowledgedQueueConsumer this.durable = durable; } + @Override public boolean isDurable() { return durable; } + @Override public void setDurable(boolean durable) { this.durable = durable; } + @Override public long getTimeout() { return timeout; } + @Override public void setTimeout(long timeout) { this.timeout = timeout; } + @Override public boolean isDeleteWhenIdle() { return deleteWhenIdle; } + @Override public void setDeleteWhenIdle(boolean deleteWhenIdle) { this.deleteWhenIdle = deleteWhenIdle; } diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionResource.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionResource.java index fac54b6a97..7c8f72657e 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionResource.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionResource.java @@ -39,26 +39,32 @@ public class SubscriptionResource extends QueueConsumer implements Subscription this.timeout = timeout; } + @Override public boolean isDurable() { return durable; } + @Override public void setDurable(boolean durable) { this.durable = durable; } + @Override public long getTimeout() { return timeout; } + @Override public void setTimeout(long timeout) { this.timeout = timeout; } + @Override public boolean isDeleteWhenIdle() { return deleteWhenIdle; } + @Override public void setDeleteWhenIdle(boolean deleteWhenIdle) { this.deleteWhenIdle = deleteWhenIdle; } diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionsResource.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionsResource.java index 005d7a0cd3..140599dd3d 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionsResource.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/SubscriptionsResource.java @@ -86,6 +86,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback { this.destination = destination; } + @Override public boolean testTimeout(String target, boolean autoShutdown) { QueueConsumer consumer = queueConsumers.get(target); Subscription subscription = (Subscription) consumer; @@ -103,6 +104,7 @@ public class SubscriptionsResource implements TimeoutTask.Callback { } } + @Override public void shutdown(String target) { QueueConsumer consumer = queueConsumers.get(target); if (consumer == null) diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/TopicServiceManager.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/TopicServiceManager.java index a6bece1aee..b782d5c16b 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/TopicServiceManager.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/topic/TopicServiceManager.java @@ -53,6 +53,7 @@ public class TopicServiceManager extends DestinationServiceManager { this.destination = destination; } + @Override public void start() throws Exception { initDefaults(); @@ -90,6 +91,7 @@ public class TopicServiceManager extends DestinationServiceManager { destination.createTopicResource(queueName, defaultDurable, topicDeployment.getConsumerSessionTimeoutSeconds(), topicDeployment.isDuplicatesAllowed()); } + @Override public void stop() { if (started == false) return; diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/CustomHeaderLinkStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/CustomHeaderLinkStrategy.java index 702f226d5b..18d9fb77b5 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/CustomHeaderLinkStrategy.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/CustomHeaderLinkStrategy.java @@ -20,6 +20,7 @@ import javax.ws.rs.core.Response; public class CustomHeaderLinkStrategy implements LinkStrategy { + @Override public void setLinkHeader(Response.ResponseBuilder builder, String title, String rel, String href, String type) { String headerName = null; if (title != null) { diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/LinkHeaderLinkStrategy.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/LinkHeaderLinkStrategy.java index a4dfea6b4e..ccc7fec7e0 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/LinkHeaderLinkStrategy.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/LinkHeaderLinkStrategy.java @@ -29,6 +29,7 @@ public class LinkHeaderLinkStrategy implements LinkStrategy { * @param href * @param type */ + @Override public void setLinkHeader(Response.ResponseBuilder builder, String title, String rel, String href, String type) { Link link = new Link(title, rel, href, type, null); setLinkHeader(builder, link); diff --git a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/TimeoutTask.java b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/TimeoutTask.java index 0e5d496a0f..ae5f5dea1b 100644 --- a/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/TimeoutTask.java +++ b/artemis-rest/src/main/java/org/apache/activemq/artemis/rest/util/TimeoutTask.java @@ -94,6 +94,7 @@ public class TimeoutTask implements Runnable { thread.start(); } + @Override public void run() { while (running) { try { diff --git a/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/AutoAckTopicTest.java b/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/AutoAckTopicTest.java index 6d23b2c4dc..d8fe822c13 100644 --- a/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/AutoAckTopicTest.java +++ b/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/AutoAckTopicTest.java @@ -162,6 +162,7 @@ public class AutoAckTopicTest extends MessageTestBase { return failed; } + @Override public void run() { try { isFinished = false; @@ -198,6 +199,7 @@ public class AutoAckTopicTest extends MessageTestBase { return this.failed; } + @Override public void run() { try { ClientRequest req = new ClientRequest(url); diff --git a/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/JMSTest.java b/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/JMSTest.java index e4cca189d3..fbae1a5845 100644 --- a/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/JMSTest.java +++ b/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/JMSTest.java @@ -137,6 +137,7 @@ public class JMSTest extends MessageTestBase { public static String messageID = null; public static CountDownLatch latch = new CountDownLatch(1); + @Override public void onMessage(Message message) { try { order = Jms.getEntity(message, Order.class); diff --git a/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/TransformTest.java b/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/TransformTest.java index b5854e4ec3..dfb6cc8504 100644 --- a/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/TransformTest.java +++ b/artemis-rest/src/test/java/org/apache/activemq/artemis/rest/test/TransformTest.java @@ -188,6 +188,7 @@ public class TransformTest extends MessageTestBase { public static Order order; public static CountDownLatch latch = new CountDownLatch(1); + @Override public void onMessage(ClientMessage clientMessage) { System.out.println("onMessage!"); try { diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ArithmeticExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ArithmeticExpression.java index 5440cb9d97..7ce277bd1d 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ArithmeticExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ArithmeticExpression.java @@ -39,6 +39,7 @@ public abstract class ArithmeticExpression extends BinaryExpression { public static Expression createPlus(Expression left, Expression right) { return new ArithmeticExpression(left, right) { + @Override protected Object evaluate(Object lvalue, Object rvalue) { if (lvalue instanceof String) { String text = (String) lvalue; @@ -50,6 +51,7 @@ public abstract class ArithmeticExpression extends BinaryExpression { } } + @Override public String getExpressionSymbol() { return "+"; } @@ -58,10 +60,12 @@ public abstract class ArithmeticExpression extends BinaryExpression { public static Expression createMinus(Expression left, Expression right) { return new ArithmeticExpression(left, right) { + @Override protected Object evaluate(Object lvalue, Object rvalue) { return minus(asNumber(lvalue), asNumber(rvalue)); } + @Override public String getExpressionSymbol() { return "-"; } @@ -71,10 +75,12 @@ public abstract class ArithmeticExpression extends BinaryExpression { public static Expression createMultiply(Expression left, Expression right) { return new ArithmeticExpression(left, right) { + @Override protected Object evaluate(Object lvalue, Object rvalue) { return multiply(asNumber(lvalue), asNumber(rvalue)); } + @Override public String getExpressionSymbol() { return "*"; } @@ -84,10 +90,12 @@ public abstract class ArithmeticExpression extends BinaryExpression { public static Expression createDivide(Expression left, Expression right) { return new ArithmeticExpression(left, right) { + @Override protected Object evaluate(Object lvalue, Object rvalue) { return divide(asNumber(lvalue), asNumber(rvalue)); } + @Override public String getExpressionSymbol() { return "/"; } @@ -97,10 +105,12 @@ public abstract class ArithmeticExpression extends BinaryExpression { public static Expression createMod(Expression left, Expression right) { return new ArithmeticExpression(left, right) { + @Override protected Object evaluate(Object lvalue, Object rvalue) { return mod(asNumber(lvalue), asNumber(rvalue)); } + @Override public String getExpressionSymbol() { return "%"; } @@ -187,6 +197,7 @@ public abstract class ArithmeticExpression extends BinaryExpression { } } + @Override public Object evaluate(Filterable message) throws FilterException { Object lvalue = left.evaluate(message); if (lvalue == null) { diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/BinaryExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/BinaryExpression.java index edee834de2..66eb559cf2 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/BinaryExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/BinaryExpression.java @@ -42,6 +42,7 @@ public abstract class BinaryExpression implements Expression { /** * @see java.lang.Object#toString() */ + @Override public String toString() { return "(" + left.toString() + " " + getExpressionSymbol() + " " + right.toString() + ")"; } @@ -49,6 +50,7 @@ public abstract class BinaryExpression implements Expression { /** * @see java.lang.Object#hashCode() */ + @Override public int hashCode() { int result = left.hashCode(); result = 31 * result + right.hashCode(); @@ -59,6 +61,7 @@ public abstract class BinaryExpression implements Expression { /** * @see java.lang.Object#equals(java.lang.Object) */ + @Override public boolean equals(Object o) { if (this == o) { return true; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java index f9dec71b3b..2ed90b2e2a 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ComparisonExpression.java @@ -119,6 +119,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B /** * @see org.apache.activemq.filter.UnaryExpression#getExpressionSymbol() */ + @Override public String getExpressionSymbol() { return "LIKE"; } @@ -126,6 +127,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B /** * @see org.apache.activemq.filter.Expression#evaluate(Filterable) */ + @Override public Object evaluate(Filterable message) throws FilterException { Object rv = this.getRight().evaluate(message); @@ -143,6 +145,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B return likePattern.matcher((String) rv).matches() ? Boolean.TRUE : Boolean.FALSE; } + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; @@ -205,6 +208,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B private static BooleanExpression doCreateEqual(Expression left, Expression right) { return new ComparisonExpression(left, right) { + @Override public Object evaluate(Filterable message) throws FilterException { Object lv = left.evaluate(message); Object rv = right.evaluate(message); @@ -222,10 +226,12 @@ public abstract class ComparisonExpression extends BinaryExpression implements B return Boolean.FALSE; } + @Override protected boolean asBoolean(int answer) { return answer == 0; } + @Override public String getExpressionSymbol() { return "="; } @@ -236,10 +242,12 @@ public abstract class ComparisonExpression extends BinaryExpression implements B checkLessThanOperand(left); checkLessThanOperand(right); return new ComparisonExpression(left, right) { + @Override protected boolean asBoolean(int answer) { return answer > 0; } + @Override public String getExpressionSymbol() { return ">"; } @@ -250,10 +258,12 @@ public abstract class ComparisonExpression extends BinaryExpression implements B checkLessThanOperand(left); checkLessThanOperand(right); return new ComparisonExpression(left, right) { + @Override protected boolean asBoolean(int answer) { return answer >= 0; } + @Override public String getExpressionSymbol() { return ">="; } @@ -265,10 +275,12 @@ public abstract class ComparisonExpression extends BinaryExpression implements B checkLessThanOperand(right); return new ComparisonExpression(left, right) { + @Override protected boolean asBoolean(int answer) { return answer < 0; } + @Override public String getExpressionSymbol() { return "<"; } @@ -281,10 +293,12 @@ public abstract class ComparisonExpression extends BinaryExpression implements B checkLessThanOperand(right); return new ComparisonExpression(left, right) { + @Override protected boolean asBoolean(int answer) { return answer <= 0; } + @Override public String getExpressionSymbol() { return "<="; } @@ -338,6 +352,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B } } + @Override public Object evaluate(Filterable message) throws FilterException { Comparable lv = (Comparable) left.evaluate(message); if (lv == null) { @@ -517,6 +532,7 @@ public abstract class ComparisonExpression extends BinaryExpression implements B protected abstract boolean asBoolean(int answer); + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ConstantExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ConstantExpression.java index 60080b0d10..010b736868 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ConstantExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/ConstantExpression.java @@ -31,6 +31,7 @@ public class ConstantExpression implements Expression { super(value); } + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; @@ -93,6 +94,7 @@ public class ConstantExpression implements Expression { return new ConstantExpression(value); } + @Override public Object evaluate(Filterable message) throws FilterException { return value; } @@ -104,6 +106,7 @@ public class ConstantExpression implements Expression { /** * @see java.lang.Object#toString() */ + @Override public String toString() { if (value == null) { return "NULL"; @@ -120,6 +123,7 @@ public class ConstantExpression implements Expression { /** * @see java.lang.Object#hashCode() */ + @Override public int hashCode() { return value != null ? value.hashCode() : 0; } @@ -127,6 +131,7 @@ public class ConstantExpression implements Expression { /** * @see java.lang.Object#equals(Object) */ + @Override public boolean equals(final Object o) { if (this == o) { return true; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/LogicExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/LogicExpression.java index 2fc852c043..b77d7b5246 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/LogicExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/LogicExpression.java @@ -34,6 +34,7 @@ public abstract class LogicExpression extends BinaryExpression implements Boolea public static BooleanExpression createOR(BooleanExpression lvalue, BooleanExpression rvalue) { return new LogicExpression(lvalue, rvalue) { + @Override public Object evaluate(Filterable message) throws FilterException { Boolean lv = (Boolean) left.evaluate(message); @@ -46,6 +47,7 @@ public abstract class LogicExpression extends BinaryExpression implements Boolea return rv == null ? null : rv; } + @Override public String getExpressionSymbol() { return "OR"; } @@ -55,6 +57,7 @@ public abstract class LogicExpression extends BinaryExpression implements Boolea public static BooleanExpression createAND(BooleanExpression lvalue, BooleanExpression rvalue) { return new LogicExpression(lvalue, rvalue) { + @Override public Object evaluate(Filterable message) throws FilterException { Boolean lv = (Boolean) left.evaluate(message); @@ -71,14 +74,17 @@ public abstract class LogicExpression extends BinaryExpression implements Boolea return rv == null ? null : rv; } + @Override public String getExpressionSymbol() { return "AND"; } }; } + @Override public abstract Object evaluate(Filterable message) throws FilterException; + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/PropertyExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/PropertyExpression.java index 0e0977ca42..4c8c8c502f 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/PropertyExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/PropertyExpression.java @@ -29,6 +29,7 @@ public class PropertyExpression implements Expression { this.name = name; } + @Override public Object evaluate(Filterable message) throws FilterException { return message.getProperty(name); } @@ -40,6 +41,7 @@ public class PropertyExpression implements Expression { /** * @see java.lang.Object#toString() */ + @Override public String toString() { return name; } @@ -47,6 +49,7 @@ public class PropertyExpression implements Expression { /** * @see java.lang.Object#hashCode() */ + @Override public int hashCode() { return name.hashCode(); } @@ -54,6 +57,7 @@ public class PropertyExpression implements Expression { /** * @see java.lang.Object#equals(java.lang.Object) */ + @Override public boolean equals(Object o) { if (o == null || !this.getClass().equals(o.getClass())) { return false; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/UnaryExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/UnaryExpression.java index 7ae3da51ef..6df808e666 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/UnaryExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/UnaryExpression.java @@ -38,6 +38,7 @@ public abstract class UnaryExpression implements Expression { public static Expression createNegate(Expression left) { return new UnaryExpression(left) { + @Override public Object evaluate(Filterable message) throws FilterException { Object rvalue = right.evaluate(message); if (rvalue == null) { @@ -49,6 +50,7 @@ public abstract class UnaryExpression implements Expression { return null; } + @Override public String getExpressionSymbol() { return "-"; } @@ -73,6 +75,7 @@ public abstract class UnaryExpression implements Expression { final Collection inList = t; return new BooleanUnaryExpression(right) { + @Override public Object evaluate(Filterable message) throws FilterException { Object rvalue = right.evaluate(message); @@ -92,6 +95,7 @@ public abstract class UnaryExpression implements Expression { } + @Override public String toString() { StringBuffer answer = new StringBuffer(); answer.append(right); @@ -113,6 +117,7 @@ public abstract class UnaryExpression implements Expression { return answer.toString(); } + @Override public String getExpressionSymbol() { if (not) { return "NOT IN"; @@ -130,6 +135,7 @@ public abstract class UnaryExpression implements Expression { super(left); } + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; @@ -138,6 +144,7 @@ public abstract class UnaryExpression implements Expression { public static BooleanExpression createNOT(BooleanExpression left) { return new BooleanUnaryExpression(left) { + @Override public Object evaluate(Filterable message) throws FilterException { Boolean lvalue = (Boolean) right.evaluate(message); if (lvalue == null) { @@ -146,6 +153,7 @@ public abstract class UnaryExpression implements Expression { return lvalue.booleanValue() ? Boolean.FALSE : Boolean.TRUE; } + @Override public String getExpressionSymbol() { return "NOT"; } @@ -162,6 +170,7 @@ public abstract class UnaryExpression implements Expression { public static BooleanExpression createBooleanCast(Expression left) { return new BooleanUnaryExpression(left) { + @Override public Object evaluate(Filterable message) throws FilterException { Object rvalue = right.evaluate(message); if (rvalue == null) { @@ -173,10 +182,12 @@ public abstract class UnaryExpression implements Expression { return ((Boolean) rvalue).booleanValue() ? Boolean.TRUE : Boolean.FALSE; } + @Override public String toString() { return right.toString(); } + @Override public String getExpressionSymbol() { return ""; } @@ -229,6 +240,7 @@ public abstract class UnaryExpression implements Expression { /** * @see java.lang.Object#toString() */ + @Override public String toString() { return "(" + getExpressionSymbol() + " " + right.toString() + ")"; } @@ -236,6 +248,7 @@ public abstract class UnaryExpression implements Expression { /** * @see java.lang.Object#hashCode() */ + @Override public int hashCode() { int result = right.hashCode(); result = 31 * result + getExpressionSymbol().hashCode(); @@ -245,6 +258,7 @@ public abstract class UnaryExpression implements Expression { /** * @see java.lang.Object#equals(java.lang.Object) */ + @Override public boolean equals(Object o) { if (this == o) { return true; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XPathExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XPathExpression.java index 978e9bfab1..17481674a4 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XPathExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XPathExpression.java @@ -28,6 +28,7 @@ public final class XPathExpression implements BooleanExpression { new XalanXPathEvaluator("//root").evaluate(""); try { XPATH_EVALUATOR_FACTORY = new XPathExpression.XPathEvaluatorFactory() { + @Override public XPathExpression.XPathEvaluator create(String xpath) { return new XalanXPathEvaluator(xpath); } @@ -58,10 +59,12 @@ public final class XPathExpression implements BooleanExpression { this.evaluator = XPATH_EVALUATOR_FACTORY.create(xpath); } + @Override public Object evaluate(Filterable message) throws FilterException { return evaluator.evaluate(message) ? Boolean.TRUE : Boolean.FALSE; } + @Override public String toString() { return "XPATH " + ConstantExpression.encodeString(xpath); } @@ -71,6 +74,7 @@ public final class XPathExpression implements BooleanExpression { * @return true if the expression evaluates to Boolean.TRUE. * @throws FilterException */ + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XQueryExpression.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XQueryExpression.java index 404bf06586..bfea39ed4e 100755 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XQueryExpression.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XQueryExpression.java @@ -28,10 +28,12 @@ public final class XQueryExpression implements BooleanExpression { this.xpath = xpath; } + @Override public Object evaluate(Filterable message) throws FilterException { return Boolean.FALSE; } + @Override public String toString() { return "XQUERY " + ConstantExpression.encodeString(xpath); } @@ -41,6 +43,7 @@ public final class XQueryExpression implements BooleanExpression { * @return true if the expression evaluates to Boolean.TRUE. * @throws FilterException */ + @Override public boolean matches(Filterable message) throws FilterException { Object object = evaluate(message); return object != null && object == Boolean.TRUE; diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XalanXPathEvaluator.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XalanXPathEvaluator.java index 798c21477e..906074e481 100644 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XalanXPathEvaluator.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/filter/XalanXPathEvaluator.java @@ -35,6 +35,7 @@ public class XalanXPathEvaluator implements XPathExpression.XPathEvaluator { this.xpath = xpath; } + @Override public boolean evaluate(Filterable m) throws FilterException { String stringBody = m.getBodyAs(String.class); if (stringBody != null) { diff --git a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/LRUCache.java b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/LRUCache.java index bbd6aced8e..efe3fcd9da 100644 --- a/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/LRUCache.java +++ b/artemis-selector/src/main/java/org/apache/activemq/artemis/selector/impl/LRUCache.java @@ -79,6 +79,7 @@ public class LRUCache extends LinkedHashMap { this.maxCacheSize = maxCacheSize; } + @Override protected boolean removeEldestEntry(Map.Entry eldest) { if (size() > maxCacheSize) { onCacheEviction(eldest); diff --git a/artemis-selector/src/test/java/org/apache/activemq/artemis/selector/SelectorTest.java b/artemis-selector/src/test/java/org/apache/activemq/artemis/selector/SelectorTest.java index abd1a85a69..6808bdd4f5 100755 --- a/artemis-selector/src/test/java/org/apache/activemq/artemis/selector/SelectorTest.java +++ b/artemis-selector/src/test/java/org/apache/activemq/artemis/selector/SelectorTest.java @@ -91,6 +91,7 @@ public class SelectorTest { properties.put(key, value); } + @Override public T getBodyAs(Class type) throws FilterException { if (type == String.class) { return type.cast(text); @@ -98,6 +99,7 @@ public class SelectorTest { return null; } + @Override public Object getProperty(String name) { if ("JMSType".equals(name)) { return type; @@ -112,6 +114,7 @@ public class SelectorTest { return destination; } + @Override public Object getLocalConnectionId() { return localConnectionId; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java index ae38248c77..2f74afa4ce 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java @@ -231,23 +231,28 @@ public class ConfigurationImpl implements Configuration, Serializable { // Public ------------------------------------------------------------------------- + @Override public boolean isClustered() { return !getClusterConfigurations().isEmpty(); } + @Override public boolean isPersistenceEnabled() { return persistenceEnabled; } + @Override public ConfigurationImpl setPersistenceEnabled(final boolean enable) { persistenceEnabled = enable; return this; } + @Override public long getFileDeployerScanPeriod() { return fileDeploymentScanPeriod; } + @Override public ConfigurationImpl setFileDeployerScanPeriod(final long period) { fileDeploymentScanPeriod = period; return this; @@ -256,92 +261,112 @@ public class ConfigurationImpl implements Configuration, Serializable { /** * @return the persistDeliveryCountBeforeDelivery */ + @Override public boolean isPersistDeliveryCountBeforeDelivery() { return persistDeliveryCountBeforeDelivery; } + @Override public ConfigurationImpl setPersistDeliveryCountBeforeDelivery(final boolean persistDeliveryCountBeforeDelivery) { this.persistDeliveryCountBeforeDelivery = persistDeliveryCountBeforeDelivery; return this; } + @Override public int getScheduledThreadPoolMaxSize() { return scheduledThreadPoolMaxSize; } + @Override public ConfigurationImpl setScheduledThreadPoolMaxSize(final int maxSize) { scheduledThreadPoolMaxSize = maxSize; return this; } + @Override public int getThreadPoolMaxSize() { return threadPoolMaxSize; } + @Override public ConfigurationImpl setThreadPoolMaxSize(final int maxSize) { threadPoolMaxSize = maxSize; return this; } + @Override public long getSecurityInvalidationInterval() { return securityInvalidationInterval; } + @Override public ConfigurationImpl setSecurityInvalidationInterval(final long interval) { securityInvalidationInterval = interval; return this; } + @Override public long getConnectionTTLOverride() { return connectionTTLOverride; } + @Override public ConfigurationImpl setConnectionTTLOverride(final long ttl) { connectionTTLOverride = ttl; return this; } + @Override public boolean isAsyncConnectionExecutionEnabled() { return asyncConnectionExecutionEnabled; } + @Override public ConfigurationImpl setEnabledAsyncConnectionExecution(final boolean enabled) { asyncConnectionExecutionEnabled = enabled; return this; } + @Override public List getIncomingInterceptorClassNames() { return incomingInterceptorClassNames; } + @Override public ConfigurationImpl setIncomingInterceptorClassNames(final List interceptors) { incomingInterceptorClassNames = interceptors; return this; } + @Override public List getOutgoingInterceptorClassNames() { return outgoingInterceptorClassNames; } + @Override public ConfigurationImpl setOutgoingInterceptorClassNames(final List interceptors) { outgoingInterceptorClassNames = interceptors; return this; } + @Override public Set getAcceptorConfigurations() { return acceptorConfigs; } + @Override public ConfigurationImpl setAcceptorConfigurations(final Set infos) { acceptorConfigs = infos; return this; } + @Override public ConfigurationImpl addAcceptorConfiguration(final TransportConfiguration infos) { acceptorConfigs.add(infos); return this; } + @Override public ConfigurationImpl addAcceptorConfiguration(final String name, final String uri) throws Exception { AcceptorTransportConfigurationParser parser = new AcceptorTransportConfigurationParser(); @@ -355,26 +380,31 @@ public class ConfigurationImpl implements Configuration, Serializable { return this; } + @Override public ConfigurationImpl clearAcceptorConfigurations() { acceptorConfigs.clear(); return this; } + @Override public Map getConnectorConfigurations() { return connectorConfigs; } + @Override public ConfigurationImpl setConnectorConfigurations(final Map infos) { connectorConfigs = infos; return this; } + @Override public ConfigurationImpl addConnectorConfiguration(final String key, final TransportConfiguration info) { connectorConfigs.put(key, info); return this; } + @Override public ConfigurationImpl addConnectorConfiguration(final String name, final String uri) throws Exception { ConnectorTransportConfigurationParser parser = new ConnectorTransportConfigurationParser(); @@ -389,24 +419,29 @@ public class ConfigurationImpl implements Configuration, Serializable { } + @Override public ConfigurationImpl clearConnectorConfigurations() { connectorConfigs.clear(); return this; } + @Override public GroupingHandlerConfiguration getGroupingHandlerConfiguration() { return groupingHandlerConfiguration; } + @Override public ConfigurationImpl setGroupingHandlerConfiguration(final GroupingHandlerConfiguration groupingHandlerConfiguration) { this.groupingHandlerConfiguration = groupingHandlerConfiguration; return this; } + @Override public List getBridgeConfigurations() { return bridgeConfigurations; } + @Override public ConfigurationImpl setBridgeConfigurations(final List configs) { bridgeConfigurations = configs; return this; @@ -417,108 +452,131 @@ public class ConfigurationImpl implements Configuration, Serializable { return this; } + @Override public List getBroadcastGroupConfigurations() { return broadcastGroupConfigurations; } + @Override public ConfigurationImpl setBroadcastGroupConfigurations(final List configs) { broadcastGroupConfigurations = configs; return this; } + @Override public ConfigurationImpl addBroadcastGroupConfiguration(final BroadcastGroupConfiguration config) { broadcastGroupConfigurations.add(config); return this; } + @Override public List getClusterConfigurations() { return clusterConfigurations; } + @Override public ConfigurationImpl setClusterConfigurations(final List configs) { clusterConfigurations = configs; return this; } + @Override public ConfigurationImpl addClusterConfiguration(final ClusterConnectionConfiguration config) { clusterConfigurations.add(config); return this; } + @Override public ConfigurationImpl clearClusterConfigurations() { clusterConfigurations.clear(); return this; } + @Override public List getDivertConfigurations() { return divertConfigurations; } + @Override public ConfigurationImpl setDivertConfigurations(final List configs) { divertConfigurations = configs; return this; } + @Override public ConfigurationImpl addDivertConfiguration(final DivertConfiguration config) { divertConfigurations.add(config); return this; } + @Override public List getQueueConfigurations() { return queueConfigurations; } + @Override public ConfigurationImpl setQueueConfigurations(final List configs) { queueConfigurations = configs; return this; } + @Override public ConfigurationImpl addQueueConfiguration(final CoreQueueConfiguration config) { queueConfigurations.add(config); return this; } + @Override public Map getDiscoveryGroupConfigurations() { return discoveryGroupConfigurations; } + @Override public ConfigurationImpl setDiscoveryGroupConfigurations(final Map discoveryGroupConfigurations) { this.discoveryGroupConfigurations = discoveryGroupConfigurations; return this; } + @Override public ConfigurationImpl addDiscoveryGroupConfiguration(final String key, DiscoveryGroupConfiguration discoveryGroupConfiguration) { this.discoveryGroupConfigurations.put(key, discoveryGroupConfiguration); return this; } + @Override public int getIDCacheSize() { return idCacheSize; } + @Override public ConfigurationImpl setIDCacheSize(final int idCacheSize) { this.idCacheSize = idCacheSize; return this; } + @Override public boolean isPersistIDCache() { return persistIDCache; } + @Override public ConfigurationImpl setPersistIDCache(final boolean persist) { persistIDCache = persist; return this; } + @Override public File getBindingsLocation() { return subFolder(getBindingsDirectory()); } + @Override public String getBindingsDirectory() { return bindingsDirectory; } + @Override public ConfigurationImpl setBindingsDirectory(final String dir) { bindingsDirectory = dir; return this; @@ -535,279 +593,341 @@ public class ConfigurationImpl implements Configuration, Serializable { return this; } + @Override public File getJournalLocation() { return subFolder(getJournalDirectory()); } + @Override public String getJournalDirectory() { return journalDirectory; } + @Override public ConfigurationImpl setJournalDirectory(final String dir) { journalDirectory = dir; return this; } + @Override public JournalType getJournalType() { return journalType; } + @Override public ConfigurationImpl setPagingDirectory(final String dir) { pagingDirectory = dir; return this; } + @Override public File getPagingLocation() { return subFolder(getPagingDirectory()); } + @Override public String getPagingDirectory() { return pagingDirectory; } + @Override public ConfigurationImpl setJournalType(final JournalType type) { journalType = type; return this; } + @Override public boolean isJournalSyncTransactional() { return journalSyncTransactional; } + @Override public ConfigurationImpl setJournalSyncTransactional(final boolean sync) { journalSyncTransactional = sync; return this; } + @Override public boolean isJournalSyncNonTransactional() { return journalSyncNonTransactional; } + @Override public ConfigurationImpl setJournalSyncNonTransactional(final boolean sync) { journalSyncNonTransactional = sync; return this; } + @Override public int getJournalFileSize() { return journalFileSize; } + @Override public ConfigurationImpl setJournalFileSize(final int size) { journalFileSize = size; return this; } + @Override public int getJournalMinFiles() { return journalMinFiles; } + @Override public ConfigurationImpl setJournalMinFiles(final int files) { journalMinFiles = files; return this; } + @Override public boolean isLogJournalWriteRate() { return logJournalWriteRate; } + @Override public ConfigurationImpl setLogJournalWriteRate(final boolean logJournalWriteRate) { this.logJournalWriteRate = logJournalWriteRate; return this; } + @Override public int getJournalPerfBlastPages() { return journalPerfBlastPages; } + @Override public ConfigurationImpl setJournalPerfBlastPages(final int journalPerfBlastPages) { this.journalPerfBlastPages = journalPerfBlastPages; return this; } + @Override public boolean isRunSyncSpeedTest() { return runSyncSpeedTest; } + @Override public ConfigurationImpl setRunSyncSpeedTest(final boolean run) { runSyncSpeedTest = run; return this; } + @Override public boolean isCreateBindingsDir() { return createBindingsDir; } + @Override public ConfigurationImpl setCreateBindingsDir(final boolean create) { createBindingsDir = create; return this; } + @Override public boolean isCreateJournalDir() { return createJournalDir; } + @Override public ConfigurationImpl setCreateJournalDir(final boolean create) { createJournalDir = create; return this; } + @Override public boolean isWildcardRoutingEnabled() { return wildcardRoutingEnabled; } + @Override public ConfigurationImpl setWildcardRoutingEnabled(final boolean enabled) { wildcardRoutingEnabled = enabled; return this; } + @Override public long getTransactionTimeout() { return transactionTimeout; } + @Override public ConfigurationImpl setTransactionTimeout(final long timeout) { transactionTimeout = timeout; return this; } + @Override public long getTransactionTimeoutScanPeriod() { return transactionTimeoutScanPeriod; } + @Override public ConfigurationImpl setTransactionTimeoutScanPeriod(final long period) { transactionTimeoutScanPeriod = period; return this; } + @Override public long getMessageExpiryScanPeriod() { return messageExpiryScanPeriod; } + @Override public ConfigurationImpl setMessageExpiryScanPeriod(final long messageExpiryScanPeriod) { this.messageExpiryScanPeriod = messageExpiryScanPeriod; return this; } + @Override public int getMessageExpiryThreadPriority() { return messageExpiryThreadPriority; } + @Override public ConfigurationImpl setMessageExpiryThreadPriority(final int messageExpiryThreadPriority) { this.messageExpiryThreadPriority = messageExpiryThreadPriority; return this; } + @Override public boolean isSecurityEnabled() { return securityEnabled; } + @Override public ConfigurationImpl setSecurityEnabled(final boolean enabled) { securityEnabled = enabled; return this; } + @Override public boolean isGracefulShutdownEnabled() { return gracefulShutdownEnabled; } + @Override public ConfigurationImpl setGracefulShutdownEnabled(final boolean enabled) { gracefulShutdownEnabled = enabled; return this; } + @Override public long getGracefulShutdownTimeout() { return gracefulShutdownTimeout; } + @Override public ConfigurationImpl setGracefulShutdownTimeout(final long timeout) { gracefulShutdownTimeout = timeout; return this; } + @Override public boolean isJMXManagementEnabled() { return jmxManagementEnabled; } + @Override public ConfigurationImpl setJMXManagementEnabled(final boolean enabled) { jmxManagementEnabled = enabled; return this; } + @Override public String getJMXDomain() { return jmxDomain; } + @Override public ConfigurationImpl setJMXDomain(final String domain) { jmxDomain = domain; return this; } + @Override public String getLargeMessagesDirectory() { return largeMessagesDirectory; } + @Override public File getLargeMessagesLocation() { return subFolder(getLargeMessagesDirectory()); } + @Override public ConfigurationImpl setLargeMessagesDirectory(final String directory) { largeMessagesDirectory = directory; return this; } + @Override public boolean isMessageCounterEnabled() { return messageCounterEnabled; } + @Override public ConfigurationImpl setMessageCounterEnabled(final boolean enabled) { messageCounterEnabled = enabled; return this; } + @Override public long getMessageCounterSamplePeriod() { return messageCounterSamplePeriod; } + @Override public ConfigurationImpl setMessageCounterSamplePeriod(final long period) { messageCounterSamplePeriod = period; return this; } + @Override public int getMessageCounterMaxDayHistory() { return messageCounterMaxDayHistory; } + @Override public ConfigurationImpl setMessageCounterMaxDayHistory(final int maxDayHistory) { messageCounterMaxDayHistory = maxDayHistory; return this; } + @Override public SimpleString getManagementAddress() { return managementAddress; } + @Override public ConfigurationImpl setManagementAddress(final SimpleString address) { managementAddress = address; return this; } + @Override public SimpleString getManagementNotificationAddress() { return managementNotificationAddress; } + @Override public ConfigurationImpl setManagementNotificationAddress(final SimpleString address) { managementNotificationAddress = address; return this; } + @Override public String getClusterUser() { return clusterUser; } + @Override public ConfigurationImpl setClusterUser(final String user) { clusterUser = user; return this; } + @Override public String getClusterPassword() { return clusterPassword; } @@ -821,105 +941,128 @@ public class ConfigurationImpl implements Configuration, Serializable { return this; } + @Override public ConfigurationImpl setClusterPassword(final String theclusterPassword) { clusterPassword = theclusterPassword; return this; } + @Override public int getJournalCompactMinFiles() { return journalCompactMinFiles; } + @Override public int getJournalCompactPercentage() { return journalCompactPercentage; } + @Override public ConfigurationImpl setJournalCompactMinFiles(final int minFiles) { journalCompactMinFiles = minFiles; return this; } + @Override public ConfigurationImpl setJournalCompactPercentage(final int percentage) { journalCompactPercentage = percentage; return this; } + @Override public long getServerDumpInterval() { return serverDumpInterval; } + @Override public ConfigurationImpl setServerDumpInterval(final long intervalInMilliseconds) { serverDumpInterval = intervalInMilliseconds; return this; } + @Override public int getMemoryWarningThreshold() { return memoryWarningThreshold; } + @Override public ConfigurationImpl setMemoryWarningThreshold(final int memoryWarningThreshold) { this.memoryWarningThreshold = memoryWarningThreshold; return this; } + @Override public long getMemoryMeasureInterval() { return memoryMeasureInterval; } + @Override public ConfigurationImpl setMemoryMeasureInterval(final long memoryMeasureInterval) { this.memoryMeasureInterval = memoryMeasureInterval; return this; } + @Override public int getJournalMaxIO_AIO() { return journalMaxIO_AIO; } + @Override public ConfigurationImpl setJournalMaxIO_AIO(final int journalMaxIO) { journalMaxIO_AIO = journalMaxIO; return this; } + @Override public int getJournalBufferTimeout_AIO() { return journalBufferTimeout_AIO; } + @Override public ConfigurationImpl setJournalBufferTimeout_AIO(final int journalBufferTimeout) { journalBufferTimeout_AIO = journalBufferTimeout; return this; } + @Override public int getJournalBufferSize_AIO() { return journalBufferSize_AIO; } + @Override public ConfigurationImpl setJournalBufferSize_AIO(final int journalBufferSize) { journalBufferSize_AIO = journalBufferSize; return this; } + @Override public int getJournalMaxIO_NIO() { return journalMaxIO_NIO; } + @Override public ConfigurationImpl setJournalMaxIO_NIO(final int journalMaxIO) { journalMaxIO_NIO = journalMaxIO; return this; } + @Override public int getJournalBufferTimeout_NIO() { return journalBufferTimeout_NIO; } + @Override public ConfigurationImpl setJournalBufferTimeout_NIO(final int journalBufferTimeout) { journalBufferTimeout_NIO = journalBufferTimeout; return this; } + @Override public int getJournalBufferSize_NIO() { return journalBufferSize_NIO; } + @Override public ConfigurationImpl setJournalBufferSize_NIO(final int journalBufferSize) { journalBufferSize_NIO = journalBufferSize; return this; @@ -979,14 +1122,17 @@ public class ConfigurationImpl implements Configuration, Serializable { return this; } + @Override public List getConnectorServiceConfigurations() { return this.connectorServiceConfigurations; } + @Override public List getSecuritySettingPlugins() { return this.securitySettingPlugins; } + @Override public File getBrokerInstance() { if (artemisInstance != null) { return artemisInstance; @@ -1003,6 +1149,7 @@ public class ConfigurationImpl implements Configuration, Serializable { return artemisInstance; } + @Override public void setBrokerInstance(File directory) { this.artemisInstance = directory; } @@ -1036,40 +1183,48 @@ public class ConfigurationImpl implements Configuration, Serializable { return sb.toString(); } + @Override public ConfigurationImpl setConnectorServiceConfigurations(final List configs) { this.connectorServiceConfigurations = configs; return this; } + @Override public ConfigurationImpl addConnectorServiceConfiguration(final ConnectorServiceConfiguration config) { this.connectorServiceConfigurations.add(config); return this; } + @Override public ConfigurationImpl setSecuritySettingPlugins(final List plugins) { this.securitySettingPlugins = plugins; return this; } + @Override public ConfigurationImpl addSecuritySettingPlugin(final SecuritySettingPlugin plugin) { this.securitySettingPlugins.add(plugin); return this; } + @Override public boolean isMaskPassword() { return maskPassword; } + @Override public ConfigurationImpl setMaskPassword(boolean maskPassword) { this.maskPassword = maskPassword; return this; } + @Override public ConfigurationImpl setPasswordCodec(String codec) { passwordCodec = codec; return this; } + @Override public String getPasswordCodec() { return passwordCodec; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java index 72085c31b1..ae8c5f337f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/Validators.java @@ -33,12 +33,14 @@ public final class Validators { } public static final Validator NO_CHECK = new Validator() { + @Override public void validate(final String name, final Object value) { return; } }; public static final Validator NOT_NULL_OR_EMPTY = new Validator() { + @Override public void validate(final String name, final Object value) { String str = (String) value; if (str == null || str.length() == 0) { @@ -48,6 +50,7 @@ public final class Validators { }; public static final Validator GT_ZERO = new Validator() { + @Override public void validate(final String name, final Object value) { Number val = (Number) value; if (val.doubleValue() > 0) { @@ -60,6 +63,7 @@ public final class Validators { }; public static final Validator PERCENTAGE = new Validator() { + @Override public void validate(final String name, final Object value) { Number val = (Number) value; if (val == null || (val.intValue() < 0 || val.intValue() > 100)) { @@ -69,6 +73,7 @@ public final class Validators { }; public static final Validator GE_ZERO = new Validator() { + @Override public void validate(final String name, final Object value) { Number val = (Number) value; if (val.doubleValue() >= 0) { @@ -81,6 +86,7 @@ public final class Validators { }; public static final Validator MINUS_ONE_OR_GT_ZERO = new Validator() { + @Override public void validate(final String name, final Object value) { Number val = (Number) value; if (val.doubleValue() == -1 || val.doubleValue() > 0) { @@ -93,6 +99,7 @@ public final class Validators { }; public static final Validator MINUS_ONE_OR_GE_ZERO = new Validator() { + @Override public void validate(final String name, final Object value) { Number val = (Number) value; if (val.doubleValue() == -1 || val.doubleValue() >= 0) { @@ -105,6 +112,7 @@ public final class Validators { }; public static final Validator THREAD_PRIORITY_RANGE = new Validator() { + @Override public void validate(final String name, final Object value) { Number val = (Number) value; if (val.intValue() >= Thread.MIN_PRIORITY && val.intValue() <= Thread.MAX_PRIORITY) { @@ -117,6 +125,7 @@ public final class Validators { }; public static final Validator JOURNAL_TYPE = new Validator() { + @Override public void validate(final String name, final Object value) { String val = (String) value; if (val == null || !val.equals(JournalType.NIO.toString()) && !val.equals(JournalType.ASYNCIO.toString())) { @@ -126,6 +135,7 @@ public final class Validators { }; public static final Validator ADDRESS_FULL_MESSAGE_POLICY_TYPE = new Validator() { + @Override public void validate(final String name, final Object value) { String val = (String) value; if (val == null || !val.equals(AddressFullMessagePolicy.PAGE.toString()) && @@ -138,6 +148,7 @@ public final class Validators { }; public static final Validator SLOW_CONSUMER_POLICY_TYPE = new Validator() { + @Override public void validate(final String name, final Object value) { String val = (String) value; if (val == null || !val.equals(SlowConsumerPolicy.KILL.toString()) && !val.equals(SlowConsumerPolicy.NOTIFY.toString())) { @@ -147,6 +158,7 @@ public final class Validators { }; public static final Validator MESSAGE_LOAD_BALANCING_TYPE = new Validator() { + @Override public void validate(final String name, final Object value) { String val = (String) value; if (val == null || !val.equals(MessageLoadBalancingType.OFF.toString()) && diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java index 76c39166c6..3459bf5aef 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java @@ -675,6 +675,7 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { } SecuritySettingPlugin securitySettingPlugin = AccessController.doPrivileged(new PrivilegedAction() { + @Override public SecuritySettingPlugin run() { return (SecuritySettingPlugin) ClassloadingUtil.newInstanceFromClassLoader(clazz); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java index 63534f6404..dd9f7dd10c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/filter/impl/FilterImpl.java @@ -93,10 +93,12 @@ public class FilterImpl implements Filter { // Filter implementation --------------------------------------------------------------------- + @Override public SimpleString getFilterString() { return sfilterString; } + @Override public synchronized boolean match(final ServerMessage message) { try { boolean result = booleanExpression.matches(new FilterableServerMessage(message)); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AcceptorControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AcceptorControlImpl.java index 9097cd74c0..0e9359dbad 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AcceptorControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AcceptorControlImpl.java @@ -49,6 +49,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont // AcceptorControlMBean implementation --------------------------- + @Override public String getFactoryClassName() { clearIO(); try { @@ -59,6 +60,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont } } + @Override public String getName() { clearIO(); try { @@ -69,6 +71,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont } } + @Override public Map getParameters() { clearIO(); try { @@ -79,6 +82,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont } } + @Override public boolean isStarted() { clearIO(); try { @@ -89,6 +93,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont } } + @Override public void start() throws Exception { clearIO(); try { @@ -99,6 +104,7 @@ public class AcceptorControlImpl extends AbstractControl implements AcceptorCont } } + @Override public void stop() throws Exception { clearIO(); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java index 239c9484de..753aa2443b 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java @@ -135,6 +135,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active // ActiveMQServerControlMBean implementation -------------------- + @Override public boolean isStarted() { clearIO(); try { @@ -145,6 +146,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getVersion() { checkStarted(); @@ -157,6 +159,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isBackup() { checkStarted(); @@ -169,6 +172,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isSharedStore() { checkStarted(); @@ -181,6 +185,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getBindingsDirectory() { checkStarted(); @@ -205,6 +210,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] getIncomingInterceptorClassNames() { checkStarted(); @@ -217,6 +223,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] getOutgoingInterceptorClassNames() { checkStarted(); @@ -229,6 +236,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalBufferSize() { checkStarted(); @@ -241,6 +249,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalBufferTimeout() { checkStarted(); @@ -253,6 +262,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void setFailoverOnServerShutdown(boolean failoverOnServerShutdown) { checkStarted(); @@ -268,6 +278,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isFailoverOnServerShutdown() { checkStarted(); @@ -286,6 +297,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalMaxIO() { checkStarted(); @@ -298,6 +310,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getJournalDirectory() { checkStarted(); @@ -310,6 +323,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalFileSize() { checkStarted(); @@ -322,6 +336,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalMinFiles() { checkStarted(); @@ -334,6 +349,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalCompactMinFiles() { checkStarted(); @@ -346,6 +362,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getJournalCompactPercentage() { checkStarted(); @@ -358,6 +375,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isPersistenceEnabled() { checkStarted(); @@ -370,6 +388,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getJournalType() { checkStarted(); @@ -382,6 +401,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getPagingDirectory() { checkStarted(); @@ -394,6 +414,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getScheduledThreadPoolMaxSize() { checkStarted(); @@ -406,6 +427,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getThreadPoolMaxSize() { checkStarted(); @@ -418,6 +440,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public long getSecurityInvalidationInterval() { checkStarted(); @@ -430,6 +453,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isClustered() { checkStarted(); @@ -442,6 +466,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isCreateBindingsDir() { checkStarted(); @@ -454,6 +479,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isCreateJournalDir() { checkStarted(); @@ -466,6 +492,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isJournalSyncNonTransactional() { checkStarted(); @@ -478,6 +505,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isJournalSyncTransactional() { checkStarted(); @@ -490,6 +518,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isSecurityEnabled() { checkStarted(); @@ -502,6 +531,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isAsyncConnectionExecutionEnabled() { checkStarted(); @@ -514,6 +544,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void deployQueue(final String address, final String name, final String filterString) throws Exception { checkStarted(); @@ -526,6 +557,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void deployQueue(final String address, final String name, final String filterStr, @@ -543,6 +575,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void createQueue(final String address, final String name) throws Exception { checkStarted(); @@ -555,6 +588,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void createQueue(final String address, final String name, final boolean durable) throws Exception { checkStarted(); @@ -567,6 +601,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void createQueue(final String address, final String name, final String filterStr, @@ -587,6 +622,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] getQueueNames() { checkStarted(); @@ -606,6 +642,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] getAddressNames() { checkStarted(); @@ -625,6 +662,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void destroyQueue(final String name) throws Exception { checkStarted(); @@ -639,6 +677,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getConnectionCount() { checkStarted(); @@ -651,6 +690,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void enableMessageCounters() { checkStarted(); @@ -663,6 +703,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void disableMessageCounters() { checkStarted(); @@ -675,6 +716,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void resetAllMessageCounters() { checkStarted(); @@ -687,6 +729,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void resetAllMessageCounterHistories() { checkStarted(); @@ -699,6 +742,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public boolean isMessageCounterEnabled() { checkStarted(); @@ -711,6 +755,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public synchronized long getMessageCounterSamplePeriod() { checkStarted(); @@ -723,6 +768,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public synchronized void setMessageCounterSamplePeriod(final long newPeriod) { checkStarted(); @@ -743,6 +789,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public int getMessageCounterMaxDayCount() { checkStarted(); @@ -755,6 +802,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void setMessageCounterMaxDayCount(final int count) { checkStarted(); @@ -770,6 +818,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] listPreparedTransactions() { checkStarted(); @@ -780,6 +829,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active Map xids = resourceManager.getPreparedTransactionsWithCreationTime(); ArrayList> xidsSortedByCreationTime = new ArrayList>(xids.entrySet()); Collections.sort(xidsSortedByCreationTime, new Comparator>() { + @Override public int compare(final Entry entry1, final Entry entry2) { // sort by creation time, oldest first return (int) (entry1.getValue() - entry2.getValue()); @@ -799,6 +849,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String listPreparedTransactionDetailsAsJSON() throws Exception { checkStarted(); @@ -811,6 +862,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active ArrayList> xidsSortedByCreationTime = new ArrayList>(xids.entrySet()); Collections.sort(xidsSortedByCreationTime, new Comparator>() { + @Override public int compare(final Entry entry1, final Entry entry2) { // sort by creation time, oldest first return (int) (entry1.getValue() - entry2.getValue()); @@ -831,6 +883,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String listPreparedTransactionDetailsAsHTML() throws Exception { checkStarted(); @@ -843,6 +896,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active ArrayList> xidsSortedByCreationTime = new ArrayList>(xids.entrySet()); Collections.sort(xidsSortedByCreationTime, new Comparator>() { + @Override public int compare(final Entry entry1, final Entry entry2) { // sort by creation time, oldest first return (int) (entry1.getValue() - entry2.getValue()); @@ -907,6 +961,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] listHeuristicCommittedTransactions() { checkStarted(); @@ -925,6 +980,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] listHeuristicRolledBackTransactions() { checkStarted(); @@ -943,6 +999,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public synchronized boolean commitPreparedTransaction(final String transactionAsBase64) throws Exception { checkStarted(); @@ -967,6 +1024,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public synchronized boolean rollbackPreparedTransaction(final String transactionAsBase64) throws Exception { checkStarted(); @@ -992,6 +1050,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] listRemoteAddresses() { checkStarted(); @@ -1012,6 +1071,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } + @Override public String[] listRemoteAddresses(final String ipAddress) { checkStarted(); @@ -1033,6 +1093,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } + @Override public synchronized boolean closeConnectionsForAddress(final String ipAddress) { checkStarted(); @@ -1057,6 +1118,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } + @Override public synchronized boolean closeConsumerConnectionsForAddress(final String address) { boolean closed = false; checkStarted(); @@ -1096,6 +1158,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active return closed; } + @Override public synchronized boolean closeConnectionsForUser(final String userName) { boolean closed = false; checkStarted(); @@ -1126,6 +1189,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active return closed; } + @Override public String[] listConnectionIDs() { checkStarted(); @@ -1144,6 +1208,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] listSessions(final String connectionID) { checkStarted(); @@ -1165,6 +1230,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active /* (non-Javadoc) * @see org.apache.activemq.artemis.api.core.management.ActiveMQServerControl#listProducersInfoAsJSON() */ + @Override public String listProducersInfoAsJSON() throws Exception { JSONArray producers = new JSONArray(); @@ -1175,6 +1241,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active return producers.toString(); } + @Override public Object[] getConnectors() throws Exception { checkStarted(); @@ -1202,6 +1269,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getConnectorsAsJSON() throws Exception { checkStarted(); @@ -1220,6 +1288,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void addSecuritySettings(final String addressMatch, final String sendRoles, final String consumeRoles, @@ -1245,6 +1314,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void removeSecuritySettings(final String addressMatch) throws Exception { checkStarted(); @@ -1258,6 +1328,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public Object[] getRoles(final String addressMatch) throws Exception { checkStarted(); @@ -1280,6 +1351,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getRolesAsJSON(final String addressMatch) throws Exception { checkStarted(); @@ -1298,6 +1370,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String getAddressSettingsAsJSON(final String address) throws Exception { checkStarted(); @@ -1333,6 +1406,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active return jsonObject.toString(); } + @Override public void addAddressSettings(final String address, final String DLA, final String expiryAddress, @@ -1411,6 +1485,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active storageManager.storeAddressSetting(new PersistedAddressSetting(new SimpleString(address), addressSettings)); } + @Override public void removeAddressSettings(final String addressMatch) throws Exception { checkStarted(); @@ -1418,6 +1493,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active storageManager.deleteAddressSetting(new SimpleString(addressMatch)); } + @Override public void sendQueueInfoToQueue(final String queueName, final String address) throws Exception { checkStarted(); @@ -1437,6 +1513,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] getDivertNames() { checkStarted(); @@ -1456,6 +1533,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void createDivert(final String name, final String routingName, final String address, @@ -1475,6 +1553,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void destroyDivert(final String name) throws Exception { checkStarted(); @@ -1487,6 +1566,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public String[] getBridgeNames() { checkStarted(); @@ -1506,6 +1586,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void createBridge(final String name, final String queueName, final String forwardingAddress, @@ -1544,6 +1625,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void destroyBridge(final String name) throws Exception { checkStarted(); @@ -1556,6 +1638,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void forceFailover() throws Exception { checkStarted(); @@ -1604,6 +1687,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active // NotificationEmitter implementation ---------------------------- + @Override public void removeNotificationListener(final NotificationListener listener, final NotificationFilter filter, final Object handback) throws ListenerNotFoundException { @@ -1616,6 +1700,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void removeNotificationListener(final NotificationListener listener) throws ListenerNotFoundException { clearIO(); try { @@ -1626,6 +1711,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public void addNotificationListener(final NotificationListener listener, final NotificationFilter filter, final Object handback) throws IllegalArgumentException { @@ -1638,6 +1724,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active } } + @Override public MBeanNotificationInfo[] getNotificationInfo() { CoreNotificationType[] values = CoreNotificationType.values(); String[] names = new String[values.length]; @@ -1677,50 +1764,62 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active messageCounterManager.resetAllCounterHistories(); } + @Override public long getConnectionTTLOverride() { return configuration.getConnectionTTLOverride(); } + @Override public int getIDCacheSize() { return configuration.getIDCacheSize(); } + @Override public String getLargeMessagesDirectory() { return configuration.getLargeMessagesDirectory(); } + @Override public String getManagementAddress() { return configuration.getManagementAddress().toString(); } + @Override public String getManagementNotificationAddress() { return configuration.getManagementNotificationAddress().toString(); } + @Override public long getMessageExpiryScanPeriod() { return configuration.getMessageExpiryScanPeriod(); } + @Override public long getMessageExpiryThreadPriority() { return configuration.getMessageExpiryThreadPriority(); } + @Override public long getTransactionTimeout() { return configuration.getTransactionTimeout(); } + @Override public long getTransactionTimeoutScanPeriod() { return configuration.getTransactionTimeoutScanPeriod(); } + @Override public boolean isPersistDeliveryCountBeforeDelivery() { return configuration.isPersistDeliveryCountBeforeDelivery(); } + @Override public boolean isPersistIDCache() { return configuration.isPersistIDCache(); } + @Override public boolean isWildcardRoutingEnabled() { return configuration.isWildcardRoutingEnabled(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java index 382adc3ef0..2eb02d665f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java @@ -70,10 +70,12 @@ public class AddressControlImpl extends AbstractControl implements AddressContro // AddressControlMBean implementation ---------------------------- + @Override public String getAddress() { return address.toString(); } + @Override public String[] getQueueNames() throws Exception { clearIO(); try { @@ -94,6 +96,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public String[] getBindingNames() throws Exception { clearIO(); try { @@ -113,6 +116,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public Object[] getRoles() throws Exception { clearIO(); try { @@ -131,6 +135,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public String getRolesAsJSON() throws Exception { clearIO(); try { @@ -147,6 +152,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public long getNumberOfBytesPerPage() throws Exception { clearIO(); try { @@ -157,6 +163,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public long getAddressSize() throws Exception { clearIO(); try { @@ -167,6 +174,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public long getNumberOfMessages() throws Exception { clearIO(); long totalMsgs = 0; @@ -188,6 +196,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public boolean isPaging() throws Exception { clearIO(); try { @@ -198,6 +207,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro } } + @Override public int getNumberOfPages() throws Exception { clearIO(); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BridgeControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BridgeControlImpl.java index 01c37ce6f8..053c19b82a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BridgeControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BridgeControlImpl.java @@ -47,6 +47,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl // BridgeControlMBean implementation --------------------------- + @Override public String[] getStaticConnectors() throws Exception { clearIO(); try { @@ -57,6 +58,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public String getForwardingAddress() { clearIO(); try { @@ -67,6 +69,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public String getQueueName() { clearIO(); try { @@ -77,6 +80,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public String getDiscoveryGroupName() { clearIO(); try { @@ -87,6 +91,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public String getFilterString() { clearIO(); try { @@ -97,6 +102,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public int getReconnectAttempts() { clearIO(); try { @@ -107,6 +113,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public String getName() { clearIO(); try { @@ -117,6 +124,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public long getRetryInterval() { clearIO(); try { @@ -127,6 +135,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public double getRetryIntervalMultiplier() { clearIO(); try { @@ -137,6 +146,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public String getTransformerClassName() { clearIO(); try { @@ -147,6 +157,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public boolean isStarted() { clearIO(); try { @@ -157,6 +168,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public boolean isUseDuplicateDetection() { clearIO(); try { @@ -167,6 +179,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public boolean isHA() { clearIO(); try { @@ -177,6 +190,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public void start() throws Exception { clearIO(); try { @@ -187,6 +201,7 @@ public class BridgeControlImpl extends AbstractControl implements BridgeControl } } + @Override public void stop() throws Exception { clearIO(); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BroadcastGroupControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BroadcastGroupControlImpl.java index 5e42771d86..64cf0c7809 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BroadcastGroupControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/BroadcastGroupControlImpl.java @@ -49,6 +49,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc // BroadcastGroupControlMBean implementation --------------------- + @Override public String getName() { clearIO(); try { @@ -59,6 +60,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public long getBroadcastPeriod() { clearIO(); try { @@ -69,6 +71,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public Object[] getConnectorPairs() { clearIO(); try { @@ -86,6 +89,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public String getConnectorPairsAsJSON() throws Exception { clearIO(); try { @@ -102,6 +106,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } //todo ghoward we should deal with this properly + @Override public String getGroupAddress() throws Exception { clearIO(); try { @@ -115,6 +120,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public int getGroupPort() throws Exception { clearIO(); try { @@ -128,6 +134,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public int getLocalBindPort() throws Exception { clearIO(); try { @@ -143,6 +150,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc // MessagingComponentControlMBean implementation ----------------- + @Override public boolean isStarted() { clearIO(); try { @@ -153,6 +161,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public void start() throws Exception { clearIO(); try { @@ -163,6 +172,7 @@ public class BroadcastGroupControlImpl extends AbstractControl implements Broadc } } + @Override public void stop() throws Exception { clearIO(); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java index a89f0dffb8..9d726f9f39 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ClusterConnectionControlImpl.java @@ -50,6 +50,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu // ClusterConnectionControlMBean implementation --------------------------- + @Override public String getAddress() { clearIO(); try { @@ -61,6 +62,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } + @Override public String getDiscoveryGroupName() { clearIO(); try { @@ -72,6 +74,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } + @Override public int getMaxHops() { clearIO(); try { @@ -83,6 +86,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } + @Override public String getName() { clearIO(); try { @@ -94,6 +98,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } + @Override public long getRetryInterval() { clearIO(); try { @@ -105,6 +110,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } + @Override public String getNodeID() { clearIO(); try { @@ -115,6 +121,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public String[] getStaticConnectors() { clearIO(); try { @@ -130,6 +137,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public String getStaticConnectorsAsJSON() throws Exception { clearIO(); try { @@ -151,6 +159,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public boolean isDuplicateDetection() { clearIO(); try { @@ -161,6 +170,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public String getMessageLoadBalancingType() { clearIO(); try { @@ -171,6 +181,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public String getTopology() { clearIO(); try { @@ -181,6 +192,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public Map getNodes() throws Exception { clearIO(); try { @@ -191,6 +203,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public boolean isStarted() { clearIO(); try { @@ -201,6 +214,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public void start() throws Exception { clearIO(); try { @@ -212,6 +226,7 @@ public class ClusterConnectionControlImpl extends AbstractControl implements Clu } } + @Override public void stop() throws Exception { clearIO(); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/DivertControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/DivertControlImpl.java index d7767831fc..9f55481885 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/DivertControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/DivertControlImpl.java @@ -47,6 +47,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl this.configuration = configuration; } + @Override public String getAddress() { clearIO(); try { @@ -57,6 +58,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl } } + @Override public String getFilter() { clearIO(); try { @@ -67,6 +69,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl } } + @Override public String getForwardingAddress() { clearIO(); try { @@ -77,6 +80,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl } } + @Override public String getRoutingName() { clearIO(); try { @@ -87,6 +91,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl } } + @Override public String getTransformerClassName() { clearIO(); try { @@ -97,6 +102,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl } } + @Override public String getUniqueName() { clearIO(); try { @@ -107,6 +113,7 @@ public class DivertControlImpl extends AbstractControl implements DivertControl } } + @Override public boolean isExclusive() { clearIO(); try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java index 9f6488e458..3c0dab7bdc 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/QueueControlImpl.java @@ -120,6 +120,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { // QueueControlMBean implementation ------------------------------ + @Override public String getName() { clearIO(); try { @@ -130,12 +131,14 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String getAddress() { checkStarted(); return address; } + @Override public String getFilter() { checkStarted(); @@ -150,6 +153,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean isDurable() { checkStarted(); @@ -162,6 +166,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean isTemporary() { checkStarted(); @@ -174,6 +179,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public long getMessageCount() { checkStarted(); @@ -186,6 +192,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public int getConsumerCount() { checkStarted(); @@ -198,6 +205,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public int getDeliveringCount() { checkStarted(); @@ -210,6 +218,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public long getMessagesAdded() { checkStarted(); @@ -222,6 +231,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public long getMessagesAcknowledged() { checkStarted(); @@ -234,6 +244,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public long getID() { checkStarted(); @@ -246,6 +257,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public long getScheduledCount() { checkStarted(); @@ -258,6 +270,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String getDeadLetterAddress() { checkStarted(); @@ -275,6 +288,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String getExpiryAddress() { checkStarted(); @@ -294,6 +308,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public Map[] listScheduledMessages() throws Exception { checkStarted(); @@ -307,6 +322,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String listScheduledMessagesAsJSON() throws Exception { checkStarted(); @@ -333,6 +349,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { return messages; } + @Override public Map[]> listDeliveringMessages() { checkStarted(); @@ -353,6 +370,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } + @Override public String listDeliveringMessagesAsJSON() throws Exception { checkStarted(); @@ -365,6 +383,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public Map[] listMessages(final String filterStr) throws Exception { checkStarted(); @@ -396,6 +415,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String listMessagesAsJSON(final String filter) throws Exception { checkStarted(); @@ -435,10 +455,12 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } + @Override public String getFirstMessageAsJSON() throws Exception { return toJSON(getFirstMessage()).toString(); } + @Override public Long getFirstMessageTimestamp() throws Exception { Map[] _message = getFirstMessage(); if (_message == null || _message.length == 0 || _message[0] == null) { @@ -451,6 +473,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { return (Long) message.get("timestamp"); } + @Override public Long getFirstMessageAge() throws Exception { Long firstMessageTimestamp = getFirstMessageTimestamp(); if (firstMessageTimestamp == null) { @@ -460,6 +483,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { return now - firstMessageTimestamp.longValue(); } + @Override public long countMessages(final String filterStr) throws Exception { checkStarted(); @@ -491,6 +515,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean removeMessage(final long messageID) throws Exception { checkStarted(); @@ -506,10 +531,12 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public int removeMessages(final String filterStr) throws Exception { return removeMessages(FLUSH_LIMIT, filterStr); } + @Override public int removeMessages(final int flushLimit, final String filterStr) throws Exception { checkStarted(); @@ -524,6 +551,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean expireMessage(final long messageID) throws Exception { checkStarted(); @@ -536,6 +564,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public int expireMessages(final String filterStr) throws Exception { checkStarted(); @@ -552,6 +581,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean retryMessage(final long messageID) throws Exception { checkStarted(); @@ -577,6 +607,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public int retryMessages() throws Exception { checkStarted(); clearIO(); @@ -589,10 +620,12 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean moveMessage(final long messageID, final String otherQueueName) throws Exception { return moveMessage(messageID, otherQueueName, false); } + @Override public boolean moveMessage(final long messageID, final String otherQueueName, final boolean rejectDuplicates) throws Exception { @@ -614,10 +647,12 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } + @Override public int moveMessages(final String filterStr, final String otherQueueName) throws Exception { return moveMessages(filterStr, otherQueueName, false); } + @Override public int moveMessages(final int flushLimit, final String filterStr, final String otherQueueName, @@ -644,12 +679,14 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } + @Override public int moveMessages(final String filterStr, final String otherQueueName, final boolean rejectDuplicates) throws Exception { return moveMessages(FLUSH_LIMIT, filterStr, otherQueueName, rejectDuplicates); } + @Override public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception { checkStarted(); @@ -664,6 +701,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception { checkStarted(); @@ -676,6 +714,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public int changeMessagesPriority(final String filterStr, final int newPriority) throws Exception { checkStarted(); @@ -693,6 +732,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean changeMessagePriority(final long messageID, final int newPriority) throws Exception { checkStarted(); @@ -708,6 +748,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String listMessageCounter() { checkStarted(); @@ -723,6 +764,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public void resetMessageCounter() { checkStarted(); @@ -735,6 +777,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String listMessageCounterAsHTML() { checkStarted(); @@ -747,6 +790,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String listMessageCounterHistory() throws Exception { checkStarted(); @@ -759,6 +803,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public String listMessageCounterHistoryAsHTML() { checkStarted(); @@ -771,6 +816,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public void pause() { checkStarted(); @@ -783,6 +829,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public void resume() { checkStarted(); @@ -795,6 +842,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public boolean isPaused() throws Exception { checkStarted(); @@ -807,6 +855,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } } + @Override public void flushExecutor() { checkStarted(); @@ -858,6 +907,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { return MBeanInfoHelper.getMBeanOperationsInfo(QueueControl.class); } + @Override public void resetMessagesAdded() throws Exception { checkStarted(); @@ -871,6 +921,7 @@ public class QueueControlImpl extends AbstractControl implements QueueControl { } + @Override public void resetMessagesAcknowledged() throws Exception { checkStarted(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/MessageCounter.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/MessageCounter.java index dce7e5e8e6..f3ea99883b 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/MessageCounter.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/MessageCounter.java @@ -104,6 +104,7 @@ public class MessageCounter { } private final Runnable onTimeExecutor = new Runnable() { + @Override public void run() { long latestMessagesAdded = serverQueue.getMessagesAdded(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/impl/MessageCounterManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/impl/MessageCounterManagerImpl.java index c81aa655aa..ff268c9198 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/impl/MessageCounterManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/messagecounter/impl/MessageCounterManagerImpl.java @@ -58,6 +58,7 @@ public class MessageCounterManagerImpl implements MessageCounterManager { this.scheduledThreadPool = scheduledThreadPool; } + @Override public synchronized void start() { if (started) { return; @@ -71,6 +72,7 @@ public class MessageCounterManagerImpl implements MessageCounterManager { started = true; } + @Override public synchronized void stop() { if (!started) { return; @@ -81,10 +83,12 @@ public class MessageCounterManagerImpl implements MessageCounterManager { started = false; } + @Override public synchronized void clear() { messageCounters.clear(); } + @Override public synchronized void reschedule(final long newPeriod) { boolean wasStarted = started; @@ -99,24 +103,29 @@ public class MessageCounterManagerImpl implements MessageCounterManager { } } + @Override public long getSamplePeriod() { return period; } + @Override public int getMaxDayCount() { return maxDayCount; } + @Override public void setMaxDayCount(final int count) { maxDayCount = count; } + @Override public void registerMessageCounter(final String name, final MessageCounter counter) { synchronized (messageCounters) { messageCounters.put(name, counter); } } + @Override public MessageCounter unregisterMessageCounter(final String name) { synchronized (messageCounters) { return messageCounters.remove(name); @@ -129,6 +138,7 @@ public class MessageCounterManagerImpl implements MessageCounterManager { } } + @Override public void resetAllCounters() { synchronized (messageCounters) { Iterator iter = messageCounters.values().iterator(); @@ -141,6 +151,7 @@ public class MessageCounterManagerImpl implements MessageCounterManager { } } + @Override public void resetAllCounterHistories() { synchronized (messageCounters) { Iterator iter = messageCounters.values().iterator(); @@ -159,6 +170,7 @@ public class MessageCounterManagerImpl implements MessageCounterManager { private Future future; + @Override public synchronized void run() { if (closed) { return; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCache.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCache.java index 0c6cf9151b..2c82974f6e 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCache.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PageCache.java @@ -32,6 +32,7 @@ public interface PageCache extends SoftValueHashMap.ValueCache { /** * @return whether this cache is still being updated */ + @Override boolean isLive(); /** diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java index cfbe8e893d..f132723657 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/PagedReferenceImpl.java @@ -48,10 +48,12 @@ public class PagedReferenceImpl implements PagedReference { private boolean alreadyAcked; + @Override public ServerMessage getMessage() { return getPagedMessage().getMessage(); } + @Override public synchronized PagedMessage getPagedMessage() { PagedMessage returnMessage = message != null ? message.get() : null; @@ -67,6 +69,7 @@ public class PagedReferenceImpl implements PagedReference { return returnMessage; } + @Override public PagePosition getPosition() { return position; } @@ -86,14 +89,17 @@ public class PagedReferenceImpl implements PagedReference { this.subscription = subscription; } + @Override public boolean isPaged() { return true; } + @Override public void setPersistedCount(int count) { this.persistedCount = count; } + @Override public int getPersistedCount() { return persistedCount; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCacheImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCacheImpl.java index f964d42406..5efe6d6e99 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCacheImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCacheImpl.java @@ -64,22 +64,27 @@ class PageCacheImpl implements PageCache { } } + @Override public long getPageId() { return page.getPageId(); } + @Override public void lock() { lock.writeLock().lock(); } + @Override public void unlock() { lock.writeLock().unlock(); } + @Override public void setMessages(final PagedMessage[] messages) { this.messages = messages; } + @Override public int getNumberOfMessages() { lock.readLock().lock(); try { @@ -90,6 +95,7 @@ class PageCacheImpl implements PageCache { } } + @Override public void close() { } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java index 437cd96b18..bd8dda5dcb 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java @@ -88,6 +88,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { // Public -------------------------------------------------------- + @Override public synchronized PageSubscription createSubscription(long cursorID, Filter filter, boolean persistent) { if (ActiveMQServerLogger.LOGGER.isTraceEnabled()) { ActiveMQServerLogger.LOGGER.trace(this.pagingStore.getAddress() + " creating subscription " + cursorID + " with filter " + filter, new Exception("trace")); @@ -102,10 +103,12 @@ public class PageCursorProviderImpl implements PageCursorProvider { return activeCursor; } + @Override public synchronized PageSubscription getSubscription(long cursorID) { return activeCursors.get(cursorID); } + @Override public PagedMessage getMessage(final PagePosition pos) { PageCache cache = getPageCache(pos.getPageNr()); @@ -117,12 +120,14 @@ public class PageCursorProviderImpl implements PageCursorProvider { return cache.getMessage(pos.getMessageNr()); } + @Override public PagedReference newReference(final PagePosition pos, final PagedMessage msg, final PageSubscription subscription) { return new PagedReferenceImpl(pos, msg, subscription); } + @Override public PageCache getPageCache(final long pageId) { try { boolean needToRead = false; @@ -183,16 +188,19 @@ public class PageCursorProviderImpl implements PageCursorProvider { } } + @Override public void addPageCache(PageCache cache) { synchronized (softCache) { softCache.put(cache.getPageId(), cache); } } + @Override public void setCacheMaxSize(final int size) { softCache.setMaxElements(size); } + @Override public int getCacheSize() { synchronized (softCache) { return softCache.size(); @@ -205,6 +213,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { } } + @Override public void processReload() throws Exception { Collection cursorList = this.activeCursors.values(); for (PageSubscription cursor : cursorList) { @@ -231,6 +240,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { } + @Override public void stop() { for (PageSubscription cursor : activeCursors.values()) { cursor.stop(); @@ -249,6 +259,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { } } + @Override public void flushExecutors() { for (PageSubscription cursor : activeCursors.values()) { cursor.flushExecutors(); @@ -256,6 +267,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { waitForFuture(); } + @Override public void close(PageSubscription cursor) { activeCursors.remove(cursor.getId()); @@ -274,6 +286,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { scheduledCleanup.incrementAndGet(); executor.execute(new Runnable() { + @Override public void run() { storageManager.setContext(storageManager.newSingleThreadContext()); try { @@ -293,6 +306,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { * Hence the PagingStore will be holding a write lock, meaning no messages are going to be paged at this time. * So, we shouldn't lock anything after this method, to avoid dead locks between the writeLock and any synchronization with the CursorProvider. */ + @Override public void onPageModeCleared() { ArrayList subscriptions = cloneSubscriptions(); @@ -314,14 +328,17 @@ public class PageCursorProviderImpl implements PageCursorProvider { } } + @Override public void disableCleanup() { this.cleanupEnabled = false; } + @Override public void resumeCleanup() { this.cleanupEnabled = true; } + @Override public void cleanup() { ArrayList depagedPages = new ArrayList(); @@ -524,6 +541,7 @@ public class PageCursorProviderImpl implements PageCursorProvider { } } + @Override public void printDebug() { System.out.println("Debug information for PageCursorProviderImpl:"); for (PageCache cache : softCache.values()) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PagePositionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PagePositionImpl.java index 51dda9dd6b..fbf3bd60e3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PagePositionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PagePositionImpl.java @@ -53,6 +53,7 @@ public class PagePositionImpl implements PagePosition { /** * @return the recordID */ + @Override public long getRecordID() { return recordID; } @@ -60,6 +61,7 @@ public class PagePositionImpl implements PagePosition { /** * @param recordID the recordID to set */ + @Override public void setRecordID(long recordID) { this.recordID = recordID; } @@ -67,6 +69,7 @@ public class PagePositionImpl implements PagePosition { /** * @return the pageNr */ + @Override public long getPageNr() { return pageNr; } @@ -74,6 +77,7 @@ public class PagePositionImpl implements PagePosition { /** * @return the messageNr */ + @Override public int getMessageNr() { return messageNr; } @@ -97,10 +101,12 @@ public class PagePositionImpl implements PagePosition { } } + @Override public PagePosition nextMessage() { return new PagePositionImpl(this.pageNr, this.messageNr + 1); } + @Override public PagePosition nextPage() { return new PagePositionImpl(this.pageNr + 1, 0); } @@ -140,6 +146,7 @@ public class PagePositionImpl implements PagePosition { * There is a rule for finalizing it where I'm establishing a counter, and that rule won't work without this method defined. * So, please don't remove it unless you had to remove that test for any weird reason.. it's here for a purpose! */ + @Override protected void finalize() { } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java index 5a0d94f7f3..c879564a97 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionCounterImpl.java @@ -73,6 +73,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { private LinkedList> loadList; private final Runnable cleanupCheck = new Runnable() { + @Override public void run() { cleanup(); } @@ -131,6 +132,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { * * @param pageID */ + @Override public void cleanupNonTXCounters(final long pageID) throws Exception { Pair pendingInfo; synchronized (this) { @@ -186,6 +188,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { * @param recordID1 * @param add */ + @Override public void applyIncrementOnTX(Transaction tx, long recordID1, int add) { CounterOperations oper = (CounterOperations) tx.getProperty(TransactionPropertyIndexes.PAGE_COUNT_INC); @@ -198,6 +201,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { oper.operations.add(new ItemOper(this, recordID1, add)); } + @Override public synchronized void loadValue(final long recordID1, final long value1) { if (this.subscription != null) { // it could be null on testcases... which is ok @@ -215,6 +219,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { } + @Override public void delete() throws Exception { Transaction tx = new TransactionImpl(storage); @@ -223,6 +228,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { tx.commit(); } + @Override public void delete(Transaction tx) throws Exception { // always lock the StorageManager first. storage.readLock(); @@ -248,6 +254,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { } } + @Override public void loadInc(long id, int add) { if (loadList == null) { loadList = new LinkedList>(); @@ -256,6 +263,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { loadList.add(new Pair(id, add)); } + @Override public void processReload() { if (loadList != null) { if (subscription != null) { @@ -272,6 +280,7 @@ public class PageSubscriptionCounterImpl implements PageSubscriptionCounter { } } + @Override public synchronized void addInc(long id, int variance) { value.addAndGet(variance); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java index 2bb7cd9f49..08bcdfcce1 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageSubscriptionImpl.java @@ -113,26 +113,32 @@ final class PageSubscriptionImpl implements PageSubscription { // Public -------------------------------------------------------- + @Override public PagingStore getPagingStore() { return pageStore; } + @Override public Queue getQueue() { return queue; } + @Override public boolean isPaging() { return pageStore.isPaging(); } + @Override public void setQueue(Queue queue) { this.queue = queue; } + @Override public void disableAutoCleanup() { autoCleanup = false; } + @Override public void enableAutoCleanup() { autoCleanup = true; } @@ -141,6 +147,7 @@ final class PageSubscriptionImpl implements PageSubscription { return cursorProvider; } + @Override public void notEmpty() { synchronized (consumedPages) { this.empty = false; @@ -148,6 +155,7 @@ final class PageSubscriptionImpl implements PageSubscription { } + @Override public void bookmark(PagePosition position) throws Exception { PageCursorInfo cursorInfo = getPageInfo(position); @@ -158,6 +166,7 @@ final class PageSubscriptionImpl implements PageSubscription { confirmPosition(position); } + @Override public long getMessageCount() { if (empty) { return 0; @@ -167,6 +176,7 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public PageSubscriptionCounter getCounter() { return counter; } @@ -178,6 +188,7 @@ final class PageSubscriptionImpl implements PageSubscription { * TX) we may have big holes on the page streaming, and we will need to ignore such pages on the * cursor/subscription. */ + @Override public void reloadPageCompletion(PagePosition position) { PageCursorInfo info = new PageCursorInfo(position.getPageNr(), position.getMessageNr(), null); info.setCompleteInfo(position); @@ -186,6 +197,7 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public void scheduleCleanupCheck() { if (autoCleanup) { if (scheduledCleanupCount.get() > 2) { @@ -195,6 +207,7 @@ final class PageSubscriptionImpl implements PageSubscription { scheduledCleanupCount.incrementAndGet(); executor.execute(new Runnable() { + @Override public void run() { try { cleanupEntries(false); @@ -210,6 +223,7 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public void onPageModeCleared(Transaction tx) throws Exception { if (counter != null) { // this could be null on testcases @@ -221,6 +235,7 @@ final class PageSubscriptionImpl implements PageSubscription { /** * It will cleanup all the records for completed pages */ + @Override public void cleanupEntries(final boolean completeDelete) throws Exception { if (completeDelete) { counter.delete(); @@ -298,6 +313,7 @@ final class PageSubscriptionImpl implements PageSubscription { public void afterCommit(final Transaction tx1) { executor.execute(new Runnable() { + @Override public void run() { if (!completeDelete) { cursorProvider.scheduleCleanup(); @@ -390,6 +406,7 @@ final class PageSubscriptionImpl implements PageSubscription { return new PagePositionImpl(pageStore.getFirstPage(), -1); } + @Override public void confirmPosition(final Transaction tx, final PagePosition position) throws Exception { // if the cursor is persistent if (persistent) { @@ -399,6 +416,7 @@ final class PageSubscriptionImpl implements PageSubscription { } + @Override public void ackTx(final Transaction tx, final PagedReference reference) throws Exception { confirmPosition(tx, reference.getPosition()); @@ -418,6 +436,7 @@ final class PageSubscriptionImpl implements PageSubscription { tx.commit(); } + @Override public boolean contains(PagedReference ref) throws Exception { // We first verify if the message was routed to this queue boolean routed = false; @@ -437,6 +456,7 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public void confirmPosition(final PagePosition position) throws Exception { // if we are dealing with a persistent cursor if (persistent) { @@ -482,6 +502,7 @@ final class PageSubscriptionImpl implements PageSubscription { } + @Override public void addPendingDelivery(final PagePosition position) { getPageInfo(position).incrementPendingTX(); } @@ -514,6 +535,7 @@ final class PageSubscriptionImpl implements PageSubscription { /** * Theres no need to synchronize this method as it's only called from journal load on startup */ + @Override public void reloadACK(final PagePosition position) { if (recoveredACK == null) { recoveredACK = new LinkedList(); @@ -533,6 +555,7 @@ final class PageSubscriptionImpl implements PageSubscription { processACK(position); } + @Override public void lateDeliveryRollback(PagePosition position) { PageCursorInfo cursorInfo = processACK(position); cursorInfo.decrementPendingTX(); @@ -559,6 +582,7 @@ final class PageSubscriptionImpl implements PageSubscription { /** * All the data associated with the cursor should go away here */ + @Override public void destroy() throws Exception { final long tx = store.generateID(); try { @@ -602,10 +626,12 @@ final class PageSubscriptionImpl implements PageSubscription { return cursorId; } + @Override public boolean isPersistent() { return persistent; } + @Override public void processReload() throws Exception { if (recoveredACK != null) { if (isTrace) { @@ -640,6 +666,7 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public void flushExecutors() { FutureLatch future = new FutureLatch(); executor.execute(future); @@ -648,10 +675,12 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public void stop() { flushExecutors(); } + @Override public void printDebug() { printDebug(toString()); } @@ -663,6 +692,7 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public void onDeletePage(Page deletedPage) throws Exception { PageCursorInfo info; synchronized (consumedPages) { @@ -693,10 +723,12 @@ final class PageSubscriptionImpl implements PageSubscription { } } + @Override public Executor getExecutor() { return executor; } + @Override public void reloadPageInfo(long pageNr) { getPageInfo(pageNr, true); } @@ -1052,12 +1084,14 @@ final class PageSubscriptionImpl implements PageSubscription { public CursorIterator() { } + @Override public void redeliver(PagePosition reference) { synchronized (redeliveries) { redeliveries.add(reference); } } + @Override public void repeat() { if (isredelivery) { synchronized (redeliveries) { @@ -1206,6 +1240,7 @@ final class PageSubscriptionImpl implements PageSubscription { * QueueImpl::deliver could be calling hasNext while QueueImpl.depage could be using next and hasNext as well. * It would be a rare race condition but I would prefer avoiding that scenario */ + @Override public synchronized boolean hasNext() { // if an unbehaved program called hasNext twice before next, we only cache it once. if (cachedNext != null) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java index 1bf9f2a1a7..dca0091622 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/Page.java @@ -291,6 +291,7 @@ public final class Page implements Comparable { return "Page::pageID=" + this.pageId + ", file=" + this.file; } + @Override public int compareTo(Page otherPage) { return otherPage.getPageId() - this.pageId; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageSyncTimer.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageSyncTimer.java index a8d24c7dfb..614f201402 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageSyncTimer.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageSyncTimer.java @@ -43,6 +43,7 @@ final class PageSyncTimer { private final long timeSync; private final Runnable runnable = new Runnable() { + @Override public void run() { tick(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java index f6990d6cbf..85c4489598 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PageTransactionInfoImpl.java @@ -70,18 +70,22 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo { // Public -------------------------------------------------------- + @Override public long getRecordID() { return recordID; } + @Override public void setRecordID(final long recordID) { this.recordID = recordID; } + @Override public long getTransactionID() { return transactionID; } + @Override public void onUpdate(final int update, final StorageManager storageManager, PagingManager pagingManager) { int sizeAfterUpdate = numberOfMessages.addAndGet(-update); if (sizeAfterUpdate == 0 && storageManager != null) { @@ -96,17 +100,20 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo { } } + @Override public void increment(final int durableSize, final int nonDurableSize) { numberOfPersistentMessages.addAndGet(durableSize); numberOfMessages.addAndGet(durableSize + nonDurableSize); } + @Override public int getNumberOfMessages() { return numberOfMessages.get(); } // EncodingSupport implementation + @Override public synchronized void decode(final ActiveMQBuffer buffer) { transactionID = buffer.readLong(); numberOfMessages.set(buffer.readInt()); @@ -114,15 +121,18 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo { committed = true; } + @Override public synchronized void encode(final ActiveMQBuffer buffer) { buffer.writeLong(transactionID); buffer.writeInt(numberOfPersistentMessages.get()); } + @Override public synchronized int getEncodeSize() { return DataConstants.SIZE_LONG + DataConstants.SIZE_INT; } + @Override public synchronized void commit() { if (lateDeliveries != null) { // This is to make sure deliveries that were touched before the commit arrived will be delivered @@ -135,6 +145,7 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo { lateDeliveries = null; } + @Override public void store(final StorageManager storageManager, PagingManager pagingManager, final Transaction tx) throws Exception { @@ -146,12 +157,14 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo { * (non-Javadoc) * @see org.apache.activemq.artemis.core.paging.PageTransactionInfo#storeUpdate(org.apache.activemq.artemis.core.persistence.StorageManager, org.apache.activemq.artemis.core.transaction.Transaction, int) */ + @Override public void storeUpdate(final StorageManager storageManager, final PagingManager pagingManager, final Transaction tx) throws Exception { internalUpdatePageManager(storageManager, pagingManager, tx, 1); } + @Override public void reloadUpdate(final StorageManager storageManager, final PagingManager pagingManager, final Transaction tx, @@ -184,18 +197,22 @@ public final class PageTransactionInfoImpl implements PageTransactionInfo { return pgtxUpdate; } + @Override public boolean isCommit() { return committed; } + @Override public void setCommitted(final boolean committed) { this.committed = committed; } + @Override public boolean isRollback() { return rolledback; } + @Override public synchronized void rollback() { rolledback = true; committed = false; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java index 9b5b0fde66..b4e6f386dd 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java @@ -57,10 +57,12 @@ public class PagedMessageImpl implements PagedMessage { public PagedMessageImpl() { } + @Override public ServerMessage getMessage() { return message; } + @Override public void initMessage(StorageManager storage) { if (largeMessageLazyData != null) { LargeServerMessage lgMessage = storage.createLargeMessage(); @@ -73,16 +75,19 @@ public class PagedMessageImpl implements PagedMessage { } } + @Override public long getTransactionID() { return transactionID; } + @Override public long[] getQueueIDs() { return queueIDs; } // EncodingSupport implementation -------------------------------- + @Override public void decode(final ActiveMQBuffer buffer) { transactionID = buffer.readLong(); @@ -112,6 +117,7 @@ public class PagedMessageImpl implements PagedMessage { } } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(transactionID); @@ -128,6 +134,7 @@ public class PagedMessageImpl implements PagedMessage { } } + @Override public int getEncodeSize() { return DataConstants.SIZE_LONG + DataConstants.SIZE_BYTE + DataConstants.SIZE_INT + message.getEncodeSize() + DataConstants.SIZE_INT + queueIDs.length * DataConstants.SIZE_LONG; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java index 15f01f696b..ce43c348dc 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingManagerImpl.java @@ -81,6 +81,7 @@ public final class PagingManagerImpl implements PagingManager { } } + @Override public void disableCleanup() { if (!cleanupEnabled) { return; @@ -98,6 +99,7 @@ public final class PagingManagerImpl implements PagingManager { } } + @Override public void resumeCleanup() { if (cleanupEnabled) { return; @@ -115,11 +117,13 @@ public final class PagingManagerImpl implements PagingManager { } } + @Override public SimpleString[] getStoreNames() { Set names = stores.keySet(); return names.toArray(new SimpleString[names.size()]); } + @Override public void reloadStores() throws Exception { lock(); try { @@ -143,6 +147,7 @@ public final class PagingManagerImpl implements PagingManager { } + @Override public void deletePageStore(final SimpleString storeName) throws Exception { syncLock.readLock().lock(); try { @@ -159,6 +164,7 @@ public final class PagingManagerImpl implements PagingManager { /** * stores is a ConcurrentHashMap, so we don't need to synchronize this method */ + @Override public PagingStore getPageStore(final SimpleString storeName) throws Exception { PagingStore store = stores.get(storeName); @@ -168,6 +174,7 @@ public final class PagingManagerImpl implements PagingManager { return newStore(storeName); } + @Override public void addTransaction(final PageTransactionInfo pageTransaction) { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("Adding pageTransaction " + pageTransaction.getTransactionID()); @@ -175,6 +182,7 @@ public final class PagingManagerImpl implements PagingManager { transactions.put(pageTransaction.getTransactionID(), pageTransaction); } + @Override public void removeTransaction(final long id) { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("Removing pageTransaction " + id); @@ -182,6 +190,7 @@ public final class PagingManagerImpl implements PagingManager { transactions.remove(id); } + @Override public PageTransactionInfo getTransaction(final long id) { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("looking up pageTX = " + id); @@ -218,6 +227,7 @@ public final class PagingManagerImpl implements PagingManager { } } + @Override public synchronized void stop() throws Exception { if (!started) { return; @@ -238,6 +248,7 @@ public final class PagingManagerImpl implements PagingManager { } } + @Override public void processReload() throws Exception { for (PagingStore store : stores.values()) { store.processReload(); @@ -263,10 +274,12 @@ public final class PagingManagerImpl implements PagingManager { } } + @Override public void unlock() { syncLock.writeLock().unlock(); } + @Override public void lock() { syncLock.writeLock().lock(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java index ce42860957..b6a14f3b35 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java @@ -87,14 +87,17 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory { // Public -------------------------------------------------------- + @Override public void stop() { } + @Override public synchronized PagingStore newStore(final SimpleString address, final AddressSettings settings) { return new PagingStoreImpl(address, scheduledExecutor, syncTimeout, pagingManager, storageManager, null, this, address, settings, executorFactory.getExecutor(), syncNonTransactional); } + @Override public synchronized SequentialFileFactory newFileFactory(final SimpleString address) throws Exception { String guid = UUIDGenerator.getInstance().generateStringUUID(); @@ -120,10 +123,12 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory { return factory; } + @Override public void setPagingManager(final PagingManager pagingManager) { this.pagingManager = pagingManager; } + @Override public List reloadStores(final HierarchicalRepository addressSettingsRepository) throws Exception { File[] files = directory.listFiles(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java index 582466411d..f224fd1d90 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java @@ -179,6 +179,7 @@ public class PagingStoreImpl implements PagingStore { /** * @param addressSettings */ + @Override public void applySetting(final AddressSettings addressSettings) { maxSize = addressSettings.getMaxSizeBytes(); @@ -210,38 +211,47 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void unlock() { lock.writeLock().unlock(); } + @Override public PageCursorProvider getCursorProvider() { return cursorProvider; } + @Override public long getFirstPage() { return firstPageId; } + @Override public SimpleString getAddress() { return address; } + @Override public long getAddressSize() { return sizeInBytes.get(); } + @Override public long getMaxSize() { return maxSize; } + @Override public AddressFullMessagePolicy getAddressFullMessagePolicy() { return addressFullMessagePolicy; } + @Override public long getPageSizeBytes() { return pageSize; } + @Override public File getFolder() { SequentialFileFactory factoryUsed = this.fileFactory; if (factoryUsed != null) { @@ -252,6 +262,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public boolean isPaging() { lock.readLock().lock(); @@ -272,18 +283,22 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public int getNumberOfPages() { return numberOfPages; } + @Override public int getCurrentWritingPage() { return currentPageId; } + @Override public SimpleString getStoreName() { return storeName; } + @Override public void sync() throws Exception { if (syncTimer != null) { syncTimer.addSync(storageManager.getContext()); @@ -294,6 +309,7 @@ public class PagingStoreImpl implements PagingStore { } + @Override public void ioSync() throws Exception { lock.readLock().lock(); @@ -307,10 +323,12 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void processReload() throws Exception { cursorProvider.processReload(); } + @Override public PagingManager getPagingManager() { return pagingManager; } @@ -336,6 +354,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void flushExecutors() { cursorProvider.flushExecutors(); @@ -427,6 +446,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void stopPaging() { lock.writeLock().lock(); try { @@ -438,6 +458,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public boolean startPaging() { if (!running) { return false; @@ -490,16 +511,19 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public Page getCurrentPage() { return currentPage; } + @Override public boolean checkPageFileExists(final int pageNumber) { String fileName = createFileName(pageNumber); SequentialFile file = fileFactory.createSequentialFile(fileName); return file.exists(); } + @Override public Page createPage(final int pageNumber) throws Exception { String fileName = createFileName(pageNumber); @@ -521,6 +545,7 @@ public class PagingStoreImpl implements PagingStore { return page; } + @Override public void forceAnotherPage() throws Exception { openNewPage(); } @@ -537,6 +562,7 @@ public class PagingStoreImpl implements PagingStore { * externally is used only on tests, and that's why this method is part of the Testable Interface *

*/ + @Override public Page depage() throws Exception { lock.writeLock().lock(); // Make sure no checks are done on currentPage while we are depaging try { @@ -600,6 +626,7 @@ public class PagingStoreImpl implements PagingStore { private class MemoryFreedRunnablesExecutor implements Runnable { + @Override public void run() { Runnable runnable; @@ -621,6 +648,7 @@ public class PagingStoreImpl implements PagingStore { this.runnable = runnable; } + @Override public synchronized void run() { if (!ran) { runnable.run(); @@ -630,6 +658,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public boolean checkMemory(final Runnable runWhenAvailable) { if (addressFullMessagePolicy == AddressFullMessagePolicy.BLOCK && maxSize != -1) { if (sizeInBytes.get() > maxSize) { @@ -664,6 +693,7 @@ public class PagingStoreImpl implements PagingStore { return true; } + @Override public void addSize(final int size) { if (addressFullMessagePolicy == AddressFullMessagePolicy.BLOCK) { if (maxSize != -1) { @@ -817,6 +847,7 @@ public class PagingStoreImpl implements PagingStore { /** * This method will disable cleanup of pages. No page will be deleted after this call. */ + @Override public void disableCleanup() { getCursorProvider().disableCleanup(); } @@ -824,6 +855,7 @@ public class PagingStoreImpl implements PagingStore { /** * This method will re-enable cleanup of pages. Notice that it will also start cleanup threads. */ + @Override public void enableCleanup() { getCursorProvider().resumeCleanup(); } @@ -913,6 +945,7 @@ public class PagingStoreImpl implements PagingStore { this.pagingManager = pagingManager; } + @Override public void afterCommit(final Transaction tx) { // If part of the transaction goes to the queue, and part goes to paging, we can't let depage start for the // transaction until all the messages were added to the queue @@ -923,15 +956,18 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void afterPrepare(final Transaction tx) { } + @Override public void afterRollback(final Transaction tx) { if (pageTransaction != null) { pageTransaction.rollback(); } } + @Override public void beforeCommit(final Transaction tx) throws Exception { syncStore(); storePageTX(tx); @@ -946,6 +982,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void beforePrepare(final Transaction tx) throws Exception { syncStore(); storePageTX(tx); @@ -959,6 +996,7 @@ public class PagingStoreImpl implements PagingStore { } } + @Override public void beforeRollback(final Transaction tx) throws Exception { } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/BatchingIDGenerator.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/BatchingIDGenerator.java index a8bb7cbef4..346bb403f0 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/BatchingIDGenerator.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/BatchingIDGenerator.java @@ -100,6 +100,7 @@ public final class BatchingIDGenerator implements IDGenerator { } + @Override public long generateID() { long id = counter.getAndIncrement(); @@ -109,6 +110,7 @@ public final class BatchingIDGenerator implements IDGenerator { return id; } + @Override public long getCurrentID() { return counter.get(); } @@ -178,14 +180,17 @@ public final class BatchingIDGenerator implements IDGenerator { IDCounterEncoding() { } + @Override public void decode(final ActiveMQBuffer buffer) { id = buffer.readLong(); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(id); } + @Override public int getEncodeSize() { return DataConstants.SIZE_LONG; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java index d8b6fa93af..14bee9114f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java @@ -143,20 +143,24 @@ public final class DescribeJournal { JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback() { + @Override public void onReadUpdateRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { out.println("operation@UpdateTX;txID=" + transactionID + "," + describeRecord(recordInfo)); checkRecordCounter(recordInfo); } + @Override public void onReadUpdateRecord(final RecordInfo recordInfo) throws Exception { out.println("operation@Update;" + describeRecord(recordInfo)); checkRecordCounter(recordInfo); } + @Override public void onReadRollbackRecord(final long transactionID) throws Exception { out.println("operation@Rollback;txID=" + transactionID); } + @Override public void onReadPrepareRecord(final long transactionID, final byte[] extraData, final int numberOfRecords) throws Exception { @@ -164,26 +168,32 @@ public final class DescribeJournal { ",extraData=" + encode(extraData) + ", xid=" + toXid(extraData)); } + @Override public void onReadDeleteRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { out.println("operation@DeleteRecordTX;txID=" + transactionID + "," + describeRecord(recordInfo)); } + @Override public void onReadDeleteRecord(final long recordID) throws Exception { out.println("operation@DeleteRecord;recordID=" + recordID); } + @Override public void onReadCommitRecord(final long transactionID, final int numberOfRecords) throws Exception { out.println("operation@Commit;txID=" + transactionID + ",numberOfRecords=" + numberOfRecords); } + @Override public void onReadAddRecordTX(final long transactionID, final RecordInfo recordInfo) throws Exception { out.println("operation@AddRecordTX;txID=" + transactionID + "," + describeRecord(recordInfo)); } + @Override public void onReadAddRecord(final RecordInfo recordInfo) throws Exception { out.println("operation@AddRecord;" + describeRecord(recordInfo)); } + @Override public void markAsDataFile(final JournalFile file1) { } @@ -252,6 +262,7 @@ public final class DescribeJournal { Map preparedMessageRefCount = new HashMap(); journal.load(records, preparedTransactions, new TransactionFailureCallback() { + @Override public void failedTransaction(long transactionID, List records1, List recordsToDelete) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java index e0ef75be74..45a544dc34 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java @@ -274,6 +274,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void clearContext() { OperationContextImpl.clearContext(); } @@ -632,10 +633,12 @@ public class JournalStorageManager implements StorageManager { } } + @Override public OperationContext getContext() { return OperationContextImpl.getContext(executorFactory); } + @Override public void setContext(final OperationContext context) { OperationContextImpl.setContext(context); } @@ -644,30 +647,37 @@ public class JournalStorageManager implements StorageManager { return singleThreadExecutor; } + @Override public OperationContext newSingleThreadContext() { return newContext(singleThreadExecutor); } + @Override public OperationContext newContext(final Executor executor1) { return new OperationContextImpl(executor1); } + @Override public void afterCompleteOperations(final IOCallback run) { getContext().executeOnCompletion(run); } + @Override public long generateID() { return idGenerator.generateID(); } + @Override public long getCurrentID() { return idGenerator.getCurrentID(); } + @Override public LargeServerMessage createLargeMessage() { return new LargeServerMessageImpl(this); } + @Override public final void addBytesToLargeMessage(final SequentialFile file, final long messageId, final byte[] bytes) throws Exception { @@ -686,6 +696,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public LargeServerMessage createLargeMessage(final long id, final MessageInternal message) throws Exception { readLock(); try { @@ -729,6 +740,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void confirmPendingLargeMessageTX(final Transaction tx, long messageID, long recordID) throws Exception { readLock(); try { @@ -743,6 +755,7 @@ public class JournalStorageManager implements StorageManager { /** * We don't need messageID now but we are likely to need it we ever decide to support a database */ + @Override public void confirmPendingLargeMessage(long recordID) throws Exception { readLock(); try { @@ -753,6 +766,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeMessage(final ServerMessage message) throws Exception { if (message.getMessageID() <= 0) { // Sanity check only... this shouldn't happen unless there is a bug @@ -776,6 +790,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeReference(final long queueID, final long messageID, final boolean last) throws Exception { readLock(); try { @@ -796,6 +811,7 @@ public class JournalStorageManager implements StorageManager { storageManagerLock.readLock().unlock(); } + @Override public void storeAcknowledge(final long queueID, final long messageID) throws Exception { readLock(); try { @@ -806,6 +822,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeCursorAcknowledge(long queueID, PagePosition position) throws Exception { readLock(); try { @@ -818,6 +835,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteMessage(final long messageID) throws Exception { readLock(); try { @@ -832,6 +850,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void updateScheduledDeliveryTime(final MessageReference ref) throws Exception { ScheduledDeliveryEncoding encoding = new ScheduledDeliveryEncoding(ref.getScheduledDeliveryTime(), ref.getQueue().getID()); readLock(); @@ -843,6 +862,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeDuplicateID(final SimpleString address, final byte[] duplID, final long recordID) throws Exception { readLock(); try { @@ -855,6 +875,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteDuplicateID(final long recordID) throws Exception { readLock(); try { @@ -867,6 +888,7 @@ public class JournalStorageManager implements StorageManager { // Transactional operations + @Override public void storeMessageTransactional(final long txID, final ServerMessage message) throws Exception { if (message.getMessageID() <= 0) { throw ActiveMQMessageBundle.BUNDLE.messageIdNotAssigned(); @@ -887,6 +909,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storePageTransaction(final long txID, final PageTransactionInfo pageTransaction) throws Exception { readLock(); try { @@ -898,6 +921,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void updatePageTransaction(final long txID, final PageTransactionInfo pageTransaction, final int depages) throws Exception { @@ -910,6 +934,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void updatePageTransaction(final PageTransactionInfo pageTransaction, final int depages) throws Exception { readLock(); try { @@ -920,6 +945,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeReferenceTransactional(final long txID, final long queueID, final long messageID) throws Exception { readLock(); try { @@ -930,6 +956,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeAcknowledgeTransactional(final long txID, final long queueID, final long messageID) throws Exception { @@ -942,6 +969,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeCursorAcknowledgeTransactional(long txID, long queueID, PagePosition position) throws Exception { readLock(); try { @@ -954,16 +982,19 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storePageCompleteTransactional(long txID, long queueID, PagePosition position) throws Exception { long recordID = idGenerator.generateID(); position.setRecordID(recordID); messageJournal.appendAddRecordTransactional(txID, recordID, JournalRecordIds.PAGE_CURSOR_COMPLETE, new CursorAckRecordEncoding(queueID, position)); } + @Override public void deletePageComplete(long ackID) throws Exception { messageJournal.appendDeleteRecord(ackID, false); } + @Override public void deleteCursorAcknowledgeTransactional(long txID, long ackID) throws Exception { readLock(); try { @@ -974,10 +1005,12 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteCursorAcknowledge(long ackID) throws Exception { messageJournal.appendDeleteRecord(ackID, false); } + @Override public long storeHeuristicCompletion(final Xid xid, final boolean isCommit) throws Exception { readLock(); try { @@ -991,6 +1024,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteHeuristicCompletion(final long id) throws Exception { readLock(); try { @@ -1002,6 +1036,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deletePageTransactional(final long recordID) throws Exception { readLock(); try { @@ -1012,6 +1047,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void updateScheduledDeliveryTimeTransactional(final long txID, final MessageReference ref) throws Exception { ScheduledDeliveryEncoding encoding = new ScheduledDeliveryEncoding(ref.getScheduledDeliveryTime(), ref.getQueue().getID()); readLock(); @@ -1024,6 +1060,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void prepare(final long txID, final Xid xid) throws Exception { readLock(); try { @@ -1034,19 +1071,23 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void commit(final long txID) throws Exception { commit(txID, true); } + @Override public void commitBindings(final long txID) throws Exception { bindingsJournal.appendCommitRecord(txID, true); } + @Override public void rollbackBindings(final long txID) throws Exception { // no need to sync, it's going away anyways bindingsJournal.appendRollbackRecord(txID, false); } + @Override public void commit(final long txID, final boolean lineUpContext) throws Exception { readLock(); try { @@ -1067,6 +1108,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void rollback(final long txID) throws Exception { readLock(); try { @@ -1077,6 +1119,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeDuplicateIDTransactional(final long txID, final SimpleString address, final byte[] duplID, @@ -1092,6 +1135,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void updateDuplicateIDTransactional(final long txID, final SimpleString address, final byte[] duplID, @@ -1107,6 +1151,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteDuplicateIDTransactional(final long txID, final long recordID) throws Exception { readLock(); try { @@ -1119,6 +1164,7 @@ public class JournalStorageManager implements StorageManager { // Other operations + @Override public void updateDeliveryCount(final MessageReference ref) throws Exception { // no need to store if it's the same value // otherwise the journal will get OME in case of lots of redeliveries @@ -1138,6 +1184,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void storeAddressSetting(PersistedAddressSetting addressSetting) throws Exception { deleteAddressSetting(addressSetting.getAddressMatch()); readLock(); @@ -1152,16 +1199,19 @@ public class JournalStorageManager implements StorageManager { } } + @Override public List recoverAddressSettings() throws Exception { ArrayList list = new ArrayList(mapPersistedAddressSettings.values()); return list; } + @Override public List recoverPersistedRoles() throws Exception { ArrayList list = new ArrayList(mapPersistedRoles.values()); return list; } + @Override public void storeSecurityRoles(PersistedRoles persistedRoles) throws Exception { deleteSecurityRoles(persistedRoles.getAddressMatch()); @@ -1199,6 +1249,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteAddressSetting(SimpleString addressMatch) throws Exception { PersistedAddressSetting oldSetting = mapPersistedAddressSettings.remove(addressMatch); if (oldSetting != null) { @@ -1212,6 +1263,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteSecurityRoles(SimpleString addressMatch) throws Exception { PersistedRoles oldRoles = mapPersistedRoles.remove(addressMatch); if (oldRoles != null) { @@ -1607,6 +1659,7 @@ public class JournalStorageManager implements StorageManager { } // grouping handler operations + @Override public void addGrouping(final GroupBinding groupBinding) throws Exception { GroupingEncoding groupingEncoding = new GroupingEncoding(groupBinding.getId(), groupBinding.getGroupId(), groupBinding.getClusterName()); readLock(); @@ -1618,6 +1671,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteGrouping(long tx, final GroupBinding groupBinding) throws Exception { readLock(); try { @@ -1630,6 +1684,7 @@ public class JournalStorageManager implements StorageManager { // BindingsImpl operations + @Override public void addQueueBinding(final long tx, final Binding binding) throws Exception { Queue queue = (Queue) binding.getBindable(); @@ -1648,6 +1703,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteQueueBinding(long tx, final long queueBindingID) throws Exception { readLock(); try { @@ -1658,6 +1714,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public long storePageCounterInc(long txID, long queueID, int value) throws Exception { readLock(); try { @@ -1670,6 +1727,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public long storePageCounterInc(long queueID, int value) throws Exception { readLock(); try { @@ -1711,6 +1769,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deleteIncrementRecord(long txID, long recordID) throws Exception { readLock(); try { @@ -1721,6 +1780,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deletePageCounter(long txID, long recordID) throws Exception { readLock(); try { @@ -1731,6 +1791,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void deletePendingPageCounter(long txID, long recordID) throws Exception { readLock(); try { @@ -1741,6 +1802,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public JournalLoadInformation loadBindingJournal(final List queueBindingInfos, final List groupingInfos) throws Exception { List records = new ArrayList(); @@ -1787,6 +1849,7 @@ public class JournalStorageManager implements StorageManager { return bindingsInfo; } + @Override public void lineUpContext() { readLock(); try { @@ -1800,6 +1863,7 @@ public class JournalStorageManager implements StorageManager { // ActiveMQComponent implementation // ------------------------------------------------------ + @Override public synchronized void start() throws Exception { if (started) { return; @@ -1827,6 +1891,7 @@ public class JournalStorageManager implements StorageManager { started = true; } + @Override public void stop() throws Exception { stop(false); } @@ -1839,6 +1904,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public synchronized void stop(boolean ioCriticalError) throws Exception { if (!started) { return; @@ -1888,6 +1954,7 @@ public class JournalStorageManager implements StorageManager { started = false; } + @Override public synchronized boolean isStarted() { return started; } @@ -1909,12 +1976,14 @@ public class JournalStorageManager implements StorageManager { } } + @Override public void beforePageRead() throws Exception { if (pageMaxConcurrentIO != null) { pageMaxConcurrentIO.acquire(); } } + @Override public void afterPageRead() throws Exception { if (pageMaxConcurrentIO != null) { pageMaxConcurrentIO.release(); @@ -1933,10 +2002,12 @@ public class JournalStorageManager implements StorageManager { // Public ----------------------------------------------------------------------------------- + @Override public Journal getMessageJournal() { return messageJournal; } + @Override public Journal getBindingsJournal() { return bindingsJournal; } @@ -1990,6 +2061,7 @@ public class JournalStorageManager implements StorageManager { } } Runnable deleteAction = new Runnable() { + @Override public void run() { try { readLock(); @@ -2030,6 +2102,7 @@ public class JournalStorageManager implements StorageManager { } } + @Override public SequentialFile createFileForLargeMessage(final long messageID, LargeMessageExtension extension) { return largeMessagesFactory.createSequentialFile(messageID + extension.getExtension()); } @@ -2303,37 +2376,47 @@ public class JournalStorageManager implements StorageManager { return DummyOperationContext.instance; } + @Override public void executeOnCompletion(final IOCallback runnable) { // There are no executeOnCompletion calls while using the DummyOperationContext // However we keep the code here for correctness runnable.done(); } + @Override public void replicationDone() { } + @Override public void replicationLineUp() { } + @Override public void storeLineUp() { } + @Override public void done() { } + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void waitCompletion() { } + @Override public boolean waitCompletion(final long timeout) { return true; } + @Override public void pageSyncLineUp() { } + @Override public void pageSyncDone() { } } @@ -2353,14 +2436,17 @@ public class JournalStorageManager implements StorageManager { xid = XidCodecSupport.decodeXid(ActiveMQBuffers.wrappedBuffer(data)); } + @Override public void decode(final ActiveMQBuffer buffer) { throw new IllegalStateException("Non Supported Operation"); } + @Override public void encode(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); } + @Override public int getEncodeSize() { return XidCodecSupport.getXidEncodeLength(xid); } @@ -2385,16 +2471,19 @@ public class JournalStorageManager implements StorageManager { HeuristicCompletionEncoding() { } + @Override public void decode(final ActiveMQBuffer buffer) { xid = XidCodecSupport.decodeXid(buffer); isCommit = buffer.readBoolean(); } + @Override public void encode(final ActiveMQBuffer buffer) { XidCodecSupport.encodeXid(xid, buffer); buffer.writeBoolean(isCommit); } + @Override public int getEncodeSize() { return XidCodecSupport.getXidEncodeLength(xid) + DataConstants.SIZE_BOOLEAN; } @@ -2417,20 +2506,24 @@ public class JournalStorageManager implements StorageManager { public GroupingEncoding() { } + @Override public int getEncodeSize() { return SimpleString.sizeofString(groupId) + SimpleString.sizeofString(clusterName); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(groupId); buffer.writeSimpleString(clusterName); } + @Override public void decode(final ActiveMQBuffer buffer) { groupId = buffer.readSimpleString(); clusterName = buffer.readSimpleString(); } + @Override public long getId() { return id; } @@ -2439,10 +2532,12 @@ public class JournalStorageManager implements StorageManager { this.id = id; } + @Override public SimpleString getGroupId() { return groupId; } + @Override public SimpleString getClusterName() { return clusterName; } @@ -2498,6 +2593,7 @@ public class JournalStorageManager implements StorageManager { this.autoCreated = autoCreated; } + @Override public long getId() { return id; } @@ -2506,30 +2602,37 @@ public class JournalStorageManager implements StorageManager { this.id = id; } + @Override public SimpleString getAddress() { return address; } + @Override public void replaceQueueName(SimpleString newName) { this.name = newName; } + @Override public SimpleString getFilterString() { return filterString; } + @Override public SimpleString getQueueName() { return name; } + @Override public SimpleString getUser() { return user; } + @Override public boolean isAutoCreated() { return autoCreated; } + @Override public void decode(final ActiveMQBuffer buffer) { name = buffer.readSimpleString(); address = buffer.readSimpleString(); @@ -2551,6 +2654,7 @@ public class JournalStorageManager implements StorageManager { autoCreated = buffer.readBoolean(); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(name); buffer.writeSimpleString(address); @@ -2559,6 +2663,7 @@ public class JournalStorageManager implements StorageManager { buffer.writeBoolean(autoCreated); } + @Override public int getEncodeSize() { return SimpleString.sizeofString(name) + SimpleString.sizeofString(address) + SimpleString.sizeofNullableString(filterString) + DataConstants.SIZE_BOOLEAN + @@ -2583,6 +2688,7 @@ public class JournalStorageManager implements StorageManager { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.EncodingSupport#decode(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer) */ + @Override public void decode(final ActiveMQBuffer buffer) { message.decodeHeadersAndProperties(buffer); } @@ -2590,6 +2696,7 @@ public class JournalStorageManager implements StorageManager { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.EncodingSupport#encode(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer) */ + @Override public void encode(final ActiveMQBuffer buffer) { message.encode(buffer); } @@ -2597,6 +2704,7 @@ public class JournalStorageManager implements StorageManager { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.EncodingSupport#getEncodeSize() */ + @Override public int getEncodeSize() { return message.getEncodeSize(); } @@ -2617,6 +2725,7 @@ public class JournalStorageManager implements StorageManager { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.EncodingSupport#decode(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer) */ + @Override public void decode(final ActiveMQBuffer buffer) { largeMessageID = buffer.readLong(); } @@ -2624,6 +2733,7 @@ public class JournalStorageManager implements StorageManager { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.EncodingSupport#encode(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer) */ + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(largeMessageID); } @@ -2631,6 +2741,7 @@ public class JournalStorageManager implements StorageManager { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.EncodingSupport#getEncodeSize() */ + @Override public int getEncodeSize() { return DataConstants.SIZE_LONG; } @@ -2658,16 +2769,19 @@ public class JournalStorageManager implements StorageManager { this.count = count; } + @Override public void decode(final ActiveMQBuffer buffer) { queueID = buffer.readLong(); count = buffer.readInt(); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeInt(count); } + @Override public int getEncodeSize() { return 8 + 4; } @@ -2692,14 +2806,17 @@ public class JournalStorageManager implements StorageManager { super(); } + @Override public void decode(final ActiveMQBuffer buffer) { queueID = buffer.readLong(); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeLong(queueID); } + @Override public int getEncodeSize() { return 8; } @@ -2779,6 +2896,7 @@ public class JournalStorageManager implements StorageManager { this.recods = records; } + @Override public void decode(ActiveMQBuffer buffer) { this.pageTX = buffer.readLong(); this.recods = buffer.readInt(); @@ -2850,6 +2968,7 @@ public class JournalStorageManager implements StorageManager { public DuplicateIDEncoding() { } + @Override public void decode(final ActiveMQBuffer buffer) { address = buffer.readSimpleString(); @@ -2860,6 +2979,7 @@ public class JournalStorageManager implements StorageManager { buffer.readBytes(duplID); } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeSimpleString(address); @@ -2868,6 +2988,7 @@ public class JournalStorageManager implements StorageManager { buffer.writeBytes(duplID); } + @Override public int getEncodeSize() { return SimpleString.sizeofString(address) + DataConstants.SIZE_INT + duplID.length; } @@ -3011,14 +3132,17 @@ public class JournalStorageManager implements StorageManager { this.id = id; } + @Override public long getID() { return id; } + @Override public long getQueueID() { return queueID; } + @Override public long getPageID() { return pageID; } @@ -3062,15 +3186,18 @@ public class JournalStorageManager implements StorageManager { int value; + @Override public int getEncodeSize() { return DataConstants.SIZE_LONG + DataConstants.SIZE_INT; } + @Override public void encode(ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeInt(value); } + @Override public void decode(ActiveMQBuffer buffer) { queueID = buffer.readLong(); value = buffer.readInt(); @@ -3098,16 +3225,19 @@ public class JournalStorageManager implements StorageManager { public PagePosition position; + @Override public int getEncodeSize() { return DataConstants.SIZE_LONG + DataConstants.SIZE_LONG + DataConstants.SIZE_INT; } + @Override public void encode(ActiveMQBuffer buffer) { buffer.writeLong(queueID); buffer.writeLong(position.getPageNr()); buffer.writeInt(position.getMessageNr()); } + @Override public void decode(ActiveMQBuffer buffer) { queueID = buffer.readLong(); long pageNR = buffer.readLong(); @@ -3125,6 +3255,7 @@ public class JournalStorageManager implements StorageManager { this.messages = messages; } + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java index 719694d2a3..906cbd3ba9 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/LargeServerMessageImpl.java @@ -89,14 +89,17 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L /** * @param pendingRecordID */ + @Override public void setPendingRecordID(long pendingRecordID) { this.pendingRecordID = pendingRecordID; } + @Override public long getPendingRecordID() { return this.pendingRecordID; } + @Override public void setPaged() { paged = true; } @@ -150,6 +153,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L super.decodeHeadersAndProperties(buffer1); } + @Override public synchronized void incrementDelayDeletionCount() { delayDeletionCount.incrementAndGet(); try { @@ -160,6 +164,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } } + @Override public synchronized void decrementDelayDeletionCount() throws Exception { int count = delayDeletionCount.decrementAndGet(); @@ -233,6 +238,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L return memoryEstimate; } + @Override public synchronized void releaseResources() { if (file != null && file.isOpen()) { try { @@ -310,6 +316,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } } + @Override public SequentialFile getFile() throws ActiveMQException { validateFile(); return file; @@ -382,6 +389,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L private SequentialFile cFile; + @Override public void open() throws ActiveMQException { try { if (cFile != null && cFile.isOpen()) { @@ -395,6 +403,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } } + @Override public void close() throws ActiveMQException { try { if (cFile != null) { @@ -406,6 +415,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } } + @Override public int encode(final ByteBuffer bufferRead) throws ActiveMQException { try { return cFile.read(bufferRead); @@ -415,6 +425,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L } } + @Override public int encode(final ActiveMQBuffer bufferOut, final int size) throws ActiveMQException { // This could maybe be optimized (maybe reading directly into bufferOut) ByteBuffer bufferRead = ByteBuffer.allocate(size); @@ -433,6 +444,7 @@ public final class LargeServerMessageImpl extends ServerMessageImpl implements L /* (non-Javadoc) * @see org.apache.activemq.artemis.core.message.BodyEncoder#getLargeBodySize() */ + @Override public long getLargeBodySize() { if (bodySize < 0) { try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java index fc49adadb9..caa71b8843 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/OperationContextImpl.java @@ -98,28 +98,34 @@ public class OperationContextImpl implements OperationContext { this.executor = executor; } + @Override public void pageSyncLineUp() { pageLineUp.incrementAndGet(); } + @Override public synchronized void pageSyncDone() { paged++; checkTasks(); } + @Override public void storeLineUp() { storeLineUp.incrementAndGet(); } + @Override public void replicationLineUp() { replicationLineUp.incrementAndGet(); } + @Override public synchronized void replicationDone() { replicated++; checkTasks(); } + @Override public void executeOnCompletion(final IOCallback completion) { if (errorCode != -1) { completion.onError(errorCode, errorMessage); @@ -163,6 +169,7 @@ public class OperationContextImpl implements OperationContext { } + @Override public synchronized void done() { stored++; checkTasks(); @@ -194,6 +201,7 @@ public class OperationContextImpl implements OperationContext { executorsPending.incrementAndGet(); try { executor.execute(new Runnable() { + @Override public void run() { try { // If any IO is done inside the callback, it needs to be done on a new context diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java index 3eb14da561..365954ca44 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java @@ -76,6 +76,7 @@ class NullStorageLargeServerMessage extends ServerMessageImpl implements LargeSe return "NullStorageLargeServerMessage[messageID=" + messageID + ", durable=" + durable + ", address=" + getAddress() + ",properties=" + properties.toString() + "]"; } + @Override public ServerMessage copy() { // This is a simple copy, used only to avoid changing original properties return new NullStorageLargeServerMessage(this); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java index 289cb77783..381222f7b8 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/nullpm/NullStorageManager.java @@ -396,9 +396,11 @@ public class NullStorageManager implements StorageManager { public void deleteCursorAcknowledge(long ackID) throws Exception { } + @Override public void storePageCompleteTransactional(long txID, long queueID, PagePosition position) throws Exception { } + @Override public void deletePageComplete(long ackID) throws Exception { } @@ -424,6 +426,7 @@ public class NullStorageManager implements StorageManager { public void deletePageCounter(final long txID, final long recordID) throws Exception { } + @Override public void deletePendingPageCounter(long txID, long recordID) throws Exception { } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java index bfa8527b49..357decd552 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/AddressImpl.java @@ -41,32 +41,39 @@ public class AddressImpl implements Address { containsWildCard = address.contains(WildcardAddressManager.SINGLE_WORD) || address.contains(WildcardAddressManager.ANY_WORDS); } + @Override public SimpleString getAddress() { return address; } + @Override public SimpleString[] getAddressParts() { return addressParts; } + @Override public boolean containsWildCard() { return containsWildCard; } + @Override public List
getLinkedAddresses() { return linkedAddresses; } + @Override public void addLinkedAddress(final Address address) { if (!linkedAddresses.contains(address)) { linkedAddresses.add(address); } } + @Override public void removeLinkedAddress(final Address actualAddress) { linkedAddresses.remove(actualAddress); } + @Override public boolean matches(final Address add) { if (containsWildCard == add.containsWildCard()) { return address.equals(add.getAddress()); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java index 4719971f12..995e0417ea 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java @@ -73,20 +73,24 @@ public final class BindingsImpl implements Bindings { this.name = name; } + @Override public void setMessageLoadBalancingType(final MessageLoadBalancingType messageLoadBalancingType) { this.messageLoadBalancingType = messageLoadBalancingType; } + @Override public Collection getBindings() { return bindingsMap.values(); } + @Override public void unproposed(SimpleString groupID) { for (Binding binding : bindingsMap.values()) { binding.unproposed(groupID); } } + @Override public void addBinding(final Binding binding) { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("addBinding(" + binding + ") being called"); @@ -122,6 +126,7 @@ public final class BindingsImpl implements Bindings { } + @Override public void removeBinding(final Binding binding) { if (binding.isExclusive()) { exclusiveBindings.remove(binding); @@ -147,6 +152,7 @@ public final class BindingsImpl implements Bindings { } } + @Override public boolean redistribute(final ServerMessage message, final Queue originatingQueue, final RoutingContext context) throws Exception { @@ -227,6 +233,7 @@ public final class BindingsImpl implements Bindings { } } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { route(message, context, true); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DivertBinding.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DivertBinding.java index 303b0fe028..04f432dbf6 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DivertBinding.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DivertBinding.java @@ -57,50 +57,62 @@ public class DivertBinding implements Binding { exclusive = divert.isExclusive(); } + @Override public long getID() { return id; } + @Override public Filter getFilter() { return filter; } + @Override public SimpleString getAddress() { return address; } + @Override public Bindable getBindable() { return divert; } + @Override public SimpleString getRoutingName() { return routingName; } + @Override public SimpleString getUniqueName() { return uniqueName; } + @Override public SimpleString getClusterName() { return uniqueName; } + @Override public boolean isExclusive() { return exclusive; } + @Override public boolean isHighAcceptPriority(final ServerMessage message) { return true; } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { divert.route(message, context); } + @Override public int getDistance() { return 0; } + @Override public BindingType getType() { return BindingType.DIVERT; } @@ -142,6 +154,7 @@ public class DivertBinding implements Binding { //noop } + @Override public void close() throws Exception { } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DuplicateIDCacheImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DuplicateIDCacheImpl.java index d75dad6257..9d97deeeda 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DuplicateIDCacheImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/DuplicateIDCacheImpl.java @@ -69,6 +69,7 @@ public class DuplicateIDCacheImpl implements DuplicateIDCache { this.persist = persist; } + @Override public void load(final List> theIds) throws Exception { int count = 0; @@ -108,6 +109,7 @@ public class DuplicateIDCacheImpl implements DuplicateIDCache { } + @Override public void deleteFromCache(byte[] duplicateID) throws Exception { ByteArrayHolder bah = new ByteArrayHolder(duplicateID); @@ -129,10 +131,12 @@ public class DuplicateIDCacheImpl implements DuplicateIDCache { } + @Override public boolean contains(final byte[] duplID) { return cache.get(new ByteArrayHolder(duplID)) != null; } + @Override public synchronized void addToCache(final byte[] duplID, final Transaction tx) throws Exception { long recordID = -1; @@ -158,6 +162,7 @@ public class DuplicateIDCacheImpl implements DuplicateIDCache { } } + @Override public void load(final Transaction tx, final byte[] duplID) { tx.addOperation(new AddDuplicateIDOperation(duplID, tx.getID())); } @@ -212,6 +217,7 @@ public class DuplicateIDCacheImpl implements DuplicateIDCache { } } + @Override public void clear() throws Exception { synchronized (this) { if (ids.size() > 0) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/LocalQueueBinding.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/LocalQueueBinding.java index cffd0c3a6e..2a6d9c50be 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/LocalQueueBinding.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/LocalQueueBinding.java @@ -49,46 +49,57 @@ public class LocalQueueBinding implements QueueBinding { clusterName = name.concat(nodeID); } + @Override public long getID() { return queue.getID(); } + @Override public Filter getFilter() { return filter; } + @Override public SimpleString getAddress() { return address; } + @Override public Bindable getBindable() { return queue; } + @Override public Queue getQueue() { return queue; } + @Override public SimpleString getRoutingName() { return name; } + @Override public SimpleString getUniqueName() { return name; } + @Override public SimpleString getClusterName() { return clusterName; } + @Override public boolean isExclusive() { return false; } + @Override public int getDistance() { return 0; } + @Override public boolean isHighAcceptPriority(final ServerMessage message) { // It's a high accept priority if the queue has at least one matching consumer @@ -100,10 +111,12 @@ public class LocalQueueBinding implements QueueBinding { queue.unproposed(groupID); } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { queue.route(message, context); } + @Override public void routeWithAck(ServerMessage message, RoutingContext context) throws Exception { queue.routeWithAck(message, context); } @@ -112,14 +125,17 @@ public class LocalQueueBinding implements QueueBinding { return true; } + @Override public int consumerCount() { return queue.getConsumerCount(); } + @Override public BindingType getType() { return BindingType.LOCAL_QUEUE; } + @Override public void close() throws Exception { queue.close(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java index 8b2120d431..6fcca35a84 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java @@ -171,6 +171,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding // ActiveMQComponent implementation --------------------------------------- + @Override public synchronized void start() throws Exception { if (started) return; @@ -186,6 +187,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding started = true; } + @Override public synchronized void stop() throws Exception { started = false; @@ -205,12 +207,14 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding queueInfos.clear(); } + @Override public boolean isStarted() { return started; } // NotificationListener implementation ------------------------------------- + @Override public void onNotification(final Notification notification) { if (!(notification.getType() instanceof CoreNotificationType)) return; @@ -425,6 +429,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding // Otherwise can have situation where createQueue comes in before failover, then failover occurs // and post office is activated but queue remains unactivated after failover so delivery never occurs // even though failover is complete + @Override public synchronized void addBinding(final Binding binding) throws Exception { addressManager.addBinding(binding); @@ -457,6 +462,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding managementService.sendNotification(new Notification(uid, CoreNotificationType.BINDING_ADDED, props)); } + @Override public synchronized Binding removeBinding(final SimpleString uniqueName, Transaction tx) throws Exception { addressSettingsRepository.clearCache(); @@ -530,6 +536,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding return bindings != null && !bindings.getBindings().isEmpty(); } + @Override public Bindings getBindingsForAddress(final SimpleString address) throws Exception { Bindings bindings = addressManager.getBindingsForRoutingAddress(address); @@ -540,26 +547,32 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding return bindings; } + @Override public Bindings lookupBindingsForAddress(final SimpleString address) throws Exception { return addressManager.getBindingsForRoutingAddress(address); } + @Override public Binding getBinding(final SimpleString name) { return addressManager.getBinding(name); } + @Override public Bindings getMatchingBindings(final SimpleString address) throws Exception { return addressManager.getMatchingBindings(address); } + @Override public Map getAllBindings() { return addressManager.getBindings(); } + @Override public void route(final ServerMessage message, QueueCreator queueCreator, final boolean direct) throws Exception { route(message, queueCreator, (Transaction) null, direct); } + @Override public void route(final ServerMessage message, QueueCreator queueCreator, final Transaction tx, @@ -567,6 +580,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding route(message, queueCreator, new RoutingContextImpl(tx), direct); } + @Override public void route(final ServerMessage message, final QueueCreator queueCreator, final Transaction tx, @@ -575,6 +589,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding route(message, queueCreator, new RoutingContextImpl(tx), direct, rejectDuplicates); } + @Override public void route(final ServerMessage message, final QueueCreator queueCreator, final RoutingContext context, @@ -582,6 +597,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding route(message, queueCreator, context, direct, true); } + @Override public void route(final ServerMessage message, final QueueCreator queueCreator, final RoutingContext context, @@ -706,6 +722,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } } + @Override public MessageReference reroute(final ServerMessage message, final Queue queue, final Transaction tx) throws Exception { @@ -739,6 +756,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding /** * The redistribution can't process the route right away as we may be dealing with a large message which will need to be processed on a different thread */ + @Override public Pair redistribute(final ServerMessage message, final Queue originatingQueue, final Transaction tx) throws Exception { @@ -762,6 +780,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding return null; } + @Override public DuplicateIDCache getDuplicateIDCache(final SimpleString address) { DuplicateIDCache cache = duplicateIDCaches.get(address); @@ -782,14 +801,17 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding return duplicateIDCaches; } + @Override public Object getNotificationLock() { return notificationLock; } + @Override public Set getAddresses() { return addressManager.getAddresses(); } + @Override public void sendQueueInfoToQueue(final SimpleString queueName, final SimpleString address) throws Exception { // We send direct to the queue so we can send it to the same queue that is bound to the notifications address - // this is crucial for ensuring @@ -946,6 +968,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } + @Override public void processRoute(final ServerMessage message, final RoutingContext context, final boolean direct) throws Exception { @@ -1047,10 +1070,12 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding // This will use the same thread if there are no pending operations // avoiding a context switch on this case storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.ioErrorAddingReferences(errorCode, errorMessage); } + @Override public void done() { addReferences(refs, direct); } @@ -1106,9 +1131,11 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { for (Queue queue : queues) { // in case of paging, we need to kick asynchronous delivery to try delivering @@ -1211,6 +1238,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding /** * The expiry scanner can't be started until the whole server has been started other wise you may get races */ + @Override public synchronized void startExpiryScanner() { if (reaperPeriod > 0) { if (reaperRunnable != null) @@ -1247,6 +1275,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding latch.countDown(); } + @Override public void run() { // The reaper thread should be finished case the PostOffice is gone // This is to avoid leaks on PostOffice between stops and starts @@ -1293,6 +1322,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding this.refs = refs; } + @Override public void afterCommit(final Transaction tx) { for (MessageReference ref : refs) { if (!ref.isAlreadyAcked()) { @@ -1301,6 +1331,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } } + @Override public void afterPrepare(final Transaction tx) { for (MessageReference ref : refs) { if (ref.isAlreadyAcked()) { @@ -1310,15 +1341,19 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } } + @Override public void afterRollback(final Transaction tx) { } + @Override public void beforeCommit(final Transaction tx) throws Exception { } + @Override public void beforePrepare(final Transaction tx) throws Exception { } + @Override public void beforeRollback(final Transaction tx) throws Exception { // Reverse the ref counts, and paging sizes @@ -1333,6 +1368,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } } + @Override public List getRelatedMessageReferences() { return refs; } @@ -1343,6 +1379,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding } } + @Override public Bindings createBindings(final SimpleString address) throws Exception { GroupingHandler groupingHandler = server.getGroupingHandler(); BindingsImpl bindings = new BindingsImpl(address, groupingHandler, pagingManager.getPageStore(address)); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java index c40182534e..77c36f0ff8 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java @@ -57,6 +57,7 @@ public class SimpleAddressManager implements AddressManager { this.bindingsFactory = bindingsFactory; } + @Override public boolean addBinding(final Binding binding) throws Exception { if (nameMap.putIfAbsent(binding.getUniqueName(), binding) != null || pendingDeletes.contains(binding.getUniqueName())) { throw ActiveMQMessageBundle.BUNDLE.bindingAlreadyExists(binding); @@ -69,6 +70,7 @@ public class SimpleAddressManager implements AddressManager { return addMappingInternal(binding.getAddress(), binding); } + @Override public Binding removeBinding(final SimpleString uniqueName, Transaction tx) throws Exception { final Binding binding = nameMap.remove(uniqueName); @@ -99,18 +101,22 @@ public class SimpleAddressManager implements AddressManager { return binding; } + @Override public Bindings getBindingsForRoutingAddress(final SimpleString address) throws Exception { return mappings.get(address); } + @Override public Binding getBinding(final SimpleString bindableName) { return nameMap.get(bindableName); } + @Override public Map getBindings() { return nameMap; } + @Override public Bindings getMatchingBindings(final SimpleString address) throws Exception { Address add = new AddressImpl(address); @@ -127,6 +133,7 @@ public class SimpleAddressManager implements AddressManager { return bindings; } + @Override public void clear() { nameMap.clear(); mappings.clear(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java index 904a8bce4f..c8d783805a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java @@ -185,6 +185,7 @@ public class ServerSessionPacketHandler implements ChannelHandler { return channel; } + @Override public void handlePacket(final Packet packet) { byte type = packet.getType(); @@ -533,6 +534,7 @@ public class ServerSessionPacketHandler implements ChannelHandler { } storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.errorProcessingIOCallback(errorCode, errorMessage); @@ -546,6 +548,7 @@ public class ServerSessionPacketHandler implements ChannelHandler { } + @Override public void done() { doConfirmAndResponse(confirmPacket, response, flush, closeChannel); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQPacketHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQPacketHandler.java index 665ea66064..b60804eb6f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQPacketHandler.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQPacketHandler.java @@ -66,6 +66,7 @@ public class ActiveMQPacketHandler implements ChannelHandler { this.connection = connection; } + @Override public void handlePacket(final Packet packet) { byte type = packet.getType(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java index 6295ed6a6c..270f7dcdc3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManager.java @@ -113,6 +113,7 @@ public class CoreProtocolManager implements ProtocolManager { return null; } + @Override public ConnectionEntry createConnectionEntry(final Acceptor acceptorUsed, final Connection connection) { final Configuration config = server.getConfiguration(); @@ -153,10 +154,12 @@ public class CoreProtocolManager implements ProtocolManager { sessionHandlers.put(name, handler); } + @Override public void removeHandler(final String name) { sessionHandlers.remove(name); } + @Override public void handleBuffer(RemotingConnection connection, ActiveMQBuffer buffer) { } @@ -213,6 +216,7 @@ public class CoreProtocolManager implements ProtocolManager { this.rc = rc; } + @Override public void handlePacket(final Packet packet) { if (packet.getType() == PacketImpl.PING) { Ping ping = (Ping) packet; @@ -243,6 +247,7 @@ public class CoreProtocolManager implements ProtocolManager { // may come from a channel itself // What could cause deadlocks entry.connectionExecutor.execute(new Runnable() { + @Override public void run() { if (channel0.supports(PacketImpl.CLUSTER_TOPOLOGY_V3)) { channel0.send(new ClusterTopologyChangeMessage_V3(topologyMember.getUniqueEventID(), nodeID, topologyMember.getBackupGroupName(), topologyMember.getScaleDownGroupName(), connectorPair, last)); @@ -270,6 +275,7 @@ public class CoreProtocolManager implements ProtocolManager { // What could cause deadlocks try { entry.connectionExecutor.execute(new Runnable() { + @Override public void run() { if (channel0.supports(PacketImpl.CLUSTER_TOPOLOGY_V2)) { channel0.send(new ClusterTopologyChangeMessage_V2(uniqueEventID, nodeID)); @@ -296,6 +302,7 @@ public class CoreProtocolManager implements ProtocolManager { acceptorUsed.getClusterConnection().addClusterTopologyListener(listener); rc.addCloseListener(new CloseListener() { + @Override public void connectionClosed() { acceptorUsed.getClusterConnection().removeClusterTopologyListener(listener); } @@ -305,6 +312,7 @@ public class CoreProtocolManager implements ProtocolManager { // if not clustered, we send a single notification to the client containing the node-id where the server is connected to // This is done this way so Recovery discovery could also use the node-id for non-clustered setups entry.connectionExecutor.execute(new Runnable() { + @Override public void run() { String nodeId = server.getNodeID().toString(); Pair emptyConfig = new Pair(null, null); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java index bc656f4dd2..2a07606472 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreProtocolManagerFactory.java @@ -39,6 +39,7 @@ public class CoreProtocolManagerFactory extends AbstractProtocolManagerFactory incomingInterceptors, List outgoingInterceptors) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreSessionCallback.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreSessionCallback.java index ac41fc0588..2fe808f19c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreSessionCallback.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/CoreSessionCallback.java @@ -46,6 +46,7 @@ public final class CoreSessionCallback implements SessionCallback { this.channel = channel; } + @Override public int sendLargeMessage(ServerMessage message, ServerConsumer consumer, long bodySize, int deliveryCount) { Packet packet = new SessionReceiveLargeMessage(consumer.getID(), message, bodySize, deliveryCount); @@ -56,6 +57,7 @@ public final class CoreSessionCallback implements SessionCallback { return size; } + @Override public int sendLargeMessageContinuation(ServerConsumer consumer, byte[] body, boolean continues, @@ -67,6 +69,7 @@ public final class CoreSessionCallback implements SessionCallback { return packet.getPacketSize(); } + @Override public int sendMessage(ServerMessage message, ServerConsumer consumer, int deliveryCount) { Packet packet = new SessionReceiveMessage(consumer.getID(), message, deliveryCount); @@ -79,6 +82,7 @@ public final class CoreSessionCallback implements SessionCallback { return size; } + @Override public void sendProducerCreditsMessage(int credits, SimpleString address) { Packet packet = new SessionProducerCreditsMessage(credits, address); @@ -92,14 +96,17 @@ public final class CoreSessionCallback implements SessionCallback { channel.send(packet); } + @Override public void closed() { protocolManager.removeHandler(name); } + @Override public void addReadyListener(final ReadyListener listener) { channel.getConnection().getTransportConnection().addReadyListener(listener); } + @Override public void removeReadyListener(final ReadyListener listener) { channel.getConnection().getTransportConnection().removeReadyListener(listener); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/JndiBindingRegistry.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/JndiBindingRegistry.java index f81c4bd879..d22fda852c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/JndiBindingRegistry.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/JndiBindingRegistry.java @@ -35,6 +35,7 @@ public class JndiBindingRegistry implements BindingRegistry { this.context = new InitialContext(); } + @Override public Object lookup(String name) { try { if (context == null) { @@ -49,6 +50,7 @@ public class JndiBindingRegistry implements BindingRegistry { } } + @Override public boolean bind(String name, Object obj) { try { return bindToJndi(name, obj); @@ -58,6 +60,7 @@ public class JndiBindingRegistry implements BindingRegistry { } } + @Override public void unbind(String name) { try { if (context != null) { @@ -68,6 +71,7 @@ public class JndiBindingRegistry implements BindingRegistry { } } + @Override public void close() { try { if (context != null) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/MapBindingRegistry.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/MapBindingRegistry.java index d06d267e87..2d1be92607 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/MapBindingRegistry.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/registry/MapBindingRegistry.java @@ -25,18 +25,22 @@ public class MapBindingRegistry implements BindingRegistry { protected ConcurrentMap registry = new ConcurrentHashMap(); + @Override public Object lookup(String name) { return registry.get(name); } + @Override public boolean bind(String name, Object obj) { return registry.putIfAbsent(name, obj) == null; } + @Override public void unbind(String name) { registry.remove(name); } + @Override public void close() { } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java index f6a00becc4..3c0818c429 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptor.java @@ -92,14 +92,17 @@ public final class InVMAcceptor implements Acceptor { connectionsAllowed = ConfigurationHelper.getLongProperty(TransportConstants.CONNECTIONS_ALLOWED, TransportConstants.DEFAULT_CONNECTIONS_ALLOWED, configuration); } + @Override public String getName() { return name; } + @Override public Map getConfiguration() { return configuration; } + @Override public ClusterConnection getClusterConnection() { return clusterConnection; } @@ -112,6 +115,7 @@ public final class InVMAcceptor implements Acceptor { return connections.size(); } + @Override public synchronized void start() throws Exception { if (started) { return; @@ -132,6 +136,7 @@ public final class InVMAcceptor implements Acceptor { paused = false; } + @Override public synchronized void stop() { if (!started) { return; @@ -166,6 +171,7 @@ public final class InVMAcceptor implements Acceptor { paused = false; } + @Override public synchronized boolean isStarted() { return started; } @@ -173,6 +179,7 @@ public final class InVMAcceptor implements Acceptor { /* * Stop accepting new connections */ + @Override public synchronized void pause() { if (!started || paused) { return; @@ -183,6 +190,7 @@ public final class InVMAcceptor implements Acceptor { paused = true; } + @Override public synchronized void setNotificationService(final NotificationService notificationService) { this.notificationService = notificationService; } @@ -231,10 +239,12 @@ public final class InVMAcceptor implements Acceptor { * * @return true */ + @Override public boolean isUnsecurable() { return true; } + @Override public void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal) { this.defaultActiveMQPrincipal = defaultActiveMQPrincipal; } @@ -248,6 +258,7 @@ public final class InVMAcceptor implements Acceptor { this.connector = connector; } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { @@ -258,6 +269,7 @@ public final class InVMAcceptor implements Acceptor { listener.connectionCreated(component, connection, protocol); } + @Override public void connectionDestroyed(final Object connectionID) { InVMConnection connection = (InVMConnection) connections.remove(connectionID); @@ -267,6 +279,7 @@ public final class InVMAcceptor implements Acceptor { // Execute on different thread after all the packets are sent, to avoid deadlocks connection.getExecutor().execute(new Runnable() { + @Override public void run() { // Remove on the other side too connector.disconnect((String) connectionID); @@ -275,10 +288,12 @@ public final class InVMAcceptor implements Acceptor { } } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { listener.connectionException(connectionID, me); } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java index 49de7e9618..e28ee3a3eb 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMAcceptorFactory.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener public class InVMAcceptorFactory implements AcceptorFactory { + @Override public Acceptor createAcceptor(final String name, final ClusterConnection clusterConnection, final Map configuration, diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java index 59c319aca4..f498af09a7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnection.java @@ -96,18 +96,22 @@ public class InVMConnection implements Connection { this.defaultActiveMQPrincipal = defaultActiveMQPrincipal; } + @Override public void forceClose() { // no op } + @Override public RemotingConnection getProtocolConnection() { return this.protocolConnection; } + @Override public void setProtocolConnection(RemotingConnection connection) { this.protocolConnection = connection; } + @Override public void close() { if (closing) { return; @@ -124,25 +128,31 @@ public class InVMConnection implements Connection { } } + @Override public ActiveMQBuffer createTransportBuffer(final int size) { return ActiveMQBuffers.dynamicBuffer(size); } + @Override public Object getID() { return id; } + @Override public void checkFlushBatchBuffer() { } + @Override public void write(final ActiveMQBuffer buffer) { write(buffer, false, false, null); } + @Override public void write(final ActiveMQBuffer buffer, final boolean flush, final boolean batch) { write(buffer, flush, batch, null); } + @Override public void write(final ActiveMQBuffer buffer, final boolean flush, final boolean batch, @@ -153,6 +163,7 @@ public class InVMConnection implements Connection { try { executor.execute(new Runnable() { + @Override public void run() { try { if (!closed) { @@ -183,6 +194,7 @@ public class InVMConnection implements Connection { if (flush && flushEnabled) { final CountDownLatch latch = new CountDownLatch(1); executor.execute(new Runnable() { + @Override public void run() { latch.countDown(); } @@ -204,10 +216,12 @@ public class InVMConnection implements Connection { } + @Override public String getRemoteAddress() { return "invm:" + serverID; } + @Override public String getLocalAddress() { return "invm:" + serverID; } @@ -216,9 +230,11 @@ public class InVMConnection implements Connection { return -1; } + @Override public void addReadyListener(ReadyListener listener) { } + @Override public void removeReadyListener(ReadyListener listener) { } @@ -227,6 +243,7 @@ public class InVMConnection implements Connection { return false; } + @Override public ActiveMQPrincipal getDefaultActiveMQPrincipal() { return defaultActiveMQPrincipal; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java index a6b819adcb..96f6667cf7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java @@ -112,6 +112,7 @@ public class InVMConnector extends AbstractConnector { return acceptor; } + @Override public synchronized void close() { if (!started) { return; @@ -124,10 +125,12 @@ public class InVMConnector extends AbstractConnector { started = false; } + @Override public boolean isStarted() { return started; } + @Override public Connection createConnection() { if (InVMConnector.failOnCreateConnection) { InVMConnector.incFailures(); @@ -155,6 +158,7 @@ public class InVMConnector extends AbstractConnector { } } + @Override public synchronized void start() { started = true; } @@ -185,6 +189,7 @@ public class InVMConnector extends AbstractConnector { return inVMConnection; } + @Override public boolean isEquivalent(Map configuration) { int serverId = ConfigurationHelper.getIntProperty(TransportConstants.SERVER_ID_PROP_NAME, 0, configuration); return id == serverId; @@ -192,6 +197,7 @@ public class InVMConnector extends AbstractConnector { private class Listener implements ConnectionLifeCycleListener { + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { @@ -202,6 +208,7 @@ public class InVMConnector extends AbstractConnector { listener.connectionCreated(component, connection, protocol); } + @Override public void connectionDestroyed(final Object connectionID) { if (connections.remove(connectionID) != null) { // Close the corresponding connection on the other side @@ -209,6 +216,7 @@ public class InVMConnector extends AbstractConnector { // Execute on different thread to avoid deadlocks closeExecutor.execute(new Runnable() { + @Override public void run() { listener.connectionDestroyed(connectionID); } @@ -216,15 +224,18 @@ public class InVMConnector extends AbstractConnector { } } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { // Execute on different thread to avoid deadlocks closeExecutor.execute(new Runnable() { + @Override public void run() { listener.connectionException(connectionID, me); } }); } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java index c22e2a6062..77ca86b353 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnectorFactory.java @@ -28,6 +28,7 @@ import org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory; public class InVMConnectorFactory implements ConnectorFactory { + @Override public Connector createConnector(final Map configuration, final BufferHandler handler, final ConnectionLifeCycleListener listener, diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java index 6e41505318..bc5df25859 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java @@ -135,6 +135,7 @@ public class HttpAcceptorHandler extends ChannelDuplexHandler { promise = channel.newPromise(); } + @Override public void run() { ResponseHolder responseHolder = null; do { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpKeepAliveRunnable.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpKeepAliveRunnable.java index 712aa0e519..651e395313 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpKeepAliveRunnable.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpKeepAliveRunnable.java @@ -31,6 +31,7 @@ public class HttpKeepAliveRunnable implements Runnable { private Future future; + @Override public synchronized void run() { if (closed) { return; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java index 9905ca1dbe..94cd7aa610 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java @@ -244,6 +244,7 @@ public class NettyAcceptor implements Acceptor { connectionsAllowed = ConfigurationHelper.getLongProperty(TransportConstants.CONNECTIONS_ALLOWED, TransportConstants.DEFAULT_CONNECTIONS_ALLOWED, configuration); } + @Override public synchronized void start() throws Exception { if (channelClazz != null) { // Already started @@ -411,6 +412,7 @@ public class NettyAcceptor implements Acceptor { } } + @Override public String getName() { return name; } @@ -440,10 +442,12 @@ public class NettyAcceptor implements Acceptor { } } + @Override public Map getConfiguration() { return this.configuration; } + @Override public synchronized void stop() { if (channelClazz == null) { return; @@ -514,10 +518,12 @@ public class NettyAcceptor implements Acceptor { paused = false; } + @Override public boolean isStarted() { return channelClazz != null; } + @Override public synchronized void pause() { if (paused) { return; @@ -544,6 +550,7 @@ public class NettyAcceptor implements Acceptor { paused = true; } + @Override public void setNotificationService(final NotificationService notificationService) { this.notificationService = notificationService; } @@ -553,6 +560,7 @@ public class NettyAcceptor implements Acceptor { * * @param defaultActiveMQPrincipal */ + @Override public void setDefaultActiveMQPrincipal(ActiveMQPrincipal defaultActiveMQPrincipal) { throw new IllegalStateException("unsecure connections not allowed"); } @@ -562,6 +570,7 @@ public class NettyAcceptor implements Acceptor { * * @return */ + @Override public boolean isUnsecurable() { return false; } @@ -599,6 +608,7 @@ public class NettyAcceptor implements Acceptor { super(group, handler, listener); } + @Override public NettyServerConnection createConnection(final ChannelHandlerContext ctx, String protocol, boolean httpEnabled) throws Exception { @@ -613,6 +623,7 @@ public class NettyAcceptor implements Acceptor { SslHandler sslHandler = ctx.pipeline().get(SslHandler.class); if (sslHandler != null) { sslHandler.handshakeFuture().addListener(new GenericFutureListener>() { + @Override public void operationComplete(final io.netty.util.concurrent.Future future) throws Exception { if (future.isSuccess()) { active = true; @@ -639,6 +650,7 @@ public class NettyAcceptor implements Acceptor { private class Listener implements ConnectionLifeCycleListener { + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { @@ -649,12 +661,14 @@ public class NettyAcceptor implements Acceptor { listener.connectionCreated(component, connection, protocol); } + @Override public void connectionDestroyed(final Object connectionID) { if (connections.remove(connectionID) != null) { listener.connectionDestroyed(connectionID); } } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { // Execute on different thread to avoid deadlocks new Thread() { @@ -666,6 +680,7 @@ public class NettyAcceptor implements Acceptor { } + @Override public void connectionReadyForWrites(final Object connectionID, boolean ready) { NettyServerConnection conn = connections.get(connectionID); @@ -679,6 +694,7 @@ public class NettyAcceptor implements Acceptor { private boolean cancelled; + @Override public synchronized void run() { if (!cancelled) { for (Connection connection : connections.values()) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java index 92b79f858a..880522f764 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptorFactory.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.spi.core.remoting.ConnectionLifeCycleListener public class NettyAcceptorFactory implements AcceptorFactory { + @Override public Acceptor createAcceptor(final String name, final ClusterConnection connection, final Map configuration, diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java index b2bca01c1d..30f6ac4009 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java @@ -183,6 +183,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle outgoingInterceptors.addAll(serviceRegistry.getOutgoingInterceptors(configuration.getOutgoingInterceptorClassNames())); } + @Override public synchronized void start() throws Exception { if (started) { return; @@ -278,6 +279,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle started = true; } + @Override public synchronized void startAcceptors() throws Exception { if (isStarted()) { for (Acceptor a : acceptors.values()) { @@ -286,6 +288,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public synchronized void allowInvmSecurityOverride(ActiveMQPrincipal principal) { defaultInvmSecurityPrincipal = principal; for (Acceptor acceptor : acceptors.values()) { @@ -295,6 +298,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public synchronized void pauseAcceptors() { if (!started) return; @@ -309,6 +313,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public synchronized void freeze(final String scaleDownNodeID, final CoreRemotingConnection connectionToKeepOpen) { if (!started) return; @@ -334,6 +339,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public void stop(final boolean criticalError) throws Exception { if (!started) { return; @@ -410,6 +416,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle return acceptors.get(name); } + @Override public boolean isStarted() { return started; } @@ -427,6 +434,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public RemotingConnection removeConnection(final Object remotingConnectionID) { ConnectionEntry entry = connections.remove(remotingConnectionID); @@ -442,6 +450,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public synchronized Set getConnections() { Set conns = new HashSet(connections.size()); @@ -452,6 +461,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle return conns; } + @Override public synchronized ReusableLatch getConnectionCountLatch() { return connectionCountLatch; } @@ -462,6 +472,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle return protocolMap.get(protocol); } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { @@ -485,6 +496,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle connectionCountLatch.countUp(); } + @Override public void connectionDestroyed(final Object connectionID) { if (isTrace) { @@ -519,6 +531,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle } } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { // We DO NOT call fail on connection exception, otherwise in event of real connection failure, the // connection will be failed, the session will be closed and won't be able to reconnect @@ -530,6 +543,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle // Connections should only fail when TTL is exceeded } + @Override public void connectionReadyForWrites(final Object connectionID, final boolean ready) { } @@ -598,6 +612,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle private final class DelegatingBufferHandler implements BufferHandler { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { ConnectionEntry conn = connections.get(connectionID); @@ -668,6 +683,7 @@ public class RemotingServiceImpl implements RemotingService, ConnectionLifeCycle if (flush) { flushExecutor.execute(new Runnable() { + @Override public void run() { try { // this is using a different thread diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicatedJournal.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicatedJournal.java index ab33e19238..036be12518 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicatedJournal.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicatedJournal.java @@ -72,6 +72,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendAddRecord(long, byte, byte[], boolean) */ + @Override public void appendAddRecord(final long id, final byte recordType, final byte[] record, @@ -79,6 +80,7 @@ public class ReplicatedJournal implements Journal { this.appendAddRecord(id, recordType, new ByteArrayEncoding(record), sync); } + @Override public void appendAddRecord(final long id, final byte recordType, final EncodingSupport record, @@ -98,6 +100,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendAddRecord(long, byte, org.apache.activemq.artemis.core.journal.EncodingSupport, boolean) */ + @Override public void appendAddRecord(final long id, final byte recordType, final EncodingSupport record, @@ -118,6 +121,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendAddRecordTransactional(long, long, byte, byte[]) */ + @Override public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, @@ -133,6 +137,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendAddRecordTransactional(long, long, byte, org.apache.activemq.artemis.core.journal.EncodingSupport) */ + @Override public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, @@ -150,6 +155,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendCommitRecord(long, boolean) */ + @Override public void appendCommitRecord(final long txID, final boolean sync) throws Exception { if (ReplicatedJournal.trace) { ReplicatedJournal.trace("AppendCommit " + txID); @@ -158,6 +164,7 @@ public class ReplicatedJournal implements Journal { localJournal.appendCommitRecord(txID, sync); } + @Override public void appendCommitRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception { if (ReplicatedJournal.trace) { ReplicatedJournal.trace("AppendCommit " + txID); @@ -166,6 +173,7 @@ public class ReplicatedJournal implements Journal { localJournal.appendCommitRecord(txID, sync, callback); } + @Override public void appendCommitRecord(long txID, boolean sync, IOCompletion callback, @@ -210,6 +218,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendDeleteRecordTransactional(long, long, byte[]) */ + @Override public void appendDeleteRecordTransactional(final long txID, final long id, final byte[] record) throws Exception { this.appendDeleteRecordTransactional(txID, id, new ByteArrayEncoding(record)); } @@ -221,6 +230,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendDeleteRecordTransactional(long, long, org.apache.activemq.artemis.core.journal.EncodingSupport) */ + @Override public void appendDeleteRecordTransactional(final long txID, final long id, final EncodingSupport record) throws Exception { @@ -237,6 +247,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendDeleteRecordTransactional(long, long) */ + @Override public void appendDeleteRecordTransactional(final long txID, final long id) throws Exception { if (ReplicatedJournal.trace) { ReplicatedJournal.trace("AppendDelete (noencoding) txID=" + txID + " id=" + id); @@ -252,6 +263,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendPrepareRecord(long, byte[], boolean) */ + @Override public void appendPrepareRecord(final long txID, final byte[] transactionData, final boolean sync) throws Exception { this.appendPrepareRecord(txID, new ByteArrayEncoding(transactionData), sync); } @@ -263,6 +275,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendPrepareRecord(long, org.apache.activemq.artemis.core.journal.EncodingSupport, boolean) */ + @Override public void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync) throws Exception { @@ -291,6 +304,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendRollbackRecord(long, boolean) */ + @Override public void appendRollbackRecord(final long txID, final boolean sync) throws Exception { if (ReplicatedJournal.trace) { ReplicatedJournal.trace("AppendRollback " + txID); @@ -299,6 +313,7 @@ public class ReplicatedJournal implements Journal { localJournal.appendRollbackRecord(txID, sync); } + @Override public void appendRollbackRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception { if (ReplicatedJournal.trace) { ReplicatedJournal.trace("AppendRollback " + txID); @@ -315,6 +330,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendUpdateRecord(long, byte, byte[], boolean) */ + @Override public void appendUpdateRecord(final long id, final byte recordType, final byte[] record, @@ -363,6 +379,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendUpdateRecordTransactional(long, long, byte, byte[]) */ + @Override public void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType, @@ -378,6 +395,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#appendUpdateRecordTransactional(long, long, byte, org.apache.activemq.artemis.core.journal.EncodingSupport) */ + @Override public void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType, @@ -396,6 +414,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#load(java.util.List, java.util.List, org.apache.activemq.artemis.core.journal.TransactionFailureCallback) */ + @Override public JournalLoadInformation load(final List committedRecords, final List preparedTransactions, final TransactionFailureCallback transactionFailure) throws Exception { @@ -407,6 +426,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.journal.Journal#load(org.apache.activemq.artemis.core.journal.LoaderCallback) */ + @Override public JournalLoadInformation load(final LoaderCallback reloadManager) throws Exception { return localJournal.load(reloadManager); } @@ -415,6 +435,7 @@ public class ReplicatedJournal implements Journal { * @param pages * @see org.apache.activemq.artemis.core.journal.Journal#perfBlast(int) */ + @Override public void perfBlast(final int pages) { localJournal.perfBlast(pages); } @@ -423,6 +444,7 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.server.ActiveMQComponent#start() */ + @Override public void start() throws Exception { localJournal.start(); } @@ -431,14 +453,17 @@ public class ReplicatedJournal implements Journal { * @throws Exception * @see org.apache.activemq.artemis.core.server.ActiveMQComponent#stop() */ + @Override public void stop() throws Exception { localJournal.stop(); } + @Override public int getAlignment() throws Exception { return localJournal.getAlignment(); } + @Override public boolean isStarted() { return localJournal.isStarted(); } @@ -448,18 +473,22 @@ public class ReplicatedJournal implements Journal { return localJournal.loadInternalOnly(); } + @Override public int getNumberOfRecords() { return localJournal.getNumberOfRecords(); } + @Override public void runDirectJournalBlast() throws Exception { localJournal.runDirectJournalBlast(); } + @Override public int getUserVersion() { return localJournal.getUserVersion(); } + @Override public void lineUpContext(IOCompletion callback) { ((OperationContext) callback).replicationLineUp(); localJournal.lineUpContext(callback); @@ -500,6 +529,7 @@ public class ReplicatedJournal implements Journal { throw new UnsupportedOperationException(); } + @Override public int getFileSize() { return localJournal.getFileSize(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java index c79e572bfd..2caaa8dd7d 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java @@ -239,10 +239,12 @@ public final class ReplicationEndpoint implements ChannelHandler, ActiveMQCompon activation.remoteFailOver(packet.isFinalMessage()); } + @Override public boolean isStarted() { return started; } + @Override public synchronized void start() throws Exception { Configuration config = server.getConfiguration(); try { @@ -272,6 +274,7 @@ public final class ReplicationEndpoint implements ChannelHandler, ActiveMQCompon } } + @Override public synchronized void stop() throws Exception { if (!started) { return; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java index d276474eb1..4759cfa9e1 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationManager.java @@ -255,6 +255,7 @@ public final class ReplicationManager implements ActiveMQComponent { enabled = true; } + @Override public synchronized void stop() throws Exception { if (!started) { return; @@ -390,12 +391,14 @@ public final class ReplicationManager implements ActiveMQComponent { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException me) { } } private final class ResponseHandler implements ChannelHandler { + @Override public void handlePacket(final Packet packet) { if (packet.getType() == PacketImpl.REPLICATION_RESPONSE || packet.getType() == PacketImpl.REPLICATION_RESPONSE_V2) { replicated(); @@ -414,12 +417,15 @@ public final class ReplicationManager implements ActiveMQComponent { static final NullEncoding instance = new NullEncoding(); + @Override public void decode(final ActiveMQBuffer buffer) { } + @Override public void encode(final ActiveMQBuffer buffer) { } + @Override public int getEncodeSize() { return 0; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java index 3a20952884..514ec8dfa3 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/security/impl/SecurityStoreImpl.java @@ -98,10 +98,12 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC return securityEnabled; } + @Override public void stop() { securityRepository.unRegisterListener(this); } + @Override public void authenticate(final String user, final String password, X509Certificate[] certificates) throws Exception { if (securityEnabled) { @@ -145,6 +147,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC } } + @Override public void check(final SimpleString address, final CheckType checkType, final SecurityAuth session) throws Exception { @@ -203,6 +206,7 @@ public class SecurityStoreImpl implements SecurityStore, HierarchicalRepositoryC } } + @Override public void onChange() { invalidateCache(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LargeServerMessage.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LargeServerMessage.java index e6e1ee952e..2a16ed258b 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LargeServerMessage.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/LargeServerMessage.java @@ -22,6 +22,7 @@ import org.apache.activemq.artemis.core.replication.ReplicatedLargeMessage; public interface LargeServerMessage extends ServerMessage, ReplicatedLargeMessage { + @Override void addBytes(byte[] bytes) throws Exception; void setPendingRecordID(long pendingRecordID); @@ -37,8 +38,10 @@ public interface LargeServerMessage extends ServerMessage, ReplicatedLargeMessag /** * Close the files if opened */ + @Override void releaseResources(); + @Override void deleteFile() throws Exception; void incrementDelayDeletionCount(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MemoryManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MemoryManager.java index 7eed4998b2..9b96c9fd34 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MemoryManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/MemoryManager.java @@ -50,10 +50,12 @@ public class MemoryManager implements ActiveMQComponent { return low; } + @Override public synchronized boolean isStarted() { return started; } + @Override public synchronized void start() { ActiveMQServerLogger.LOGGER.debug("Starting MemoryManager with MEASURE_INTERVAL: " + measureInterval + " FREE_MEMORY_PERCENT: " + @@ -73,6 +75,7 @@ public class MemoryManager implements ActiveMQComponent { thread.start(); } + @Override public synchronized void stop() { if (!started) { // Already stopped @@ -92,6 +95,7 @@ public class MemoryManager implements ActiveMQComponent { private class MemoryRunnable implements Runnable { + @Override public void run() { while (true) { try { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java index 73613bdf7d..331851da90 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java @@ -65,10 +65,12 @@ public abstract class NodeManager implements ActiveMQComponent { // -------------------------------------------------------------------- + @Override public synchronized void start() throws Exception { isStarted = true; } + @Override public boolean isStarted() { return isStarted; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java index ab6dd0da7b..6026887c76 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ServerSession.java @@ -36,6 +36,7 @@ public interface ServerSession extends SecurityAuth { Object getConnectionID(); + @Override RemotingConnection getRemotingConnection(); boolean removeConsumer(long consumerID) throws Exception; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java index bc4a0ee873..81a3184e59 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/BackupManager.java @@ -72,6 +72,7 @@ public class BackupManager implements ActiveMQComponent { * Start the backup manager if not already started. This entails deploying a backup connector based on a cluster * configuration, informing the cluster manager so that it can add it to its topology and announce itself to the cluster. * */ + @Override public synchronized void start() { if (started) return; @@ -94,6 +95,7 @@ public class BackupManager implements ActiveMQComponent { /* * stop all the connectors * */ + @Override public synchronized void stop() { if (!started) return; @@ -218,6 +220,7 @@ public class BackupManager implements ActiveMQComponent { //this has to be done in a separate thread executor.execute(new Runnable() { + @Override public void run() { if (stopping) return; @@ -255,6 +258,7 @@ public class BackupManager implements ActiveMQComponent { ActiveMQServerLogger.LOGGER.errorAnnouncingBackup(); scheduledExecutor.schedule(new Runnable() { + @Override public void run() { announceBackup(); } @@ -288,6 +292,7 @@ public class BackupManager implements ActiveMQComponent { closeLocator(backupServerLocator); } executor.execute(new Runnable() { + @Override public void run() { synchronized (BackupConnector.this) { closeLocator(backupServerLocator); @@ -325,6 +330,7 @@ public class BackupManager implements ActiveMQComponent { this.tcConfigs = tcConfigs; } + @Override public ServerLocatorInternal createServerLocator(Topology topology) { if (tcConfigs != null && tcConfigs.length > 0) { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { @@ -361,6 +367,7 @@ public class BackupManager implements ActiveMQComponent { this.discoveryGroupConfiguration = discoveryGroupConfiguration; } + @Override public ServerLocatorInternal createServerLocator(Topology topology) { return new ServerLocatorImpl(topology, true, discoveryGroupConfiguration); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/Bridge.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/Bridge.java index 65d19d6136..c6a9b735db 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/Bridge.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/Bridge.java @@ -48,6 +48,7 @@ public interface Bridge extends Consumer, ActiveMQComponent { * To be called when the server sent a disconnect to the client. * Basically this is for cluster bridges being disconnected */ + @Override void disconnect(); boolean isConnected(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterControl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterControl.java index c213ff9b41..0956bc5879 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterControl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterControl.java @@ -152,6 +152,7 @@ public class ClusterControl implements AutoCloseable { /** * close this cluster control and its resources */ + @Override public void close() { sessionFactory.close(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java index e23e18a088..1a6271d386 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ClusterManager.java @@ -252,6 +252,7 @@ public final class ClusterManager implements ActiveMQComponent { } } + @Override public synchronized void start() throws Exception { if (state == State.STARTED) { return; @@ -298,6 +299,7 @@ public final class ClusterManager implements ActiveMQComponent { } } + @Override public void stop() throws Exception { haManager.stop(); synchronized (this) { @@ -351,6 +353,7 @@ public final class ClusterManager implements ActiveMQComponent { } } + @Override public boolean isStarted() { return state == State.STARTED; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java index d35bccbee8..0959f728c7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ColocatedHAManager.java @@ -50,6 +50,7 @@ public class ColocatedHAManager implements HAManager { /** * starts the HA manager. */ + @Override public void start() { if (started) return; @@ -62,6 +63,7 @@ public class ColocatedHAManager implements HAManager { /** * stop any backups */ + @Override public void stop() { for (ActiveMQServer activeMQServer : backupServers.values()) { try { @@ -103,6 +105,7 @@ public class ColocatedHAManager implements HAManager { * * @return the backups */ + @Override public Map getBackupServers() { return backupServers; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java index c32b446e63..d7f15b0ef7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicaPolicy.java @@ -99,6 +99,7 @@ public class ReplicaPolicy extends BackupPolicy { /* * these 2 methods are the same, leaving both as the second is correct but the first is needed until more refactoring is done * */ + @Override public String getBackupGroupName() { return groupName; } @@ -111,10 +112,12 @@ public class ReplicaPolicy extends BackupPolicy { this.groupName = groupName; } + @Override public boolean isRestartBackup() { return restartBackup; } + @Override public void setRestartBackup(boolean restartBackup) { this.restartBackup = restartBackup; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java index 295a862809..e627eb9683 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/ha/ReplicatedPolicy.java @@ -123,6 +123,7 @@ public class ReplicatedPolicy implements HAPolicy { /* * these 2 methods are the same, leaving both as the second is correct but the first is needed until more refactoring is done * */ + @Override public String getBackupGroupName() { return groupName; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java index 22f58a5c21..2ddcaeb99c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BridgeImpl.java @@ -237,10 +237,12 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled factory.cleanup(); } + @Override public void setNotificationService(final NotificationService notificationService) { this.notificationService = notificationService; } + @Override public synchronized void start() throws Exception { if (started) { return; @@ -260,6 +262,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } } + @Override public String debug() { return toString(); } @@ -297,6 +300,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } } + @Override public void flushExecutor() { // Wait for any create objects runnable to complete FutureLatch future = new FutureLatch(); @@ -310,8 +314,10 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } } + @Override public void disconnect() { executor.execute(new Runnable() { + @Override public void run() { if (session != null) { try { @@ -326,6 +332,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled }); } + @Override public boolean isConnected() { return session != null; } @@ -338,6 +345,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled return executor; } + @Override public void stop() throws Exception { if (stopping) { return; @@ -368,6 +376,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } } + @Override public void pause() throws Exception { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { ActiveMQServerLogger.LOGGER.debug("Bridge " + this.name + " being paused"); @@ -388,11 +397,13 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } } + @Override public void resume() throws Exception { queue.addConsumer(BridgeImpl.this); queue.deliverAsync(); } + @Override public boolean isStarted() { return started; } @@ -401,25 +412,30 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled executor.execute(new ConnectRunnable(this)); } + @Override public SimpleString getName() { return name; } + @Override public Queue getQueue() { return queue; } + @Override public Filter getFilter() { return filter; } // SendAcknowledgementHandler implementation --------------------- + @Override public SimpleString getForwardingAddress() { return forwardingAddress; } // For testing only + @Override public RemotingConnection getForwardingConnection() { if (session == null) { return null; @@ -431,6 +447,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled // Consumer implementation --------------------------------------- + @Override public void sendAcknowledged(final Message message) { if (active) { try { @@ -480,6 +497,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled } } + @Override public HandleStatus handle(final MessageReference ref) throws Exception { if (filter != null && !filter.match(ref.getMessage())) { return HandleStatus.NO_MATCH; @@ -562,14 +580,17 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled // FailureListener implementation -------------------------------- + @Override public void proceedDeliver(MessageReference ref) { // no op } + @Override public void connectionFailed(final ActiveMQException me, boolean failedOver) { connectionFailed(me, failedOver, null); } + @Override public void connectionFailed(final ActiveMQException me, boolean failedOver, String scaleDownTargetNodeID) { ActiveMQServerLogger.LOGGER.bridgeConnectionFailed(failedOver); @@ -625,6 +646,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled scheduleRetryConnect(); } + @Override public void beforeReconnect(final ActiveMQException exception) { // log.warn(name + "::Connection failed before reconnect ", exception); // fail(false); @@ -634,6 +656,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled final MessageReference ref, final LargeServerMessage message) { executor.execute(new Runnable() { + @Override public void run() { try { producer.send(dest, message); @@ -994,6 +1017,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled this.bridge = bridge; } + @Override public void run() { if (bridge.isStarted()) executor.execute(new ConnectRunnable(bridge)); @@ -1008,6 +1032,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled bridge = bridge2; } + @Override public void run() { bridge.connect(); } @@ -1015,6 +1040,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled private class StopRunnable implements Runnable { + @Override public void run() { try { ActiveMQServerLogger.LOGGER.debug("stopping bridge " + BridgeImpl.this); @@ -1070,6 +1096,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled private class PauseRunnable implements Runnable { + @Override public void run() { try { queue.removeConsumer(BridgeImpl.this); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BroadcastGroupImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BroadcastGroupImpl.java index d69355ce5b..7a5dbc467c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BroadcastGroupImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/BroadcastGroupImpl.java @@ -88,10 +88,12 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable { uniqueID = UUIDGenerator.getInstance().generateStringUUID(); } + @Override public void setNotificationService(final NotificationService notificationService) { this.notificationService = notificationService; } + @Override public synchronized void start() throws Exception { if (started) { return; @@ -111,6 +113,7 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable { activate(); } + @Override public synchronized void stop() { if (!started) { return; @@ -143,22 +146,27 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable { } + @Override public synchronized boolean isStarted() { return started; } + @Override public String getName() { return name; } + @Override public synchronized void addConnector(final TransportConfiguration tcConfig) { connectors.add(tcConfig); } + @Override public synchronized void removeConnector(final TransportConfiguration tcConfig) { connectors.remove(tcConfig); } + @Override public synchronized int size() { return connectors.size(); } @@ -169,6 +177,7 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable { } } + @Override public synchronized void broadcastConnectors() throws Exception { ActiveMQBuffer buff = ActiveMQBuffers.dynamicBuffer(4096); @@ -187,6 +196,7 @@ public class BroadcastGroupImpl implements BroadcastGroup, Runnable { endpoint.broadcast(data); } + @Override public void run() { if (!started) { return; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java index 4db67fc55d..3963b0271f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionBridge.java @@ -359,6 +359,7 @@ public class ClusterConnectionBridge extends BridgeImpl { } } + @Override protected boolean isPlainCoreBridge() { return false; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java index d290c6e105..12ca5e3633 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/ClusterConnectionImpl.java @@ -366,6 +366,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn this.manager = manager; } + @Override public void start() throws Exception { synchronized (this) { if (started) { @@ -379,6 +380,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } + @Override public void flushExecutor() { FutureLatch future = new FutureLatch(); executor.execute(future); @@ -388,6 +390,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } } + @Override public void stop() throws Exception { if (!started) { return; @@ -424,6 +427,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn managementService.sendNotification(notification); } executor.execute(new Runnable() { + @Override public void run() { synchronized (ClusterConnectionImpl.this) { closeLocator(serverLocator); @@ -448,18 +452,22 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return topology.getMember(manager.getNodeId()); } + @Override public void addClusterTopologyListener(final ClusterTopologyListener listener) { topology.addClusterTopologyListener(listener); } + @Override public void removeClusterTopologyListener(final ClusterTopologyListener listener) { topology.removeClusterTopologyListener(listener); } + @Override public Topology getTopology() { return topology; } + @Override public void nodeAnnounced(final long uniqueEventID, final String nodeID, final String backupGroupName, @@ -507,22 +515,27 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn // localMember.getConnector().b); } + @Override public boolean isStarted() { return started; } + @Override public SimpleString getName() { return name; } + @Override public String getNodeID() { return nodeManager.getNodeId().toString(); } + @Override public ActiveMQServer getServer() { return server; } + @Override public boolean isNodeActive(String nodeId) { MessageFlowRecord rec = records.get(nodeId); if (rec == null) { @@ -531,6 +544,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return rec.getBridge().isConnected(); } + @Override public Map getNodes() { synchronized (recordsGuard) { Map nodes = new HashMap(); @@ -611,12 +625,14 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn addClusterTopologyListener(this); } + @Override public TransportConfiguration getConnector() { return connector; } // ClusterTopologyListener implementation ------------------------------------------------------------------ + @Override public void nodeDown(final long eventUID, final String nodeID) { /* * we dont do anything when a node down is received. The bridges will take care themselves when they should disconnect @@ -709,6 +725,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } } + @Override public synchronized void informClusterOfBackup() { String nodeID = server.getNodeID().toString(); @@ -850,10 +867,12 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn "]"; } + @Override public void serverDisconnected() { this.disconnected = true; } + @Override public String getAddress() { return address.toString(); } @@ -893,6 +912,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn return queue; } + @Override public int getMaxHops() { return maxHops; } @@ -901,6 +921,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn * we should only ever close a record when the node itself has gone down or in the case of scale down where we know * the node is being completely destroyed and in this case we will migrate to another server/Bridge. * */ + @Override public void close() throws Exception { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("Stopping bridge " + bridge); @@ -917,6 +938,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn bridge.stop(); bridge.getExecutor().execute(new Runnable() { + @Override public void run() { try { if (disconnected) { @@ -933,10 +955,12 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn }); } + @Override public boolean isClosed() { return isClosed; } + @Override public void reset() throws Exception { resetBindings(); } @@ -945,10 +969,12 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn this.bridge = bridge; } + @Override public Bridge getBridge() { return bridge; } + @Override public synchronized void onMessage(final ClientMessage message) { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { ActiveMQServerLogger.LOGGER.debug("ClusterCommunication::Flow record on " + clusterConnector + " Receiving message " + message); @@ -1117,6 +1143,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn } } + @Override public synchronized void disconnectBindings() throws Exception { ActiveMQServerLogger.LOGGER.debug(ClusterConnectionImpl.this + " disconnect bindings"); reset = false; @@ -1364,6 +1391,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn "]"; } + @Override public String describe() { StringWriter str = new StringWriter(); PrintWriter out = new PrintWriter(str); @@ -1393,6 +1421,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn this.tcConfigs = tcConfigs; } + @Override public ServerLocatorInternal createServerLocator() { if (tcConfigs != null && tcConfigs.length > 0) { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { @@ -1420,6 +1449,7 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn this.dg = dg; } + @Override public ServerLocatorInternal createServerLocator() { return new ServerLocatorImpl(topology, true, dg); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/Redistributor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/Redistributor.java index d6abf2206c..7d24dc6876 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/Redistributor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/Redistributor.java @@ -74,14 +74,17 @@ public class Redistributor implements Consumer { this.batchSize = batchSize; } + @Override public Filter getFilter() { return null; } + @Override public String debug() { return toString(); } + @Override public String toManagementString() { return "Redistributor[" + queue.getName() + "/" + queue.getID() + "]"; } @@ -126,6 +129,7 @@ public class Redistributor implements Consumer { } } + @Override public synchronized HandleStatus handle(final MessageReference reference) throws Exception { if (!active) { return HandleStatus.BUSY; @@ -153,6 +157,7 @@ public class Redistributor implements Consumer { else { active = false; executor.execute(new Runnable() { + @Override public void run() { try { routingInfo.getB().finishCopy(); @@ -187,6 +192,7 @@ public class Redistributor implements Consumer { return HandleStatus.HANDLED; } + @Override public void proceedDeliver(MessageReference ref) { // no op } @@ -194,6 +200,7 @@ public class Redistributor implements Consumer { private void internalExecute(final Runnable runnable) { pendingRuns.countUp(); executor.execute(new Runnable() { + @Override public void run() { try { runnable.run(); @@ -214,10 +221,12 @@ public class Redistributor implements Consumer { storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.ioErrorRedistributing(errorCode, errorMessage); } + @Override public void done() { execPrompter(); } @@ -243,6 +252,7 @@ public class Redistributor implements Consumer { private class Prompter implements Runnable { + @Override public void run() { synchronized (Redistributor.this) { active = true; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/RemoteQueueBindingImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/RemoteQueueBindingImpl.java index 0a0030f133..883d36e394 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/RemoteQueueBindingImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/impl/RemoteQueueBindingImpl.java @@ -91,50 +91,62 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { this.distance = distance; } + @Override public long getID() { return id; } + @Override public SimpleString getAddress() { return address; } + @Override public Bindable getBindable() { return storeAndForwardQueue; } + @Override public Queue getQueue() { return storeAndForwardQueue; } + @Override public SimpleString getRoutingName() { return routingName; } + @Override public SimpleString getUniqueName() { return uniqueName; } + @Override public SimpleString getClusterName() { return uniqueName; } + @Override public boolean isExclusive() { return false; } + @Override public BindingType getType() { return BindingType.REMOTE_QUEUE; } + @Override public Filter getFilter() { return queueFilter; } + @Override public int getDistance() { return distance; } + @Override public synchronized boolean isHighAcceptPriority(final ServerMessage message) { if (consumerCount == 0) { return false; @@ -158,6 +170,7 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { public void unproposed(SimpleString groupID) { } + @Override public void route(final ServerMessage message, final RoutingContext context) { addRouteContextToMessage(message); @@ -183,6 +196,7 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { } } + @Override public synchronized void addConsumer(final SimpleString filterString) throws Exception { if (filterString != null) { // There can actually be many consumers on the same queue with the same filter, so we need to maintain a ref @@ -203,6 +217,7 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { consumerCount++; } + @Override public synchronized void removeConsumer(final SimpleString filterString) throws Exception { if (filterString != null) { Integer i = filterCounts.get(filterString); @@ -231,6 +246,7 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { filters.clear(); } + @Override public synchronized int consumerCount() { return consumerCount; } @@ -289,6 +305,7 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { return filters; } + @Override public void close() throws Exception { storeAndForwardQueue.close(); } @@ -324,6 +341,7 @@ public class RemoteQueueBindingImpl implements RemoteQueueBinding { } } + @Override public long getRemoteQueueID() { return remoteQueueID; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/BooleanVote.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/BooleanVote.java index 553f4ce781..69c8068c34 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/BooleanVote.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/cluster/qourum/BooleanVote.java @@ -36,6 +36,7 @@ public final class BooleanVote extends Vote { return false; } + @Override public Boolean getVote() { return vote; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/GroupHandlingAbstract.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/GroupHandlingAbstract.java index c3165c6ae2..3c32c92d96 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/GroupHandlingAbstract.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/GroupHandlingAbstract.java @@ -51,12 +51,14 @@ public abstract class GroupHandlingAbstract implements GroupingHandler { this.address = address; } + @Override public void addListener(final UnproposalListener listener) { if (executor == null) { listeners.add(listener); } else { executor.execute(new Runnable() { + @Override public void run() { listeners.add(listener); } @@ -67,6 +69,7 @@ public abstract class GroupHandlingAbstract implements GroupingHandler { protected void fireUnproposed(final SimpleString groupID) { Runnable runnable = new Runnable() { + @Override public void run() { for (UnproposalListener listener : listeners) { listener.unproposed(groupID); @@ -82,6 +85,7 @@ public abstract class GroupHandlingAbstract implements GroupingHandler { } } + @Override public void forceRemove(SimpleString groupid, SimpleString clusterName) throws Exception { remove(groupid, clusterName); sendUnproposal(groupid, clusterName, 0); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java index 41627767fc..09a8fc315a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java @@ -97,10 +97,12 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { this.groupTimeout = groupTimeout; } + @Override public SimpleString getName() { return name; } + @Override public Response propose(final Proposal proposal) throws Exception { OperationContext originalCtx = storageManager.getContext(); @@ -157,11 +159,13 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { } } + @Override public void resendPending() throws Exception { // this only make sense on RemoteGroupingHandler. // this is a no-op on the local one } + @Override public void proposed(final Response response) throws Exception { } @@ -170,6 +174,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { remove(groupid, clusterName); } + @Override public void sendProposalResponse(final Response response, final int distance) throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, response.getGroupId()); @@ -182,11 +187,13 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { managementService.sendNotification(notification); } + @Override public Response receive(final Proposal proposal, final int distance) throws Exception { ActiveMQServerLogger.LOGGER.trace("received proposal " + proposal); return propose(proposal); } + @Override public void addGroupBinding(final GroupBinding groupBinding) { map.put(groupBinding.getGroupId(), groupBinding); List newList = new ArrayList(); @@ -197,6 +204,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { newList.add(groupBinding); } + @Override public Response getProposal(final SimpleString fullID, final boolean touchTime) { GroupBinding original = map.get(fullID); @@ -271,6 +279,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { } } + @Override public void onNotification(final Notification notification) { if (!(notification.getType() instanceof CoreNotificationType)) return; @@ -315,6 +324,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { } } + @Override public synchronized void start() throws Exception { if (started) return; @@ -335,6 +345,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { started = true; } + @Override public synchronized void stop() throws Exception { started = false; if (reaperFuture != null) { @@ -343,6 +354,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { } } + @Override public boolean isStarted() { return started; } @@ -392,6 +404,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { final GroupIdReaper reaper = new GroupIdReaper(); + @Override public void run() { executor.execute(reaper); } @@ -400,6 +413,7 @@ public final class LocalGroupingHandler extends GroupHandlingAbstract { private final class GroupIdReaper implements Runnable { + @Override public void run() { // The reaper thread should be finished case the PostOffice is gone // This is to avoid leaks on PostOffice between stops and starts diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java index 5545aff511..57763d531a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/RemoteGroupingHandler.java @@ -84,6 +84,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { this(null, managementService, name, address, timeout, groupTimeout); } + @Override public SimpleString getName() { return name; } @@ -105,6 +106,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { return started; } + @Override public void resendPending() throws Exception { // In case the RESET wasn't sent yet to the remote node, we may eventually miss a node send, // on that case the cluster-reset information will ask the group to resend any pending information @@ -121,6 +123,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { } } + @Override public Response propose(final Proposal proposal) throws Exception { // return it from the cache first Response response = responses.get(proposal.getGroupId()); @@ -205,6 +208,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { return new Notification(null, CoreNotificationType.PROPOSAL, props); } + @Override public Response getProposal(final SimpleString fullID, boolean touchTime) { Response response = responses.get(fullID); @@ -231,6 +235,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { sendUnproposal(groupid, clusterName, distance); } + @Override public void proposed(final Response response) throws Exception { try { lock.lock(); @@ -250,6 +255,7 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { } } + @Override public Response receive(final Proposal proposal, final int distance) throws Exception { TypedProperties props = new TypedProperties(); props.putSimpleStringProperty(ManagementHelper.HDR_PROPOSAL_GROUP_ID, proposal.getGroupId()); @@ -262,14 +268,17 @@ public final class RemoteGroupingHandler extends GroupHandlingAbstract { return null; } + @Override public void sendProposalResponse(final Response response, final int distance) throws Exception { // NO-OP } + @Override public void addGroupBinding(final GroupBinding groupBinding) { // NO-OP } + @Override public void onNotification(final Notification notification) { if (!(notification.getType() instanceof CoreNotificationType)) return; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java index 5401142fd0..70d3bbd92a 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java @@ -362,6 +362,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return manager; } + @Override public final synchronized void start() throws Exception { if (state != SERVER_STATE.STOPPED) { ActiveMQServerLogger.LOGGER.debug("Server already started!"); @@ -467,6 +468,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { nodeManager = createNodeManager(configuration.getJournalLocation(), true); } + @Override public Activation getActivation() { return activation; } @@ -515,10 +517,12 @@ public class ActiveMQServerImpl implements ActiveMQServer { }); } + @Override public final void stop() throws Exception { stop(false); } + @Override public void addActivationParam(String key, Object val) { activationParams.put(key, val); } @@ -528,6 +532,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return postOffice.isAddressBound(SimpleString.toSimpleString(address)); } + @Override public void threadDump() { StringWriter str = new StringWriter(); PrintWriter out = new PrintWriter(str); @@ -553,6 +558,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { ActiveMQServerLogger.LOGGER.threadDump(str.toString()); } + @Override public final void stop(boolean failoverOnServerShutdown) throws Exception { stop(failoverOnServerShutdown, false, false); } @@ -848,6 +854,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { // ActiveMQServer implementation // ----------------------------------------------------------- + @Override public String describe() { StringWriter str = new StringWriter(); PrintWriter out = new PrintWriter(str); @@ -857,6 +864,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return str.toString(); } + @Override public String destroyConnectionWithSessionMetadata(String metaKey, String parameterValue) throws Exception { StringBuffer operationsExecuted = new StringBuffer(); @@ -901,66 +909,82 @@ public class ActiveMQServerImpl implements ActiveMQServer { } + @Override public void setIdentity(String identity) { this.identity = identity; } + @Override public String getIdentity() { return identity; } + @Override public ScheduledExecutorService getScheduledPool() { return scheduledPool; } + @Override public Configuration getConfiguration() { return configuration; } + @Override public PagingManager getPagingManager() { return pagingManager; } + @Override public RemotingService getRemotingService() { return remotingService; } + @Override public StorageManager getStorageManager() { return storageManager; } + @Override public ActiveMQSecurityManager getSecurityManager() { return securityManager; } + @Override public ManagementService getManagementService() { return managementService; } + @Override public HierarchicalRepository> getSecurityRepository() { return securityRepository; } + @Override public NodeManager getNodeManager() { return nodeManager; } + @Override public HierarchicalRepository getAddressSettingsRepository() { return addressSettingsRepository; } + @Override public ResourceManager getResourceManager() { return resourceManager; } + @Override public Version getVersion() { return version; } + @Override public boolean isStarted() { return state == SERVER_STATE.STARTED; } + @Override public ClusterManager getClusterManager() { return clusterManager; } @@ -1027,6 +1051,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return sessionCount; } + @Override public void checkQueueCreationLimit(String username) throws Exception { if (configuration.getResourceLimitSettings() != null && configuration.getResourceLimitSettings().containsKey(username)) { ResourceLimitSettings limits = configuration.getResourceLimitSettings().get(username); @@ -1082,10 +1107,12 @@ public class ActiveMQServerImpl implements ActiveMQServer { return securityStore; } + @Override public void removeSession(final String name) throws Exception { sessions.remove(name); } + @Override public ServerSession lookupSession(String key, String value) { // getSessions is called here in a try to minimize locking the Server while this check is being done Set allSessions = getSessions(); @@ -1100,6 +1127,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return null; } + @Override public synchronized List getSessions(final String connectionID) { Set> sessionEntries = sessions.entrySet(); List matchingSessions = new ArrayList(); @@ -1112,6 +1140,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return matchingSessions; } + @Override public synchronized Set getSessions() { return new HashSet(sessions.values()); } @@ -1126,26 +1155,32 @@ public class ActiveMQServerImpl implements ActiveMQServer { return activationLatch.await(timeout, unit); } + @Override public ActiveMQServerControlImpl getActiveMQServerControl() { return messagingServerControl; } + @Override public int getConnectionCount() { return remotingService.getConnections().size(); } + @Override public PostOffice getPostOffice() { return postOffice; } + @Override public QueueFactory getQueueFactory() { return queueFactory; } + @Override public SimpleString getNodeID() { return nodeManager == null ? null : nodeManager.getNodeId(); } + @Override public Queue createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, @@ -1154,6 +1189,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return createQueue(address, queueName, filterString, null, durable, temporary, false, false, false); } + @Override public Queue createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, @@ -1163,6 +1199,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return createQueue(address, queueName, filterString, user, durable, temporary, false, false, false); } + @Override public Queue createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, @@ -1185,6 +1222,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { * @param durable * @throws Exception */ + @Override public void createSharedQueue(final SimpleString address, final SimpleString name, final SimpleString filterString, @@ -1207,6 +1245,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { } + @Override public Queue locateQueue(SimpleString queueName) { Binding binding = postOffice.getBinding(queueName); @@ -1223,6 +1262,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return (Queue) binding.getBindable(); } + @Override public Queue deployQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, @@ -1233,6 +1273,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { return createQueue(address, queueName, filterString, null, durable, temporary, true, false, false); } + @Override public void destroyQueue(final SimpleString queueName) throws Exception { // The session is passed as an argument to verify if the user has authorization to delete the queue // in some cases (such as temporary queues) this should happen regardless of the authorization @@ -1240,16 +1281,19 @@ public class ActiveMQServerImpl implements ActiveMQServer { destroyQueue(queueName, null, true); } + @Override public void destroyQueue(final SimpleString queueName, final SecurityAuth session) throws Exception { destroyQueue(queueName, session, true); } + @Override public void destroyQueue(final SimpleString queueName, final SecurityAuth session, final boolean checkConsumerCount) throws Exception { destroyQueue(queueName, session, checkConsumerCount, false); } + @Override public void destroyQueue(final SimpleString queueName, final SecurityAuth session, final boolean checkConsumerCount, @@ -1283,18 +1327,22 @@ public class ActiveMQServerImpl implements ActiveMQServer { queue.deleteQueue(removeConsumers); } + @Override public void registerActivateCallback(final ActivateCallback callback) { activateCallbacks.add(callback); } + @Override public void unregisterActivateCallback(final ActivateCallback callback) { activateCallbacks.remove(callback); } + @Override public ExecutorFactory getExecutorFactory() { return executorFactory; } + @Override public void setGroupingHandler(final GroupingHandler groupingHandler) { if (this.groupingHandler != null && managementService != null) { // Removing old groupNotification @@ -1307,18 +1355,22 @@ public class ActiveMQServerImpl implements ActiveMQServer { } + @Override public GroupingHandler getGroupingHandler() { return groupingHandler; } + @Override public ReplicationManager getReplicationManager() { return activation.getReplicationManager(); } + @Override public ConnectorsService getConnectorsService() { return connectorsService; } + @Override public void deployDivert(DivertConfiguration config) throws Exception { if (config.getName() == null) { ActiveMQServerLogger.LOGGER.divertWithNoName(); @@ -1361,6 +1413,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { managementService.registerDivert(divert, config); } + @Override public void destroyDivert(SimpleString name) throws Exception { Binding binding = postOffice.getBinding(name); if (binding == null) { @@ -1373,18 +1426,21 @@ public class ActiveMQServerImpl implements ActiveMQServer { postOffice.removeBinding(name, null); } + @Override public void deployBridge(BridgeConfiguration config) throws Exception { if (clusterManager != null) { clusterManager.deployBridge(config); } } + @Override public void destroyBridge(String name) throws Exception { if (clusterManager != null) { clusterManager.destroyBridge(name); } } + @Override public ServerSession getSessionByID(String sessionName) { return sessions.get(sessionName); } @@ -1499,6 +1555,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { } } + @Override public ServiceRegistry getServiceRegistry() { return serviceRegistry; } @@ -1607,6 +1664,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { if (dumpInfoInterval > 0) { scheduledPool.scheduleWithFixedDelay(new Runnable() { + @Override public void run() { ActiveMQServerLogger.LOGGER.dumpServerInfo(dumper.dump()); } @@ -1890,6 +1948,7 @@ public class ActiveMQServerImpl implements ActiveMQServer { boolean failedAlready = false; + @Override public synchronized void onIOException(Exception cause, String message, SequentialFile file) { if (!failedAlready) { failedAlready = true; @@ -1901,10 +1960,12 @@ public class ActiveMQServerImpl implements ActiveMQServer { } } + @Override public void addProtocolManagerFactory(ProtocolManagerFactory factory) { protocolManagerFactories.add(factory); } + @Override public void removeProtocolManagerFactory(ProtocolManagerFactory factory) { protocolManagerFactories.remove(factory); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java index f8fa60f742..b6b5508e3f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AutoCreatedQueueManagerImpl.java @@ -30,6 +30,7 @@ public class AutoCreatedQueueManagerImpl implements AutoCreatedQueueManager { private final ActiveMQServer server; private final Runnable runnable = new Runnable() { + @Override public void run() { try { Queue queue = server.locateQueue(queueName); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java index ea4768d14c..789b9b6d52 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ConnectorsService.java @@ -68,6 +68,7 @@ public final class ConnectorsService implements ActiveMQComponent { this.serviceRegistry = serviceRegistry; } + @Override public void start() throws Exception { Collection> connectorServiceFactories = serviceRegistry.getConnectorServices(configuration.getConnectorServiceConfigurations()); @@ -104,6 +105,7 @@ public final class ConnectorsService implements ActiveMQComponent { connectors.add(connectorService); } + @Override public void stop() throws Exception { if (!isStarted) { return; @@ -120,6 +122,7 @@ public final class ConnectorsService implements ActiveMQComponent { isStarted = false; } + @Override public boolean isStarted() { return isStarted; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java index ee6d0feba1..c2f8b90570 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java @@ -72,6 +72,7 @@ public class DivertImpl implements Divert { this.storageManager = storageManager; } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { // We must make a copy of the message, otherwise things like returning credits to the page won't work // properly on ack, since the original address will be overwritten @@ -112,22 +113,27 @@ public class DivertImpl implements Divert { route(message, context); } + @Override public SimpleString getRoutingName() { return routingName; } + @Override public SimpleString getUniqueName() { return uniqueName; } + @Override public boolean isExclusive() { return exclusive; } + @Override public Filter getFilter() { return filter; } + @Override public Transformer getTransformer() { return transformer; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LastValueQueue.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LastValueQueue.java index 39becf0452..c474a45b07 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LastValueQueue.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LastValueQueue.java @@ -162,6 +162,7 @@ public class LastValueQueue extends QueueImpl { return ref; } + @Override public void handled() { ref.handled(); // We need to remove the entry from the map just before it gets delivered @@ -182,50 +183,62 @@ public class LastValueQueue extends QueueImpl { this.ref = ref; } + @Override public MessageReference copy(final Queue queue) { return ref.copy(queue); } + @Override public void decrementDeliveryCount() { ref.decrementDeliveryCount(); } + @Override public int getDeliveryCount() { return ref.getDeliveryCount(); } + @Override public ServerMessage getMessage() { return ref.getMessage(); } + @Override public Queue getQueue() { return ref.getQueue(); } + @Override public long getScheduledDeliveryTime() { return ref.getScheduledDeliveryTime(); } + @Override public void incrementDeliveryCount() { ref.incrementDeliveryCount(); } + @Override public void setDeliveryCount(final int deliveryCount) { ref.setDeliveryCount(deliveryCount); } + @Override public void setScheduledDeliveryTime(final long scheduledDeliveryTime) { ref.setScheduledDeliveryTime(scheduledDeliveryTime); } + @Override public void setPersistedCount(int count) { ref.setPersistedCount(count); } + @Override public int getPersistedCount() { return ref.getPersistedCount(); } + @Override public boolean isPaged() { return false; } @@ -241,6 +254,7 @@ public class LastValueQueue extends QueueImpl { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.server.MessageReference#getMessageMemoryEstimate() */ + @Override public int getMessageMemoryEstimate() { return ref.getMessage().getMemoryEstimate(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LiveOnlyActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LiveOnlyActivation.java index 59ffd6ac2a..d8224dce14 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LiveOnlyActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/LiveOnlyActivation.java @@ -53,6 +53,7 @@ public class LiveOnlyActivation extends Activation { this.liveOnlyPolicy = liveOnlyPolicy; } + @Override public void run() { try { activeMQServer.initialisePart1(false); @@ -81,6 +82,7 @@ public class LiveOnlyActivation extends Activation { } } + @Override public void freezeConnections(RemotingService remotingService) { // connect to the scale-down target first so that when we freeze/disconnect the clients we can tell them where // we're sending the messages diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java index ca1c0a2521..96413f7516 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java @@ -89,6 +89,7 @@ public class MessageReferenceImpl implements MessageReference { /** * @return the persistedCount */ + @Override public int getPersistedCount() { return persistedCount; } @@ -96,10 +97,12 @@ public class MessageReferenceImpl implements MessageReference { /** * @param persistedCount the persistedCount to set */ + @Override public void setPersistedCount(int persistedCount) { this.persistedCount = persistedCount; } + @Override public MessageReference copy(final Queue queue) { return new MessageReferenceImpl(this, queue); } @@ -108,39 +111,48 @@ public class MessageReferenceImpl implements MessageReference { return MessageReferenceImpl.memoryOffset; } + @Override public int getDeliveryCount() { return deliveryCount.get(); } + @Override public void setDeliveryCount(final int deliveryCount) { this.deliveryCount.set(deliveryCount); this.persistedCount = this.deliveryCount.get(); } + @Override public void incrementDeliveryCount() { deliveryCount.incrementAndGet(); } + @Override public void decrementDeliveryCount() { deliveryCount.decrementAndGet(); } + @Override public long getScheduledDeliveryTime() { return scheduledDeliveryTime; } + @Override public void setScheduledDeliveryTime(final long scheduledDeliveryTime) { this.scheduledDeliveryTime = scheduledDeliveryTime; } + @Override public ServerMessage getMessage() { return message; } + @Override public Queue getQueue() { return queue; } + @Override public void handled() { queue.referenceHandled(); } @@ -155,10 +167,12 @@ public class MessageReferenceImpl implements MessageReference { return alreadyAcked; } + @Override public boolean isPaged() { return false; } + @Override public void acknowledge() throws Exception { queue.acknowledge(this); } @@ -173,6 +187,7 @@ public class MessageReferenceImpl implements MessageReference { return this.consumerID; } + @Override public int getMessageMemoryEstimate() { return message.getMemoryEstimate(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java index 47793c1439..cd6908ee91 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/PostOfficeJournalLoader.java @@ -158,6 +158,7 @@ public class PostOfficeJournalLoader implements JournalLoader { } } + @Override public void handleAddMessage(Map> queueMap) throws Exception { for (Map.Entry> entry : queueMap.entrySet()) { long queueID = entry.getKey(); @@ -206,6 +207,7 @@ public class PostOfficeJournalLoader implements JournalLoader { } } + @Override public void handleNoMessageReferences(Map messages) { for (ServerMessage msg : messages.values()) { if (msg.getRefCount() == 0) { @@ -306,6 +308,7 @@ public class PostOfficeJournalLoader implements JournalLoader { * @param pendingNonTXPageCounter * @throws Exception */ + @Override public void recoverPendingPageCounters(List pendingNonTXPageCounter) throws Exception { // We need a structure of the following // Address -> PageID -> QueueID -> List diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java index d3089af73c..280bb13728 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueFactoryImpl.java @@ -60,10 +60,12 @@ public class QueueFactoryImpl implements QueueFactory { this.executorFactory = executorFactory; } + @Override public void setPostOffice(final PostOffice postOffice) { this.postOffice = postOffice; } + @Override public Queue createQueue(final long persistenceID, final SimpleString address, final SimpleString name, diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index a5b3622864..bea9f6d748 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -240,6 +240,7 @@ public class QueueImpl implements Queue { public List getGroupsUsed() { final CountDownLatch flush = new CountDownLatch(1); executor.execute(new Runnable() { + @Override public void run() { flush.countDown(); } @@ -381,6 +382,7 @@ public class QueueImpl implements Queue { return name; } + @Override public SimpleString getUser() { return user; } @@ -389,6 +391,7 @@ public class QueueImpl implements Queue { return false; } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { context.addQueue(address, this); } @@ -399,48 +402,59 @@ public class QueueImpl implements Queue { } // Queue implementation ---------------------------------------------------------------------------------------- + @Override public synchronized void setConsumersRefCount(final ReferenceCounter referenceCounter) { if (refCountForConsumers == null) { this.refCountForConsumers = referenceCounter; } } + @Override public ReferenceCounter getConsumersRefCount() { return refCountForConsumers; } + @Override public boolean isDurable() { return durable; } + @Override public boolean isTemporary() { return temporary; } + @Override public boolean isAutoCreated() { return autoCreated; } + @Override public SimpleString getName() { return name; } + @Override public SimpleString getAddress() { return address; } + @Override public long getID() { return id; } + @Override public PageSubscription getPageSubscription() { return pageSubscription; } + @Override public Filter getFilter() { return filter; } + @Override public void unproposed(final SimpleString groupID) { if (groupID.toString().endsWith("." + this.getName())) { // this means this unproposed belongs to this routing, so we will @@ -451,6 +465,7 @@ public class QueueImpl implements Queue { final SimpleString groupIDToRemove = (SimpleString) groupID.subSequence(0, groupID.length() - getName().length() - 1); // using an executor so we don't want to hold anyone just because of this getExecutor().execute(new Runnable() { + @Override public void run() { synchronized (QueueImpl.this) { if (groups.remove(groupIDToRemove) != null) { @@ -466,6 +481,7 @@ public class QueueImpl implements Queue { } /* Called when a message is cancelled back into the queue */ + @Override public synchronized void addHead(final MessageReference ref) { flushDeliveriesInTransit(); if (scheduledDeliveryHandler.checkAndSchedule(ref, false)) { @@ -478,6 +494,7 @@ public class QueueImpl implements Queue { } /* Called when a message is cancelled back into the queue */ + @Override public synchronized void addHead(final List refs) { flushDeliveriesInTransit(); for (MessageReference ref : refs) { @@ -489,6 +506,7 @@ public class QueueImpl implements Queue { deliverAsync(); } + @Override public synchronized void reload(final MessageReference ref) { queueMemorySize.addAndGet(ref.getMessageMemoryEstimate()); if (!scheduledDeliveryHandler.checkAndSchedule(ref, true)) { @@ -500,10 +518,12 @@ public class QueueImpl implements Queue { messagesAdded++; } + @Override public void addTail(final MessageReference ref) { addTail(ref, false); } + @Override public void addTail(final MessageReference ref, final boolean direct) { if (scheduledDeliveryHandler.checkAndSchedule(ref, true)) { synchronized (this) { @@ -571,6 +591,7 @@ public class QueueImpl implements Queue { } } + @Override public void forceDelivery() { if (pageSubscription != null && pageSubscription.isPaging()) { if (isTrace) { @@ -586,6 +607,7 @@ public class QueueImpl implements Queue { deliverAsync(); } + @Override public void deliverAsync() { if (scheduledRunners.get() < MAX_SCHEDULED_RUNNERS) { scheduledRunners.incrementAndGet(); @@ -602,12 +624,14 @@ public class QueueImpl implements Queue { } + @Override public void close() throws Exception { if (checkQueueSizeFuture != null) { checkQueueSizeFuture.cancel(false); } getExecutor().execute(new Runnable() { + @Override public void run() { try { cancelRedistributor(); @@ -624,6 +648,7 @@ public class QueueImpl implements Queue { } } + @Override public Executor getExecutor() { if (pageSubscription != null && pageSubscription.isPaging()) { // When in page mode, we don't want to have concurrent IO on the same PageStore @@ -641,6 +666,7 @@ public class QueueImpl implements Queue { flushExecutor(); } + @Override public boolean flushExecutor() { boolean ok = internalFlushExecutor(10000); @@ -664,6 +690,7 @@ public class QueueImpl implements Queue { return result; } + @Override public void addConsumer(final Consumer consumer) throws Exception { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { ActiveMQServerLogger.LOGGER.debug(this + " adding consumer " + consumer); @@ -687,6 +714,7 @@ public class QueueImpl implements Queue { } + @Override public void removeConsumer(final Consumer consumer) { synchronized (this) { consumersChanged = true; @@ -733,6 +761,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized void addRedistributor(final long delay) { if (redistributorFuture != null) { redistributorFuture.cancel(false); @@ -759,6 +788,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized void cancelRedistributor() throws Exception { if (redistributor != null) { redistributor.stop(); @@ -786,14 +816,17 @@ public class QueueImpl implements Queue { super.finalize(); } + @Override public synchronized int getConsumerCount() { return consumerSet.size(); } + @Override public synchronized Set getConsumers() { return new HashSet(consumerSet); } + @Override public boolean hasMatchingConsumer(final ServerMessage message) { for (ConsumerHolder holder : consumerList) { Consumer consumer = holder.consumer; @@ -816,14 +849,17 @@ public class QueueImpl implements Queue { return false; } + @Override public LinkedListIterator iterator() { return new SynchronizedIterator(messageReferences.iterator()); } + @Override public TotalQueueIterator totalIterator() { return new TotalQueueIterator(); } + @Override public synchronized MessageReference removeReferenceWithID(final long id1) throws Exception { LinkedListIterator iterator = iterator(); @@ -856,6 +892,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized MessageReference getReference(final long id1) { LinkedListIterator iterator = iterator(); @@ -876,6 +913,7 @@ public class QueueImpl implements Queue { } } + @Override public long getMessageCount() { synchronized (this) { if (pageSubscription != null) { @@ -891,14 +929,17 @@ public class QueueImpl implements Queue { } } + @Override public synchronized int getScheduledCount() { return scheduledDeliveryHandler.getScheduledCount(); } + @Override public synchronized List getScheduledMessages() { return scheduledDeliveryHandler.getScheduledReferences(); } + @Override public Map> getDeliveringMessages() { List consumerListClone = cloneConsumersList(); @@ -915,10 +956,12 @@ public class QueueImpl implements Queue { return mapReturn; } + @Override public int getDeliveringCount() { return deliveringCount.get(); } + @Override public void acknowledge(final MessageReference ref) throws Exception { if (ref.isPaged()) { pageSubscription.ack((PagedReference) ref); @@ -939,6 +982,7 @@ public class QueueImpl implements Queue { } + @Override public void acknowledge(final Transaction tx, final MessageReference ref) throws Exception { if (ref.isPaged()) { pageSubscription.ackTx(tx, (PagedReference) ref); @@ -962,6 +1006,7 @@ public class QueueImpl implements Queue { messagesAcknowledged++; } + @Override public void reacknowledge(final Transaction tx, final MessageReference ref) throws Exception { ServerMessage message = ref.getMessage(); @@ -1001,14 +1046,17 @@ public class QueueImpl implements Queue { } } + @Override public void cancel(final Transaction tx, final MessageReference reference) { cancel(tx, reference, false); } + @Override public void cancel(final Transaction tx, final MessageReference reference, boolean ignoreRedeliveryCheck) { getRefsOperation(tx, ignoreRedeliveryCheck).addAck(reference); } + @Override public synchronized void cancel(final MessageReference reference, final long timeBase) throws Exception { if (checkRedelivery(reference, timeBase, false)) { if (!scheduledDeliveryHandler.checkAndSchedule(reference, false)) { @@ -1022,6 +1070,7 @@ public class QueueImpl implements Queue { } } + @Override public void expire(final MessageReference ref) throws Exception { if (expiryAddress != null) { if (isTrace) { @@ -1037,14 +1086,17 @@ public class QueueImpl implements Queue { } } + @Override public SimpleString getExpiryAddress() { return this.expiryAddress; } + @Override public void referenceHandled() { incDelivering(); } + @Override public void incrementMesssagesAdded() { messagesAdded++; } @@ -1061,6 +1113,7 @@ public class QueueImpl implements Queue { } } + @Override public long getMessagesAdded() { if (pageSubscription != null) { return messagesAdded + pageSubscription.getCounter().getValue() - pagedReferences.get(); @@ -1070,22 +1123,27 @@ public class QueueImpl implements Queue { } } + @Override public long getMessagesAcknowledged() { return messagesAcknowledged; } + @Override public int deleteAllReferences() throws Exception { return deleteAllReferences(DEFAULT_FLUSH_LIMIT); } + @Override public int deleteAllReferences(final int flushLimit) throws Exception { return deleteMatchingReferences(flushLimit, null); } + @Override public int deleteMatchingReferences(Filter filter) throws Exception { return deleteMatchingReferences(DEFAULT_FLUSH_LIMIT, filter); } + @Override public synchronized int deleteMatchingReferences(final int flushLimit, final Filter filter1) throws Exception { return iterQueue(flushLimit, filter1, new QueueIterateAction() { @Override @@ -1195,6 +1253,7 @@ public class QueueImpl implements Queue { } } + @Override public void destroyPaging() throws Exception { // it could be null on embedded or certain unit tests if (pageSubscription != null) { @@ -1203,6 +1262,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized boolean deleteReference(final long messageID) throws Exception { boolean deleted = false; @@ -1237,10 +1297,12 @@ public class QueueImpl implements Queue { } } + @Override public void deleteQueue() throws Exception { deleteQueue(false); } + @Override public void deleteQueue(boolean removeConsumers) throws Exception { synchronized (this) { this.queueDestroyed = true; @@ -1279,6 +1341,7 @@ public class QueueImpl implements Queue { } + @Override public synchronized boolean expireReference(final long messageID) throws Exception { if (expiryAddress != null && expiryAddress.equals(this.address)) { // check expire with itself would be silly (waste of time) @@ -1307,6 +1370,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized int expireReferences(final Filter filter) throws Exception { if (expiryAddress != null && expiryAddress.equals(this.address)) { // check expire with itself would be silly (waste of time) @@ -1342,6 +1406,7 @@ public class QueueImpl implements Queue { } } + @Override public void expireReferences() { if (expiryAddress != null && expiryAddress.equals(this.address)) { // check expire with itself would be silly (waste of time) @@ -1360,6 +1425,7 @@ public class QueueImpl implements Queue { public AtomicInteger scannerRunning = new AtomicInteger(0); + @Override public void run() { synchronized (QueueImpl.this) { if (queueDestroyed) { @@ -1406,6 +1472,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception { LinkedListIterator iter = iterator(); @@ -1427,6 +1494,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized int sendMessagesToDeadLetterAddress(Filter filter) throws Exception { int count = 0; LinkedListIterator iter = iterator(); @@ -1449,10 +1517,12 @@ public class QueueImpl implements Queue { } } + @Override public boolean moveReference(final long messageID, final SimpleString toAddress) throws Exception { return moveReference(messageID, toAddress, false); } + @Override public synchronized boolean moveReference(final long messageID, final SimpleString toAddress, final boolean rejectDuplicate) throws Exception { @@ -1482,10 +1552,12 @@ public class QueueImpl implements Queue { } } + @Override public int moveReferences(final Filter filter, final SimpleString toAddress) throws Exception { return moveReferences(DEFAULT_FLUSH_LIMIT, filter, toAddress, false); } + @Override public synchronized int moveReferences(final int flushLimit, final Filter filter, final SimpleString toAddress, @@ -1526,6 +1598,7 @@ public class QueueImpl implements Queue { }); } + @Override public int retryMessages(Filter filter) throws Exception { final HashMap queues = new HashMap<>(); @@ -1568,6 +1641,7 @@ public class QueueImpl implements Queue { } + @Override public synchronized boolean changeReferencePriority(final long messageID, final byte newPriority) throws Exception { LinkedListIterator iter = iterator(); @@ -1591,6 +1665,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized int changeReferencesPriority(final Filter filter, final byte newPriority) throws Exception { LinkedListIterator iter = iterator(); @@ -1613,6 +1688,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized void resetAllIterators() { for (ConsumerHolder holder : this.consumerList) { if (holder.iter != null) { @@ -1622,6 +1698,7 @@ public class QueueImpl implements Queue { } } + @Override public synchronized void pause() { try { this.flushDeliveriesInTransit(); @@ -1632,16 +1709,19 @@ public class QueueImpl implements Queue { paused = true; } + @Override public synchronized void resume() { paused = false; deliverAsync(); } + @Override public synchronized boolean isPaused() { return paused; } + @Override public boolean isDirectDeliver() { return directDeliver; } @@ -1649,6 +1729,7 @@ public class QueueImpl implements Queue { /** * @return the internalQueue */ + @Override public boolean isInternalQueue() { return internalQueue; } @@ -1656,6 +1737,7 @@ public class QueueImpl implements Queue { /** * @param internalQueue the internalQueue to set */ + @Override public void setInternalQueue(boolean internalQueue) { this.internalQueue = internalQueue; } @@ -2038,6 +2120,7 @@ public class QueueImpl implements Queue { } } + @Override public boolean checkRedelivery(final MessageReference reference, final long timeBase, final boolean ignoreRedeliveryDelay) throws Exception { @@ -2177,10 +2260,12 @@ public class QueueImpl implements Queue { storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.ioErrorRedistributing(errorCode, errorMessage); } + @Override public void done() { deliverAsync(); } @@ -2471,6 +2556,7 @@ public class QueueImpl implements Queue { return consumerListClone; } + @Override public void postAcknowledge(final MessageReference ref) { QueueImpl queue = (QueueImpl) ref.getQueue(); @@ -2539,14 +2625,17 @@ public class QueueImpl implements Queue { return delay; } + @Override public synchronized void resetMessagesAdded() { messagesAdded = 0; } + @Override public synchronized void resetMessagesAcknowledged() { messagesAcknowledged = 0; } + @Override public float getRate() { float timeSlice = ((System.currentTimeMillis() - queueRateCheckTime.getAndSet(System.currentTimeMillis())) / 1000.0f); if (timeSlice == 0) { @@ -2579,6 +2668,7 @@ public class QueueImpl implements Queue { this.executor1 = executor; } + @Override public void run() { synchronized (QueueImpl.this) { internalAddRedistributor(executor1); @@ -2595,6 +2685,7 @@ public class QueueImpl implements Queue { */ private final class DeliverRunner implements Runnable { + @Override public void run() { try { // during the transition between paging and nonpaging, we could have this using a different executor @@ -2623,6 +2714,7 @@ public class QueueImpl implements Queue { this.scheduleExpiry = scheduleExpiry; } + @Override public void run() { try { depage(scheduleExpiry); @@ -2650,30 +2742,35 @@ public class QueueImpl implements Queue { this.iter = iter; } + @Override public void close() { synchronized (QueueImpl.this) { iter.close(); } } + @Override public void repeat() { synchronized (QueueImpl.this) { iter.repeat(); } } + @Override public boolean hasNext() { synchronized (QueueImpl.this) { return iter.hasNext(); } } + @Override public MessageReference next() { synchronized (QueueImpl.this) { return iter.next(); } } + @Override public void remove() { synchronized (QueueImpl.this) { iter.remove(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java index cbd3236f23..1a5bcbdf93 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/RoutingContextImpl.java @@ -40,6 +40,7 @@ public final class RoutingContextImpl implements RoutingContext { this.transaction = transaction; } + @Override public void clear() { transaction = null; @@ -48,6 +49,7 @@ public final class RoutingContextImpl implements RoutingContext { queueCount = 0; } + @Override public void addQueue(final SimpleString address, final Queue queue) { RouteContextList listing = getContextListing(address); @@ -75,6 +77,7 @@ public final class RoutingContextImpl implements RoutingContext { return listing == null ? false : listing.isAlreadyAcked(queue); } + @Override public RouteContextList getContextListing(SimpleString address) { RouteContextList listing = map.get(address); if (listing == null) { @@ -84,26 +87,32 @@ public final class RoutingContextImpl implements RoutingContext { return listing; } + @Override public Transaction getTransaction() { return transaction; } + @Override public void setTransaction(final Transaction tx) { transaction = tx; } + @Override public List getNonDurableQueues(SimpleString address) { return getContextListing(address).getNonDurableQueues(); } + @Override public List getDurableQueues(SimpleString address) { return getContextListing(address).getDurableQueues(); } + @Override public int getQueueCount() { return queueCount; } + @Override public Map getContexListing() { return this.map; } @@ -116,10 +125,12 @@ public final class RoutingContextImpl implements RoutingContext { private final List ackedQueues = new ArrayList<>(); + @Override public int getNumberOfDurableQueues() { return durableQueue.size(); } + @Override public int getNumberOfNonDurableQueues() { return nonDurableQueue.size(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerImpl.java index 97ce13e058..9fc5bab800 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerImpl.java @@ -53,6 +53,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { this.scheduledExecutor = scheduledExecutor; } + @Override public boolean checkAndSchedule(final MessageReference ref, final boolean tail) { long deliveryTime = ref.getScheduledDeliveryTime(); @@ -76,12 +77,14 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { } } + @Override public int getScheduledCount() { synchronized (scheduledReferences) { return scheduledReferences.size(); } } + @Override public List getScheduledReferences() { List refs = new LinkedList(); @@ -93,6 +96,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { return refs; } + @Override public List cancel(final Filter filter) { List refs = new ArrayList(); @@ -110,6 +114,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { return refs; } + @Override public MessageReference removeReferenceWithID(final long id) { synchronized (scheduledReferences) { Iterator iter = scheduledReferences.iterator(); @@ -163,6 +168,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { this.deliveryTime = deliveryTime; } + @Override public void run() { HashMap> refs = new HashMap>(); @@ -260,6 +266,7 @@ public class ScheduledDeliveryHandlerImpl implements ScheduledDeliveryHandler { static class MessageReferenceComparator implements Comparator { + @Override public int compare(RefScheduled ref1, RefScheduled ref2) { long diff = ref1.getRef().getScheduledDeliveryTime() - ref2.getRef().getScheduledDeliveryTime(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java index ae30549f36..e74b60eadb 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java @@ -100,6 +100,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { private volatile LargeMessageDeliverer largeMessageDeliverer = null; + @Override public String debug() { return toString() + "::Delivering " + this.deliveringRefs.size(); } @@ -222,34 +223,42 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { // ServerConsumer implementation // ---------------------------------------------------------------------- + @Override public Object getProtocolContext() { return protocolContext; } + @Override public void setProtocolContext(Object protocolContext) { this.protocolContext = protocolContext; } + @Override public long getID() { return id; } + @Override public boolean isBrowseOnly() { return browseOnly; } + @Override public long getCreationTime() { return creationTime; } + @Override public String getConnectionID() { return this.session.getConnectionID().toString(); } + @Override public String getSessionID() { return this.session.getName(); } + @Override public List getDeliveringMessages() { List refs = new LinkedList(); synchronized (lock) { @@ -263,6 +272,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { return refs; } + @Override public HandleStatus handle(final MessageReference ref) throws Exception { if (callback != null && !callback.hasCredits(this) || availableCredits != null && availableCredits.get() <= 0) { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { @@ -349,6 +359,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public void proceedDeliver(MessageReference reference) throws Exception { try { ServerMessage message = reference.getMessage(); @@ -373,6 +384,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public Filter getFilter() { return filter; } @@ -459,11 +471,13 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { * When the consumer receives such a "forced delivery" message, it discards it and knows that * there are no other messages to be delivered. */ + @Override public synchronized void forceDelivery(final long sequence) { promptDelivery(); // JBPAPP-6030 - Using the executor to avoid distributed dead locks messageQueue.getExecutor().execute(new Runnable() { + @Override public void run() { try { // We execute this on the same executor to make sure the force delivery message is written after @@ -473,6 +487,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { if (transferring) { // Case it's transferring (reattach), we will retry later messageQueue.getExecutor().execute(new Runnable() { + @Override public void run() { forceDelivery(sequence); } @@ -496,6 +511,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } + @Override public LinkedList cancelRefs(final boolean failed, final boolean lastConsumedAsDelivered, final Transaction tx) throws Exception { @@ -545,6 +561,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { return refs; } + @Override public void setStarted(final boolean started) { synchronized (lock) { // This is to make sure that the delivery process has finished any pending delivery @@ -564,6 +581,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public void setTransferring(final boolean transferring) { synchronized (lock) { // This is to make sure that the delivery process has finished any pending delivery @@ -599,6 +617,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public void receiveCredits(final int credits) { if (credits == -1) { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { @@ -636,10 +655,12 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public Queue getQueue() { return messageQueue; } + @Override public void acknowledge(Transaction tx, final long messageID) throws Exception { if (browseOnly) { return; @@ -717,6 +738,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public void individualAcknowledge(final Transaction tx, final long messageID) throws Exception { if (browseOnly) { return; @@ -737,6 +759,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { acks++; } + @Override public void individualCancel(final long messageID, boolean failed) throws Exception { if (browseOnly) { return; @@ -755,6 +778,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { ref.getQueue().cancel(ref, System.currentTimeMillis()); } + @Override public MessageReference removeReferenceByID(final long messageID) throws Exception { if (browseOnly) { return null; @@ -787,6 +811,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { } } + @Override public void readyForWriting(final boolean ready) { if (ready) { writeReady.set(true); @@ -813,6 +838,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { return "ServerConsumerImpl [id=" + id + ", filter=" + filter + ", binding=" + binding + "]"; } + @Override public String toManagementString() { return "ServerConsumer [id=" + getConnectionID() + ":" + getSessionID() + ":" + id + ", filter=" + filter + ", binding=" + binding.toManagementString() + "]"; } @@ -833,6 +859,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { // Private -------------------------------------------------------------------------------------- + @Override public void promptDelivery() { // largeMessageDeliverer is always set inside a lock // if we don't acquire a lock, we will have NPE eventually @@ -880,6 +907,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { // ------------------------------------------------------------------------ private final Runnable resumeLargeMessageRunnable = new Runnable() { + @Override public void run() { synchronized (lock) { try { @@ -1068,6 +1096,7 @@ public class ServerConsumerImpl implements ServerConsumer, ReadyListener { iterator.close(); } + @Override public synchronized void run() { // if the reference was busy during the previous iteration, handle it now if (current != null) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java index 8485b51b6c..645d3263ff 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerMessageImpl.java @@ -85,25 +85,30 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { super(other, properties); } + @Override public boolean isServerMessage() { return true; } + @Override public ServerMessageImpl setMessageID(final long id) { messageID = id; return this; } + @Override public MessageReference createReference(final Queue queue) { MessageReference ref = new MessageReferenceImpl(this, queue); return ref; } + @Override public boolean hasInternalProperties() { return properties.hasInternalProperties(); } + @Override public int incrementRefCount() throws Exception { int count = refCount.incrementAndGet(); @@ -119,6 +124,7 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { return count; } + @Override public int decrementRefCount() throws Exception { int count = refCount.decrementAndGet(); @@ -139,24 +145,29 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { return count; } + @Override public int incrementDurableRefCount() { return durableRefCount.incrementAndGet(); } + @Override public int decrementDurableRefCount() { return durableRefCount.decrementAndGet(); } + @Override public int getRefCount() { return refCount.get(); } + @Override public boolean isLargeMessage() { return false; } private volatile int memoryEstimate = -1; + @Override public int getMemoryEstimate() { if (memoryEstimate == -1) { memoryEstimate = ServerMessageImpl.memoryOffset + buffer.capacity() + properties.getMemoryOffset(); @@ -165,6 +176,7 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { return memoryEstimate; } + @Override public ServerMessage copy(final long newID) { ServerMessage m = new ServerMessageImpl(this); @@ -173,9 +185,11 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { return m; } + @Override public void finishCopy() throws Exception { } + @Override public ServerMessage copy() { // This is a simple copy, used only to avoid changing original properties return new ServerMessageImpl(this); @@ -187,6 +201,7 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { return makeCopyForExpiryOrDLA(newID, originalReference, expiry, true); } + @Override public ServerMessage makeCopyForExpiryOrDLA(final long newID, MessageReference originalReference, final boolean expiry, @@ -246,6 +261,7 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { bufferValid = false; } + @Override public void setPagingStore(final PagingStore pagingStore) { this.pagingStore = pagingStore; @@ -254,15 +270,18 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { address = pagingStore.getAddress(); } + @Override public synchronized void forceAddress(final SimpleString address) { this.address = address; bufferValid = false; } + @Override public PagingStore getPagingStore() { return pagingStore; } + @Override public boolean storeIsPaging() { if (pagingStore != null) { return pagingStore.isPaging(); @@ -289,12 +308,14 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { } + @Override public InputStream getBodyInputStream() { return null; } // Encoding stuff + @Override public void encodeMessageIDToBuffer() { // We first set the message id - this needs to be set on the buffer since this buffer will be re-used @@ -318,6 +339,7 @@ public class ServerMessageImpl extends MessageImpl implements ServerMessage { } } + @Override public Object getDuplicateProperty() { return getObjectProperty(Message.HDR_DUPLICATE_DETECTION_ID); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java index 16ec608b48..77345e3ec7 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java @@ -279,35 +279,43 @@ public class ServerSessionImpl implements ServerSession, FailureListener { /** * @return the sessionContext */ + @Override public OperationContext getSessionContext() { return context; } + @Override public String getUsername() { return username; } + @Override public String getPassword() { return password; } + @Override public int getMinLargeMessageSize() { return minLargeMessageSize; } + @Override public String getName() { return name; } + @Override public Object getConnectionID() { return remotingConnection.getID(); } + @Override public Set getServerConsumers() { Set consumersClone = new HashSet(consumers.values()); return Collections.unmodifiableSet(consumersClone); } + @Override public boolean removeConsumer(final long consumerID) throws Exception { return consumers.remove(consumerID) != null; } @@ -370,10 +378,12 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public QueueCreator getQueueCreator() { return queueCreator; } + @Override public ServerConsumer createConsumer(final long consumerID, final SimpleString queueName, final SimpleString filterString, @@ -457,6 +467,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return new ServerConsumerImpl(consumerID, this, (QueueBinding) binding, filter, started, browseOnly, storageManager, callback, preAcknowledge, strictUpdateDeliveryCount, managementService, supportLargeMessage, credits); } + @Override public Queue createQueue(final SimpleString address, final SimpleString name, final SimpleString filterString, @@ -519,6 +530,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { server.createSharedQueue(address, name, filterString, SimpleString.toSimpleString(getUsername()), durable); } + @Override public RemotingConnection getRemotingConnection() { return remotingConnection; } @@ -553,6 +565,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void connectionFailed(ActiveMQException exception, boolean failedOver) { run(); } @@ -562,6 +575,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { connectionFailed(me, failedOver); } + @Override public void connectionClosed() { run(); } @@ -573,6 +587,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } + @Override public void deleteQueue(final SimpleString queueToDelete) throws Exception { Binding binding = postOffice.getBinding(queueToDelete); @@ -591,6 +606,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public QueueQueryResult executeQueueQuery(final SimpleString name) throws Exception { boolean autoCreateJmsQueues = name.toString().startsWith(ResourceNames.JMS_QUEUE) && server.getAddressSettingsRepository().getMatch(name.toString()).isAutoCreateJmsQueues(); @@ -625,6 +641,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return response; } + @Override public BindingQueryResult executeBindingQuery(final SimpleString address) throws Exception { boolean autoCreateJmsQueues = address.toString().startsWith(ResourceNames.JMS_QUEUE) && server.getAddressSettingsRepository().getMatch(address.toString()).isAutoCreateJmsQueues(); @@ -650,6 +667,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return new BindingQueryResult(!names.isEmpty(), names, autoCreateJmsQueues); } + @Override public void forceConsumerDelivery(final long consumerID, final long sequence) throws Exception { ServerConsumer consumer = consumers.get(consumerID); @@ -668,6 +686,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void acknowledge(final long consumerID, final long messageID) throws Exception { ServerConsumer consumer = findConsumer(consumerID); @@ -708,6 +727,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return consumer; } + @Override public void individualAcknowledge(final long consumerID, final long messageID) throws Exception { ServerConsumer consumer = findConsumer(consumerID); @@ -725,6 +745,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } + @Override public void individualCancel(final long consumerID, final long messageID, boolean failed) throws Exception { ServerConsumer consumer = consumers.get(consumerID); @@ -734,6 +755,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } + @Override public void expire(final long consumerID, final long messageID) throws Exception { MessageReference ref = consumers.get(consumerID).removeReferenceByID(messageID); @@ -742,6 +764,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void commit() throws Exception { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("Calling commit"); @@ -761,6 +784,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void rollback(final boolean considerLastMessageAsDelivered) throws Exception { rollback(false, considerLastMessageAsDelivered); } @@ -803,6 +827,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return transactionFactory.newTransaction(xid, storageManager, timeoutSeconds); } + @Override public synchronized void xaCommit(final Xid xid, final boolean onePhase) throws Exception { if (tx != null && tx.getXid().equals(xid)) { @@ -848,6 +873,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaEnd(final Xid xid) throws Exception { if (tx != null && tx.getXid().equals(xid)) { if (tx.getState() == Transaction.State.SUSPENDED) { @@ -891,6 +917,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaForget(final Xid xid) throws Exception { long id = resourceManager.removeHeuristicCompletion(xid); @@ -909,6 +936,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaJoin(final Xid xid) throws Exception { Transaction theTx = resourceManager.getTransaction(xid); @@ -927,6 +955,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaResume(final Xid xid) throws Exception { if (tx != null) { final String msg = "Cannot resume, session is currently doing work in a transaction " + tx.getXid(); @@ -954,6 +983,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaRollback(final Xid xid) throws Exception { if (tx != null && tx.getXid().equals(xid)) { final String msg = "Cannot roll back, session is currently doing work in a transaction " + tx.getXid(); @@ -1011,6 +1041,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaStart(final Xid xid) throws Exception { if (tx != null) { ActiveMQServerLogger.LOGGER.xidReplacedOnXStart(tx.getXid().toString(), xid.toString()); @@ -1044,6 +1075,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaFailed(final Xid xid) throws Exception { Transaction theTX = resourceManager.getTransaction(xid); @@ -1066,6 +1098,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaSuspend() throws Exception { if (isTrace) { @@ -1091,6 +1124,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public synchronized void xaPrepare(final Xid xid) throws Exception { if (tx != null && tx.getXid().equals(xid)) { final String msg = "Cannot commit, session is currently doing work in a transaction " + tx.getXid(); @@ -1123,6 +1157,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public List xaGetInDoubtXids() { List xids = new ArrayList(); @@ -1133,10 +1168,12 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return xids; } + @Override public int xaGetTimeout() { return resourceManager.getTimeoutSeconds(); } + @Override public void xaSetTimeout(final int timeout) { timeoutSeconds = timeout; if (tx != null) { @@ -1144,14 +1181,17 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void start() { setStarted(true); } + @Override public void stop() { setStarted(false); } + @Override public void waitContextCompletion() { try { if (!context.waitCompletion(10000)) { @@ -1163,13 +1203,16 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void close(final boolean failed) { if (closed) return; context.executeOnCompletion(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { try { doClose(failed); @@ -1181,6 +1224,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { }); } + @Override public void closeConsumer(final long consumerID) throws Exception { final ServerConsumer consumer = consumers.get(consumerID); @@ -1192,6 +1236,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void receiveConsumerCredits(final long consumerID, final int credits) throws Exception { ServerConsumer consumer = consumers.get(consumerID); @@ -1212,6 +1257,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return tx; } + @Override public void sendLarge(final MessageInternal message) throws Exception { // need to create the LargeMessage before continue long id = storageManager.generateID(); @@ -1229,6 +1275,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { currentLargeMessage = largeMsg; } + @Override public void send(final ServerMessage message, final boolean direct) throws Exception { //large message may come from StompSession directly, in which //case the id header already generated. @@ -1276,6 +1323,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void sendContinuations(final int packetSize, final long messageBodySize, final byte[] body, @@ -1302,10 +1350,12 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void requestProducerCredits(final SimpleString address, final int credits) throws Exception { PagingStore store = server.getPagingManager().getPageStore(address); if (!store.checkMemory(new Runnable() { + @Override public void run() { callback.sendProducerCreditsMessage(credits, address); } @@ -1314,6 +1364,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void setTransferring(final boolean transferring) { Set consumersClone = new HashSet(consumers.values()); @@ -1322,6 +1373,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public void addMetaData(String key, String data) { if (metaData == null) { metaData = new HashMap(); @@ -1329,6 +1381,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { metaData.put(key, data); } + @Override public boolean addUniqueMetaData(String key, String data) { ServerSession sessionWithMetaData = server.lookupSession(key, data); if (sessionWithMetaData != null && sessionWithMetaData != this) { @@ -1341,6 +1394,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public String getMetaData(String key) { String data = null; if (metaData != null) { @@ -1354,6 +1408,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return data; } + @Override public String[] getTargetAddresses() { Map> copy = cloneTargetAddresses(); Iterator iter = copy.keySet().iterator(); @@ -1367,6 +1422,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { return addresses; } + @Override public String getLastSentMessageID(String address) { Pair value = targetAddressInfos.get(SimpleString.toSimpleString(address)); if (value != null) { @@ -1377,6 +1433,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener { } } + @Override public long getCreationTime() { return this.creationTime; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java index d00e15ec13..46dbd58c86 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServiceRegistryImpl.java @@ -104,6 +104,7 @@ public class ServiceRegistryImpl implements ServiceRegistry { for (final ConnectorServiceConfiguration config : configs) { if (connectorServices.get(config.getConnectorName()) == null) { ConnectorServiceFactory factory = AccessController.doPrivileged(new PrivilegedAction() { + @Override public ConnectorServiceFactory run() { return (ConnectorServiceFactory) ClassloadingUtil.newInstanceFromClassLoader(config.getFactoryClassName()); } @@ -184,6 +185,7 @@ public class ServiceRegistryImpl implements ServiceRegistry { if (factory == null && className != null) { factory = AccessController.doPrivileged(new PrivilegedAction() { + @Override public AcceptorFactory run() { return (AcceptorFactory) ClassloadingUtil.newInstanceFromClassLoader(className); } @@ -206,6 +208,7 @@ public class ServiceRegistryImpl implements ServiceRegistry { if (className != null) { try { transformer = AccessController.doPrivileged(new PrivilegedAction() { + @Override public Transformer run() { return (Transformer) ClassloadingUtil.newInstanceFromClassLoader(className); } @@ -222,6 +225,7 @@ public class ServiceRegistryImpl implements ServiceRegistry { if (classNames != null) { for (final String className : classNames) { BaseInterceptor interceptor = AccessController.doPrivileged(new PrivilegedAction() { + @Override public BaseInterceptor run() { return (BaseInterceptor) ClassloadingUtil.newInstanceFromClassLoader(className); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java index fa8be061be..12e92980d5 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java @@ -91,6 +91,7 @@ public final class SharedNothingBackupActivation extends Activation { replicationEndpoint = new ReplicationEndpoint(activeMQServer, shutdownOnCriticalIO, attemptFailBack, this); } + @Override public void run() { try { synchronized (activeMQServer) { @@ -269,6 +270,7 @@ public final class SharedNothingBackupActivation extends Activation { } } + @Override public void close(final boolean permanently, boolean restarting) throws Exception { synchronized (this) { if (backupQuorum != null) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java index 52d62605a6..8803e2288f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingLiveActivation.java @@ -82,6 +82,7 @@ public class SharedNothingLiveActivation extends LiveActivation { } } + @Override public void run() { try { if (replicatedPolicy.isCheckForLiveServer() && isNodeIdUsed()) { @@ -155,6 +156,7 @@ public class SharedNothingLiveActivation extends LiveActivation { replicationManager = new ReplicationManager(rc, activeMQServer.getExecutorFactory()); replicationManager.start(); Thread t = new Thread(new Runnable() { + @Override public void run() { try { activeMQServer.getStorageManager().startReplication(replicationManager, activeMQServer.getPagingManager(), activeMQServer.getNodeID().toString(), isFailBackRequest && replicatedPolicy.isAllowAutoFailBack(), replicatedPolicy.getInitialReplicationSyncTimeout()); @@ -229,6 +231,7 @@ public class SharedNothingLiveActivation extends LiveActivation { @Override public void connectionClosed() { activeMQServer.getThreadPool().execute(new Runnable() { + @Override public void run() { synchronized (replicationLock) { if (replicationManager != null) { @@ -300,6 +303,7 @@ public class SharedNothingLiveActivation extends LiveActivation { } } + @Override public void close(boolean permanently, boolean restarting) throws Exception { replicationManager = null; @@ -334,6 +338,7 @@ public class SharedNothingLiveActivation extends LiveActivation { } } + @Override public ReplicationManager getReplicationManager() { synchronized (replicationLock) { return replicationManager; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java index 0aee108391..7f22ab14c9 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreBackupActivation.java @@ -52,6 +52,7 @@ public final class SharedStoreBackupActivation extends Activation { } } + @Override public void run() { try { activeMQServer.getNodeManager().startBackup(); @@ -131,6 +132,7 @@ public final class SharedStoreBackupActivation extends Activation { } } + @Override public void close(boolean permanently, boolean restarting) throws Exception { if (!restarting) { synchronized (failbackCheckerGuard) { @@ -200,6 +202,7 @@ public final class SharedStoreBackupActivation extends Activation { private boolean restarting = false; + @Override public void run() { try { if (!restarting && activeMQServer.getNodeManager().isAwaitingFailback()) { @@ -207,6 +210,7 @@ public final class SharedStoreBackupActivation extends Activation { ActiveMQServerLogger.LOGGER.awaitFailBack(); restarting = true; Thread t = new Thread(new Runnable() { + @Override public void run() { try { ActiveMQServerLogger.LOGGER.debug(activeMQServer + "::Stopping live node in favor of failback"); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreLiveActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreLiveActivation.java index f48bb6c334..868be2ed59 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreLiveActivation.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreLiveActivation.java @@ -32,6 +32,7 @@ public final class SharedStoreLiveActivation extends LiveActivation { this.sharedStoreMasterPolicy = sharedStoreMasterPolicy; } + @Override public void run() { try { ActiveMQServerLogger.LOGGER.awaitingLiveLock(); @@ -74,6 +75,7 @@ public final class SharedStoreLiveActivation extends LiveActivation { } } + @Override public void close(boolean permanently, boolean restarting) throws Exception { // TO avoid a NPE from stop NodeManager nodeManagerInUse = activeMQServer.getNodeManager(); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java index cec94bd0c5..1b7011c56b 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/TransientQueueManagerImpl.java @@ -30,6 +30,7 @@ public class TransientQueueManagerImpl implements TransientQueueManager { private final ActiveMQServer server; private final Runnable runnable = new Runnable() { + @Override public void run() { try { if (ActiveMQServerLogger.LOGGER.isDebugEnabled()) { diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java index e95258c8ec..053f81dbd6 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java @@ -149,18 +149,22 @@ public class ManagementServiceImpl implements ManagementService { // ManagementService implementation ------------------------- + @Override public ObjectNameBuilder getObjectNameBuilder() { return objectNameBuilder; } + @Override public MessageCounterManager getMessageCounterManager() { return messageCounterManager; } + @Override public void setStorageManager(final StorageManager storageManager) { this.storageManager = storageManager; } + @Override public ActiveMQServerControlImpl registerServer(final PostOffice postOffice, final StorageManager storageManager1, final Configuration configuration, @@ -192,12 +196,14 @@ public class ManagementServiceImpl implements ManagementService { return messagingServerControl; } + @Override public synchronized void unregisterServer() throws Exception { ObjectName objectName = objectNameBuilder.getActiveMQServerObjectName(); unregisterFromJMX(objectName); unregisterFromRegistry(ResourceNames.CORE_SERVER); } + @Override public synchronized void registerAddress(final SimpleString address) throws Exception { ObjectName objectName = objectNameBuilder.getAddressObjectName(address); AddressControlImpl addressControl = new AddressControlImpl(address, postOffice, pagingManager, storageManager, securityRepository); @@ -211,6 +217,7 @@ public class ManagementServiceImpl implements ManagementService { } } + @Override public synchronized void unregisterAddress(final SimpleString address) throws Exception { ObjectName objectName = objectNameBuilder.getAddressObjectName(address); @@ -218,6 +225,7 @@ public class ManagementServiceImpl implements ManagementService { unregisterFromRegistry(ResourceNames.CORE_ADDRESS + address); } + @Override public synchronized void registerQueue(final Queue queue, final SimpleString address, final StorageManager storageManager) throws Exception { @@ -236,6 +244,7 @@ public class ManagementServiceImpl implements ManagementService { } } + @Override public synchronized void unregisterQueue(final SimpleString name, final SimpleString address) throws Exception { ObjectName objectName = objectNameBuilder.getQueueObjectName(address, name); unregisterFromJMX(objectName); @@ -243,6 +252,7 @@ public class ManagementServiceImpl implements ManagementService { messageCounterManager.unregisterMessageCounter(name.toString()); } + @Override public synchronized void registerDivert(final Divert divert, final DivertConfiguration config) throws Exception { ObjectName objectName = objectNameBuilder.getDivertObjectName(divert.getUniqueName().toString()); DivertControl divertControl = new DivertControlImpl(divert, storageManager, config); @@ -254,12 +264,14 @@ public class ManagementServiceImpl implements ManagementService { } } + @Override public synchronized void unregisterDivert(final SimpleString name) throws Exception { ObjectName objectName = objectNameBuilder.getDivertObjectName(name.toString()); unregisterFromJMX(objectName); unregisterFromRegistry(ResourceNames.CORE_DIVERT + name); } + @Override public synchronized void registerAcceptor(final Acceptor acceptor, final TransportConfiguration configuration) throws Exception { ObjectName objectName = objectNameBuilder.getAcceptorObjectName(configuration.getName()); @@ -268,6 +280,7 @@ public class ManagementServiceImpl implements ManagementService { registerInRegistry(ResourceNames.CORE_ACCEPTOR + configuration.getName(), control); } + @Override public void unregisterAcceptors() { List acceptors = new ArrayList(); synchronized (this) { @@ -295,6 +308,7 @@ public class ManagementServiceImpl implements ManagementService { unregisterFromRegistry(ResourceNames.CORE_ACCEPTOR + name); } + @Override public synchronized void registerBroadcastGroup(final BroadcastGroup broadcastGroup, final BroadcastGroupConfiguration configuration) throws Exception { broadcastGroup.setNotificationService(this); @@ -304,12 +318,14 @@ public class ManagementServiceImpl implements ManagementService { registerInRegistry(ResourceNames.CORE_BROADCAST_GROUP + configuration.getName(), control); } + @Override public synchronized void unregisterBroadcastGroup(final String name) throws Exception { ObjectName objectName = objectNameBuilder.getBroadcastGroupObjectName(name); unregisterFromJMX(objectName); unregisterFromRegistry(ResourceNames.CORE_BROADCAST_GROUP + name); } + @Override public synchronized void registerBridge(final Bridge bridge, final BridgeConfiguration configuration) throws Exception { bridge.setNotificationService(this); @@ -319,12 +335,14 @@ public class ManagementServiceImpl implements ManagementService { registerInRegistry(ResourceNames.CORE_BRIDGE + configuration.getName(), control); } + @Override public synchronized void unregisterBridge(final String name) throws Exception { ObjectName objectName = objectNameBuilder.getBridgeObjectName(name); unregisterFromJMX(objectName); unregisterFromRegistry(ResourceNames.CORE_BRIDGE + name); } + @Override public synchronized void registerCluster(final ClusterConnection cluster, final ClusterConnectionConfiguration configuration) throws Exception { ObjectName objectName = objectNameBuilder.getClusterConnectionObjectName(configuration.getName()); @@ -333,12 +351,14 @@ public class ManagementServiceImpl implements ManagementService { registerInRegistry(ResourceNames.CORE_CLUSTER_CONNECTION + configuration.getName(), control); } + @Override public synchronized void unregisterCluster(final String name) throws Exception { ObjectName objectName = objectNameBuilder.getClusterConnectionObjectName(name); unregisterFromJMX(objectName); unregisterFromRegistry(ResourceNames.CORE_CLUSTER_CONNECTION + name); } + @Override public ServerMessage handleMessage(final ServerMessage message) throws Exception { // a reply message is sent with the result stored in the message body. ServerMessage reply = new ServerMessageImpl(storageManager.generateID(), 512); @@ -404,10 +424,12 @@ public class ManagementServiceImpl implements ManagementService { return reply; } + @Override public synchronized Object getResource(final String resourceName) { return registry.get(resourceName); } + @Override public synchronized Object[] getResources(final Class resourceType) { List resources = new ArrayList(); Collection clone = new ArrayList(registry.values()); @@ -421,6 +443,7 @@ public class ManagementServiceImpl implements ManagementService { private final Set registeredNames = new HashSet(); + @Override public void registerInJMX(final ObjectName objectName, final Object managedResource) throws Exception { if (!jmxManagementEnabled) { return; @@ -435,12 +458,14 @@ public class ManagementServiceImpl implements ManagementService { } } + @Override public synchronized void registerInRegistry(final String resourceName, final Object managedResource) { unregisterFromRegistry(resourceName); registry.put(resourceName, managedResource); } + @Override public synchronized void unregisterFromRegistry(final String resourceName) { registry.remove(resourceName); } @@ -448,6 +473,7 @@ public class ManagementServiceImpl implements ManagementService { // the JMX unregistration is synchronized to avoid race conditions if 2 clients tries to // unregister the same resource (e.g. a queue) at the same time since unregisterMBean() // will throw an exception if the MBean has already been unregistered + @Override public void unregisterFromJMX(final ObjectName objectName) throws MBeanRegistrationException, InstanceNotFoundException { if (!jmxManagementEnabled) { return; @@ -462,24 +488,29 @@ public class ManagementServiceImpl implements ManagementService { } } + @Override public void addNotificationListener(final NotificationListener listener) { listeners.add(listener); } + @Override public void removeNotificationListener(final NotificationListener listener) { listeners.remove(listener); } + @Override public SimpleString getManagementAddress() { return managementAddress; } + @Override public SimpleString getManagementNotificationAddress() { return managementNotificationAddress; } // ActiveMQComponent implementation ----------------------------- + @Override public void start() throws Exception { if (messageCounterEnabled) { messageCounterManager.start(); @@ -488,6 +519,7 @@ public class ManagementServiceImpl implements ManagementService { started = true; } + @Override public synchronized void stop() throws Exception { Set resourceNames = new HashSet(registry.keySet()); @@ -555,10 +587,12 @@ public class ManagementServiceImpl implements ManagementService { started = false; } + @Override public boolean isStarted() { return started; } + @Override public void sendNotification(final Notification notification) throws Exception { if (isTrace) { ActiveMQServerLogger.LOGGER.trace("Sending Notification = " + notification + @@ -624,6 +658,7 @@ public class ManagementServiceImpl implements ManagementService { } } + @Override public void enableNotifications(final boolean enabled) { notificationsEnabled = enabled; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java index b0bfbf4dee..313dabf8ce 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/AddressSettings.java @@ -324,6 +324,7 @@ public class AddressSettings implements Mergeable, Serializable * * @param merged */ + @Override public void merge(final AddressSettings merged) { if (maxDeliveryAttempts == null) { maxDeliveryAttempts = merged.maxDeliveryAttempts; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/HierarchicalObjectRepository.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/HierarchicalObjectRepository.java index 80bba6be22..fa2029389b 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/HierarchicalObjectRepository.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/HierarchicalObjectRepository.java @@ -114,10 +114,12 @@ public class HierarchicalObjectRepository implements HierarchicalRepository values() { lock.readLock().lock(); try { @@ -140,6 +142,7 @@ public class HierarchicalObjectRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository implements HierarchicalRepository * Any verification has to be done on before prepare */ + @Override public void afterPrepare(Transaction tx) { } + @Override public void beforeCommit(Transaction tx) throws Exception { } @@ -47,9 +50,11 @@ public abstract class TransactionOperationAbstract implements TransactionOperati *

* Any verification has to be done on before commit */ + @Override public void afterCommit(Transaction tx) { } + @Override public void beforeRollback(Transaction tx) throws Exception { } @@ -58,6 +63,7 @@ public abstract class TransactionOperationAbstract implements TransactionOperati *

* Any verification has to be done on before rollback */ + @Override public void afterRollback(Transaction tx) { } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/BindingsTransactionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/BindingsTransactionImpl.java index f72beb18e8..50dff64d70 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/BindingsTransactionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/BindingsTransactionImpl.java @@ -29,6 +29,7 @@ public class BindingsTransactionImpl extends TransactionImpl { /** * @throws Exception */ + @Override protected void doCommit() throws Exception { if (isContainsPersistent()) { storageManager.commitBindings(getID()); diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java index 0d420ffe2e..e811dd0ccc 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java @@ -91,22 +91,27 @@ public class ResourceManagerImpl implements ResourceManager { // ResourceManager implementation --------------------------------------------- + @Override public Transaction getTransaction(final Xid xid) { return transactions.get(xid); } + @Override public boolean putTransaction(final Xid xid, final Transaction tx) { return transactions.putIfAbsent(xid, tx) == null; } + @Override public Transaction removeTransaction(final Xid xid) { return transactions.remove(xid); } + @Override public int getTimeoutSeconds() { return defaultTimeoutSeconds; } + @Override public List getPreparedTransactions() { List xids = new ArrayList(); @@ -118,6 +123,7 @@ public class ResourceManagerImpl implements ResourceManager { return xids; } + @Override public Map getPreparedTransactionsWithCreationTime() { Map xidsWithCreationTime = new HashMap(); @@ -127,18 +133,22 @@ public class ResourceManagerImpl implements ResourceManager { return xidsWithCreationTime; } + @Override public void putHeuristicCompletion(final long recordID, final Xid xid, final boolean isCommit) { heuristicCompletions.add(new HeuristicCompletionHolder(recordID, xid, isCommit)); } + @Override public List getHeuristicCommittedTransactions() { return getHeuristicCompletedTransactions(true); } + @Override public List getHeuristicRolledbackTransactions() { return getHeuristicCompletedTransactions(false); } + @Override public long removeHeuristicCompletion(final Xid xid) { Iterator iterator = heuristicCompletions.iterator(); while (iterator.hasNext()) { @@ -167,6 +177,7 @@ public class ResourceManagerImpl implements ResourceManager { private Future future; + @Override public void run() { if (closed) { return; diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java index 5b7d255d47..6ff65657ce 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java @@ -103,19 +103,23 @@ public class TransactionImpl implements Transaction { // Transaction implementation // ----------------------------------------------------------- + @Override public boolean isEffective() { return state == State.PREPARED || state == State.COMMITTED; } + @Override public void setContainsPersistent() { containsPersistent = true; } + @Override public boolean isContainsPersistent() { return containsPersistent; } + @Override public void setTimeout(final int timeout) { this.timeoutSeconds = timeout; } @@ -125,14 +129,17 @@ public class TransactionImpl implements Transaction { return new RefsOperation(queue, storageManager); } + @Override public long getID() { return id; } + @Override public long getCreateTime() { return createTime; } + @Override public boolean hasTimedOut(final long currentTime, final int defaultTimeout) { if (timeoutSeconds == -1) { return getState() != Transaction.State.PREPARED && currentTime > createTime + defaultTimeout * 1000; @@ -142,6 +149,7 @@ public class TransactionImpl implements Transaction { } } + @Override public void prepare() throws Exception { storageManager.readLock(); try { @@ -184,10 +192,12 @@ public class TransactionImpl implements Transaction { // to execute this runnable in the correct order storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.ioErrorOnTX(errorCode, errorMessage); } + @Override public void done() { afterPrepare(); } @@ -199,10 +209,12 @@ public class TransactionImpl implements Transaction { } } + @Override public void commit() throws Exception { commit(true); } + @Override public void commit(final boolean onePhase) throws Exception { synchronized (timeoutLock) { if (state == State.COMMITTED) { @@ -244,10 +256,12 @@ public class TransactionImpl implements Transaction { // If the IO finished early by the time we got here, we won't need an executor storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.ioErrorOnTX(errorCode, errorMessage); } + @Override public void done() { afterCommit(); } @@ -269,6 +283,7 @@ public class TransactionImpl implements Transaction { state = State.COMMITTED; } + @Override public void rollback() throws Exception { synchronized (timeoutLock) { if (state == State.ROLLEDBACK) { @@ -297,10 +312,12 @@ public class TransactionImpl implements Transaction { // to execute this runnable in the correct order storageManager.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { ActiveMQServerLogger.LOGGER.ioErrorOnTX(errorCode, errorMessage); } + @Override public void done() { afterRollback(); } @@ -308,6 +325,7 @@ public class TransactionImpl implements Transaction { } } + @Override public void suspend() { synchronized (timeoutLock) { if (state != State.ACTIVE) { @@ -317,6 +335,7 @@ public class TransactionImpl implements Transaction { } } + @Override public void resume() { synchronized (timeoutLock) { if (state != State.SUSPENDED) { @@ -326,18 +345,22 @@ public class TransactionImpl implements Transaction { } } + @Override public Transaction.State getState() { return state; } + @Override public void setState(final State state) { this.state = state; } + @Override public Xid getXid() { return xid; } + @Override public void markAsRollbackOnly(final ActiveMQException exception1) { synchronized (timeoutLock) { if (isEffective()) { @@ -354,6 +377,7 @@ public class TransactionImpl implements Transaction { } } + @Override public synchronized void addOperation(final TransactionOperation operation) { checkCreateOperations(); @@ -366,10 +390,12 @@ public class TransactionImpl implements Transaction { return operations.size(); } + @Override public synchronized List getAllOperations() { return new ArrayList(operations); } + @Override public void putProperty(final int index, final Object property) { if (index >= properties.length) { Object[] newProperties = new Object[index]; @@ -382,6 +408,7 @@ public class TransactionImpl implements Transaction { properties[index] = property; } + @Override public Object getProperty(final int index) { return properties[index]; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java index b60d8b0dd5..ba869eda83 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java @@ -46,6 +46,7 @@ public class ActiveMQSecurityManagerImpl implements ActiveMQSecurityManager { // Public --------------------------------------------------------------------- + @Override public boolean validateUser(final String username, final String password) { if (username != null) { User user = configuration.getUser(username); @@ -62,6 +63,7 @@ public class ActiveMQSecurityManagerImpl implements ActiveMQSecurityManager { } } + @Override public boolean validateUserAndRole(final String user, final String password, final Set roles, diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java index 89b80db29b..a83ce0dbfd 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java @@ -74,6 +74,7 @@ public class PropertiesLoader { return other instanceof FileNameKey && this.absPath.equals(((FileNameKey) other).absPath); } + @Override public int hashCode() { return this.absPath.hashCode(); } @@ -115,6 +116,7 @@ public class PropertiesLoader { return baseDir; } + @Override public String toString() { return "PropsFile=" + absPath; } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/InVMAcceptorTransportConfigurationSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/InVMAcceptorTransportConfigurationSchema.java index 309a87871c..72ec88ed0c 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/InVMAcceptorTransportConfigurationSchema.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/InVMAcceptorTransportConfigurationSchema.java @@ -20,6 +20,7 @@ import org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory; public class InVMAcceptorTransportConfigurationSchema extends InVMTransportConfigurationSchema { + @Override protected String getFactoryName() { return InVMAcceptorFactory.class.getName(); } diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/TCPAcceptorTransportConfigurationSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/TCPAcceptorTransportConfigurationSchema.java index 7b11a95e76..ecd5ea44f8 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/TCPAcceptorTransportConfigurationSchema.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/TCPAcceptorTransportConfigurationSchema.java @@ -27,6 +27,7 @@ public class TCPAcceptorTransportConfigurationSchema extends TCPTransportConfigu super(allowableProperties); } + @Override public String getFactoryName(URI uri) { return NettyAcceptorFactory.class.getName(); } diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/GuestLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/GuestLoginModuleTest.java index 54e743a3d7..651bf77e2f 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/GuestLoginModuleTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/GuestLoginModuleTest.java @@ -46,6 +46,7 @@ public class GuestLoginModuleTest extends Assert { @Test public void testLogin() throws LoginException { LoginContext context = new LoginContext("GuestLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { assertEquals("Should have no Callbacks", 0, callbacks.length); } @@ -69,6 +70,7 @@ public class GuestLoginModuleTest extends Assert { @Test public void testLoginWithDefaults() throws LoginException { LoginContext context = new LoginContext("GuestLoginWithDefaults", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { assertEquals("Should have no Callbacks", 0, callbacks.length); } diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java index f9bcbefae3..758eee1dee 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPLoginModuleTest.java @@ -102,6 +102,7 @@ public class LDAPLoginModuleTest extends AbstractLdapTestUnit { @Test public void testLogin() throws LoginException { LoginContext context = new LoginContext("LDAPLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { @@ -123,6 +124,7 @@ public class LDAPLoginModuleTest extends AbstractLdapTestUnit { @Test public void testUnauthenticated() throws LoginException { LoginContext context = new LoginContext("UnAuthenticatedLDAPLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java index b63f89d2fd..0aa13a8849 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/LDAPModuleRoleExpansionTest.java @@ -102,6 +102,7 @@ public class LDAPModuleRoleExpansionTest extends AbstractLdapTestUnit { @Test public void testRoleExpansion() throws LoginException { LoginContext context = new LoginContext("ExpandedLDAPLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleTest.java index 5aec37f728..b1f08a6d92 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/PropertiesLoginModuleTest.java @@ -49,6 +49,7 @@ public class PropertiesLoginModuleTest extends Assert { @Test public void testLogin() throws LoginException { LoginContext context = new LoginContext("PropertiesLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { @@ -79,6 +80,7 @@ public class PropertiesLoginModuleTest extends Assert { @Test public void testBadUseridLogin() throws Exception { LoginContext context = new LoginContext("PropertiesLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { @@ -105,6 +107,7 @@ public class PropertiesLoginModuleTest extends Assert { @Test public void testBadPWLogin() throws Exception { LoginContext context = new LoginContext("PropertiesLogin", new CallbackHandler() { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof NameCallback) { diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubCertificateLoginModule.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubCertificateLoginModule.java index 6474f24481..efae04bc2e 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubCertificateLoginModule.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubCertificateLoginModule.java @@ -35,11 +35,13 @@ public class StubCertificateLoginModule extends CertificateLoginModule { this.groupNames = groupNames; } + @Override protected String getUserNameForCertificates(X509Certificate[] certs) throws LoginException { lastCertChain = certs; return userName; } + @Override protected Set getUserRoles(String username) throws LoginException { lastUserName = username; return this.groupNames; diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubX509Certificate.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubX509Certificate.java index 72295f11d8..d59a12acd6 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubX509Certificate.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/security/jaas/StubX509Certificate.java @@ -31,33 +31,41 @@ public class StubX509Certificate extends X509Certificate { this.id = id; } + @Override public Principal getSubjectDN() { return this.id; } // --- Stubbed Methods --- + @Override public void checkValidity() { } + @Override public void checkValidity(Date arg0) { } + @Override public int getVersion() { return 0; } + @Override public BigInteger getSerialNumber() { return null; } + @Override public Principal getIssuerDN() { return null; } + @Override public Date getNotBefore() { return null; } + @Override public Date getNotAfter() { return null; } @@ -70,14 +78,17 @@ public class StubX509Certificate extends X509Certificate { return null; } + @Override public String getSigAlgName() { return null; } + @Override public String getSigAlgOID() { return null; } + @Override public byte[] getSigAlgParams() { return null; } @@ -98,20 +109,25 @@ public class StubX509Certificate extends X509Certificate { return 0; } + @Override public byte[] getEncoded() { return null; } + @Override public void verify(PublicKey arg0) { } + @Override public void verify(PublicKey arg0, String arg1) { } + @Override public String toString() { return null; } + @Override public PublicKey getPublicKey() { return null; } diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java index b01b271099..c309db0cac 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/group/impl/ClusteredResetMockTest.java @@ -148,6 +148,7 @@ public class ClusteredResetMockTest extends ActiveMQTestBase { this.handler = handler; } + @Override public void run() { Proposal proposal = new Proposal(code, ANYCLUSTER); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java index b18be4ac27..c6af9a7772 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java @@ -198,6 +198,7 @@ public class ScheduledDeliveryHandlerTest extends Assert { class ProducerThread implements Runnable { + @Override public void run() { try { for (int i = 0; i < NUMBER_OF_MESSAGES; i++) { diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java index a5266d57d8..c738f049db 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java @@ -251,6 +251,7 @@ public class RepositoryTest extends ActiveMQTestBase { this.id = id; } + @Override public void merge(final Object merged) { DummyMergeable.timesMerged++; DummyMergeable.merged.add(id); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java index 3765e60bd3..b8cd129640 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java @@ -1753,37 +1753,47 @@ public abstract class ActiveMQTestBase extends Assert { return value; } + @Override public void onReadUpdateRecordTX(long transactionID, RecordInfo recordInfo) throws Exception { getType(recordInfo.getUserRecordType()).incrementAndGet(); } + @Override public void onReadUpdateRecord(RecordInfo recordInfo) throws Exception { getType(recordInfo.getUserRecordType()).incrementAndGet(); } + @Override public void onReadAddRecordTX(long transactionID, RecordInfo recordInfo) throws Exception { getType(recordInfo.getUserRecordType()).incrementAndGet(); } + @Override public void onReadAddRecord(RecordInfo recordInfo) throws Exception { getType(recordInfo.getUserRecordType()).incrementAndGet(); } + @Override public void onReadRollbackRecord(long transactionID) throws Exception { } + @Override public void onReadPrepareRecord(long transactionID, byte[] extraData, int numberOfRecords) throws Exception { } + @Override public void onReadDeleteRecordTX(long transactionID, RecordInfo recordInfo) throws Exception { } + @Override public void onReadDeleteRecord(long recordID) throws Exception { } + @Override public void onReadCommitRecord(long transactionID, int numberOfRecords) throws Exception { } + @Override public void markAsDataFile(JournalFile file0) { } } @@ -2486,6 +2496,7 @@ public abstract class ActiveMQTestBase extends Assert { this.run = run; } + @Override public void run() { try { runner.run(); @@ -2553,6 +2564,7 @@ public abstract class ActiveMQTestBase extends Assert { this.finalized = finalized; } + @Override public void finalize() throws Throwable { finalized.countDown(); super.finalize(); diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/RemoveFolder.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/RemoveFolder.java index a44ab16b93..e1d0122ce0 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/RemoveFolder.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/RemoveFolder.java @@ -35,6 +35,7 @@ public class RemoveFolder extends ExternalResource { /** * Override to tear down your specific external resource. */ + @Override protected void after() { ActiveMQTestBase.deleteDirectory(new File(folderName)); } diff --git a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java index bb1b53330f..e00b49e4d1 100644 --- a/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java +++ b/artemis-service-extensions/src/main/java/org/apache/activemq/artemis/service/extensions/xa/recovery/ActiveMQXAResourceWrapper.java @@ -65,6 +65,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public Xid[] recover(final int flag) throws XAException { XAResource xaResource = getDelegate(false); @@ -87,6 +88,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public void commit(final Xid xid, final boolean onePhase) throws XAException { XAResource xaResource = getDelegate(true); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -100,6 +102,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public void rollback(final Xid xid) throws XAException { XAResource xaResource = getDelegate(true); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -113,6 +116,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public void forget(final Xid xid) throws XAException { XAResource xaResource = getDelegate(false); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -127,6 +131,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public boolean isSameRM(XAResource xaRes) throws XAException { if (xaRes instanceof ActiveMQXAResourceWrapper) { xaRes = ((ActiveMQXAResourceWrapper) xaRes).getDelegate(false); @@ -141,6 +146,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public int prepare(final Xid xid) throws XAException { XAResource xaResource = getDelegate(true); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -154,6 +160,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public void start(final Xid xid, final int flags) throws XAException { XAResource xaResource = getDelegate(false); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -167,6 +174,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public void end(final Xid xid, final int flags) throws XAException { XAResource xaResource = getDelegate(false); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -180,6 +188,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public int getTransactionTimeout() throws XAException { XAResource xaResource = getDelegate(false); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -193,6 +202,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public boolean setTransactionTimeout(final int seconds) throws XAException { XAResource xaResource = getDelegate(false); if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -206,6 +216,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList } } + @Override public void connectionFailed(final ActiveMQException me, boolean failedOver) { if (me.getType() == ActiveMQExceptionType.DISCONNECTED) { if (ActiveMQXARecoveryLogger.LOGGER.isDebugEnabled()) { @@ -223,6 +234,7 @@ public class ActiveMQXAResourceWrapper implements XAResource, SessionFailureList connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException me) { } diff --git a/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java b/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java index 25565dab2b..23fa462b40 100644 --- a/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java +++ b/artemis-web/src/main/java/org/apache/activemq/artemis/component/WebServerComponent.java @@ -74,16 +74,19 @@ public class WebServerComponent implements ExternalComponent { server.setHandler(handlers); } + @Override public void start() throws Exception { server.start(); System.out.println("HTTP Server started at " + webServerConfig.bind); } + @Override public void stop() throws Exception { server.stop(); } + @Override public boolean isStarted() { return server != null && server.isStarted(); } diff --git a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java index 8532e36052..f1d2abdfca 100644 --- a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java +++ b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java @@ -112,6 +112,7 @@ public class WebServerComponentTest extends Assert { } } + @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { cause.printStackTrace(); ctx.close(); diff --git a/examples/features/ha/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java b/examples/features/ha/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java index 2d0dc0c8de..d4ab658002 100644 --- a/examples/features/ha/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java +++ b/examples/features/ha/application-layer-failover/src/main/java/org/apache/activemq/artemis/jms/example/ApplicationLayerFailoverExample.java @@ -176,6 +176,7 @@ public class ApplicationLayerFailoverExample { private static class ExampleListener implements ExceptionListener { + @Override public void onException(final JMSException exception) { try { connection.close(); diff --git a/examples/features/ha/client-side-failoverlistener/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideFailoverListerExample.java b/examples/features/ha/client-side-failoverlistener/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideFailoverListerExample.java index 4dcfd87750..335da0d445 100644 --- a/examples/features/ha/client-side-failoverlistener/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideFailoverListerExample.java +++ b/examples/features/ha/client-side-failoverlistener/src/main/java/org/apache/activemq/artemis/jms/example/ClientSideFailoverListerExample.java @@ -122,6 +122,7 @@ public class ClientSideFailoverListerExample { private static class FailoverListenerImpl implements FailoverEventListener { + @Override public void failoverEvent(FailoverEventType eventType) { System.out.println("Failover event triggered :" + eventType.toString()); } diff --git a/examples/features/perf/perf/src/main/java/org/apache/activemq/artemis/jms/example/PerfBase.java b/examples/features/perf/perf/src/main/java/org/apache/activemq/artemis/jms/example/PerfBase.java index 006d4950f8..1711e5080b 100644 --- a/examples/features/perf/perf/src/main/java/org/apache/activemq/artemis/jms/example/PerfBase.java +++ b/examples/features/perf/perf/src/main/java/org/apache/activemq/artemis/jms/example/PerfBase.java @@ -377,6 +377,7 @@ public abstract class PerfBase { modulo = 2000; } + @Override public void onMessage(final Message message) { try { if (warmingUp) { diff --git a/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakReceiver.java b/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakReceiver.java index ce39968b93..fe0905fe63 100644 --- a/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakReceiver.java +++ b/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakReceiver.java @@ -71,6 +71,7 @@ public class SoakReceiver { private final SoakParams perfParams; private final ExceptionListener exceptionListener = new ExceptionListener() { + @Override public void onException(final JMSException e) { disconnect(); connect(); @@ -86,6 +87,7 @@ public class SoakReceiver { long moduloStart = start; + @Override public void onMessage(final Message msg) { long totalDuration = System.currentTimeMillis() - start; diff --git a/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakSender.java b/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakSender.java index 10fbbd889b..d5868ea867 100644 --- a/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakSender.java +++ b/examples/features/perf/soak/src/main/java/org/apache/activemq/artemis/jms/soak/example/SoakSender.java @@ -67,6 +67,7 @@ public class SoakSender { private MessageProducer producer; private final ExceptionListener exceptionListener = new ExceptionListener() { + @Override public void onException(final JMSException e) { System.out.println("SoakReconnectableSender.exceptionListener.new ExceptionListener() {...}.onException()"); disconnect(); diff --git a/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java b/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java index ae8cf39b6e..d7a7bdcd47 100644 --- a/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java +++ b/examples/features/standard/bridge/src/main/java/org/apache/activemq/artemis/jms/example/HatColourChangeTransformer.java @@ -22,6 +22,7 @@ import org.apache.activemq.artemis.core.server.cluster.Transformer; public class HatColourChangeTransformer implements Transformer { + @Override public ServerMessage transform(final ServerMessage message) { SimpleString propName = new SimpleString("hat"); diff --git a/examples/features/standard/divert/src/main/java/org/apache/activemq/artemis/jms/example/AddForwardingTimeTransformer.java b/examples/features/standard/divert/src/main/java/org/apache/activemq/artemis/jms/example/AddForwardingTimeTransformer.java index 15d8e65f4d..22272d03b1 100644 --- a/examples/features/standard/divert/src/main/java/org/apache/activemq/artemis/jms/example/AddForwardingTimeTransformer.java +++ b/examples/features/standard/divert/src/main/java/org/apache/activemq/artemis/jms/example/AddForwardingTimeTransformer.java @@ -22,6 +22,7 @@ import org.apache.activemq.artemis.core.server.cluster.Transformer; public class AddForwardingTimeTransformer implements Transformer { + @Override public ServerMessage transform(final ServerMessage message) { message.putLongProperty(new SimpleString("time_of_forward"), System.currentTimeMillis()); diff --git a/examples/features/standard/interceptor-client/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java b/examples/features/standard/interceptor-client/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java index 5d00f37900..fb6e86b58e 100644 --- a/examples/features/standard/interceptor-client/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java +++ b/examples/features/standard/interceptor-client/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; */ public class SimpleInterceptor implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { System.out.println("SimpleInterceptor gets called!"); System.out.println("Packet: " + packet.getClass().getName()); diff --git a/examples/features/standard/interceptor/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java b/examples/features/standard/interceptor/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java index 6836930990..c4af44110b 100644 --- a/examples/features/standard/interceptor/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java +++ b/examples/features/standard/interceptor/src/main/java/org/apache/activemq/artemis/jms/example/SimpleInterceptor.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; */ public class SimpleInterceptor implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { System.out.println("SimpleInterceptor gets called!"); System.out.println("Packet: " + packet.getClass().getName()); diff --git a/examples/features/standard/management-notifications/src/main/java/org/apache/activemq/artemis/jms/example/ManagementNotificationExample.java b/examples/features/standard/management-notifications/src/main/java/org/apache/activemq/artemis/jms/example/ManagementNotificationExample.java index 5fc00cf550..fed21b0705 100644 --- a/examples/features/standard/management-notifications/src/main/java/org/apache/activemq/artemis/jms/example/ManagementNotificationExample.java +++ b/examples/features/standard/management-notifications/src/main/java/org/apache/activemq/artemis/jms/example/ManagementNotificationExample.java @@ -60,6 +60,7 @@ public class ManagementNotificationExample { // It will display all the properties of the JMS Message MessageConsumer notificationConsumer = session.createConsumer(notificationsTopic); notificationConsumer.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message notif) { System.out.println("------------------------"); System.out.println("Received notification:"); diff --git a/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java b/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java index c614860e4e..88b75e4bcc 100644 --- a/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java +++ b/examples/features/standard/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java @@ -109,6 +109,7 @@ class SimpleMessageListener implements MessageListener { this.messageReceiverMap = messageReceiverMap; } + @Override public void onMessage(final Message message) { try { TextMessage msg = (TextMessage) message; diff --git a/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java b/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java index a2164cfcf0..db104f7604 100644 --- a/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java +++ b/examples/features/standard/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java @@ -116,6 +116,7 @@ class SimpleMessageListener implements MessageListener { this.messageReceiverMap = messageReceiverMap; } + @Override public void onMessage(Message message) { try { TextMessage msg = (TextMessage) message; diff --git a/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java b/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java index 2c87d26768..b9257c0878 100644 --- a/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java +++ b/examples/features/standard/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java @@ -120,6 +120,7 @@ class SimpleMessageListener implements MessageListener { this.result = result; } + @Override public void onMessage(final Message msg) { TextMessage textMessage = (TextMessage) msg; try { diff --git a/examples/features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java b/examples/features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java index 63fdad265e..eb4e0c777f 100644 --- a/examples/features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java +++ b/examples/features/standard/queue-requestor/src/main/java/org/apache/activemq/artemis/jms/example/TextReverserService.java @@ -66,6 +66,7 @@ public class TextReverserService implements MessageListener { // MessageListener implementation -------------------------------- + @Override public void onMessage(final Message request) { TextMessage textMessage = (TextMessage) request; try { diff --git a/examples/features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java b/examples/features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java index 465a4e2279..3f8f9fde5e 100644 --- a/examples/features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java +++ b/examples/features/standard/queue-selector/src/main/java/org/apache/activemq/artemis/jms/example/QueueSelectorExample.java @@ -122,6 +122,7 @@ class SimpleMessageListener implements MessageListener { this.result = result; } + @Override public void onMessage(final Message msg) { TextMessage textMessage = (TextMessage) msg; try { diff --git a/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java b/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java index 5d2e4dc2eb..afdd738c14 100644 --- a/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java +++ b/examples/features/standard/request-reply/src/main/java/org/apache/activemq/artemis/jms/example/RequestReplyExample.java @@ -171,6 +171,7 @@ class SimpleRequestServer implements MessageListener { requestConsumer.setMessageListener(this); } + @Override public void onMessage(final Message request) { try { System.out.println("Received request message: " + ((TextMessage) request).getText()); diff --git a/examples/features/standard/send-acknowledgements/src/main/java/org/apache/activemq/artemis/jms/example/SendAcknowledgementsExample.java b/examples/features/standard/send-acknowledgements/src/main/java/org/apache/activemq/artemis/jms/example/SendAcknowledgementsExample.java index 578d1984b9..f49d83487e 100644 --- a/examples/features/standard/send-acknowledgements/src/main/java/org/apache/activemq/artemis/jms/example/SendAcknowledgementsExample.java +++ b/examples/features/standard/send-acknowledgements/src/main/java/org/apache/activemq/artemis/jms/example/SendAcknowledgementsExample.java @@ -58,6 +58,7 @@ public class SendAcknowledgementsExample { int count = 0; + @Override public void sendAcknowledged(final Message message) { System.out.println("Received send acknowledgement for message " + count++); } diff --git a/examples/features/standard/spring-integration/src/main/java/org/apache/activemq/artemis/jms/example/ExampleListener.java b/examples/features/standard/spring-integration/src/main/java/org/apache/activemq/artemis/jms/example/ExampleListener.java index 3d4e063f6b..174f092372 100644 --- a/examples/features/standard/spring-integration/src/main/java/org/apache/activemq/artemis/jms/example/ExampleListener.java +++ b/examples/features/standard/spring-integration/src/main/java/org/apache/activemq/artemis/jms/example/ExampleListener.java @@ -25,6 +25,7 @@ public class ExampleListener implements MessageListener { protected static String lastMessage = null; + @Override public void onMessage(Message message) { try { lastMessage = ((TextMessage) message).getText(); diff --git a/examples/features/standard/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java b/examples/features/standard/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java index 08f9db966d..f3d82f55a3 100644 --- a/examples/features/standard/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java +++ b/examples/features/standard/static-selector/src/main/java/org/apache/activemq/artemis/jms/example/StaticSelectorExample.java @@ -116,6 +116,7 @@ class SimpleMessageListener implements MessageListener { this.result = result; } + @Override public void onMessage(final Message msg) { TextMessage textMessage = (TextMessage) msg; try { diff --git a/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java b/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java index 464b21bbe3..97ece3f5b1 100644 --- a/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java +++ b/examples/features/standard/topic-selector-example2/src/main/java/org/apache/activemq/artemis/jms/example/TopicSelectorExample2.java @@ -124,6 +124,7 @@ class SimpleMessageListener implements MessageListener { this.result = result; } + @Override public void onMessage(final Message msg) { TextMessage textMessage = (TextMessage) msg; try { diff --git a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java index 8b6be805e5..f9eea4c889 100644 --- a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java +++ b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java @@ -84,14 +84,17 @@ public class DummyXid implements Xid { // Xid implementation ------------------------------------------------------------------ + @Override public byte[] getBranchQualifier() { return branchQualifier; } + @Override public int getFormatId() { return formatId; } + @Override public byte[] getGlobalTransactionId() { return globalTransactionId; } diff --git a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java index d2337311dd..f6f8b9c866 100644 --- a/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java +++ b/examples/features/standard/xa-heuristic/src/main/java/org/apache/activemq/artemis/jms/example/XAHeuristicExample.java @@ -206,6 +206,7 @@ class SimpleMessageListener implements MessageListener { this.result = result; } + @Override public void onMessage(final Message message) { try { System.out.println("Message received: " + ((TextMessage) message).getText()); diff --git a/examples/features/standard/xa-receive/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java b/examples/features/standard/xa-receive/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java index 4dbe2f8ae4..6427bd4fdc 100644 --- a/examples/features/standard/xa-receive/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java +++ b/examples/features/standard/xa-receive/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java @@ -84,14 +84,17 @@ public class DummyXid implements Xid { // Xid implementation ------------------------------------------------------------------ + @Override public byte[] getBranchQualifier() { return branchQualifier; } + @Override public int getFormatId() { return formatId; } + @Override public byte[] getGlobalTransactionId() { return globalTransactionId; } diff --git a/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java b/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java index 4dbe2f8ae4..6427bd4fdc 100644 --- a/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java +++ b/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/DummyXid.java @@ -84,14 +84,17 @@ public class DummyXid implements Xid { // Xid implementation ------------------------------------------------------------------ + @Override public byte[] getBranchQualifier() { return branchQualifier; } + @Override public int getFormatId() { return formatId; } + @Override public byte[] getGlobalTransactionId() { return globalTransactionId; } diff --git a/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java b/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java index fd87f61788..9835f54a9f 100644 --- a/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java +++ b/examples/features/standard/xa-send/src/main/java/org/apache/activemq/artemis/jms/example/XASendExample.java @@ -178,6 +178,7 @@ class SimpleMessageListener implements MessageListener { this.result = result; } + @Override public void onMessage(final Message message) { try { System.out.println("Message received: " + message); diff --git a/examples/protocols/openwire/chat/src/main/java/org/apache/activemq/artemis/openwire/example/Chat.java b/examples/protocols/openwire/chat/src/main/java/org/apache/activemq/artemis/openwire/example/Chat.java index e92e0b68de..0195894a9f 100644 --- a/examples/protocols/openwire/chat/src/main/java/org/apache/activemq/artemis/openwire/example/Chat.java +++ b/examples/protocols/openwire/chat/src/main/java/org/apache/activemq/artemis/openwire/example/Chat.java @@ -89,6 +89,7 @@ public class Chat implements javax.jms.MessageListener { * Handle the message * (as specified in the javax.jms.MessageListener interface). */ + @Override public void onMessage(javax.jms.Message aMessage) { try { // Cast the message as a text message. diff --git a/examples/protocols/stomp/stomp-embedded-interceptor/src/main/java/org/apache/activemq/artemis/jms/example/MyStompInterceptor.java b/examples/protocols/stomp/stomp-embedded-interceptor/src/main/java/org/apache/activemq/artemis/jms/example/MyStompInterceptor.java index 43b6633fac..c11cc038c7 100644 --- a/examples/protocols/stomp/stomp-embedded-interceptor/src/main/java/org/apache/activemq/artemis/jms/example/MyStompInterceptor.java +++ b/examples/protocols/stomp/stomp-embedded-interceptor/src/main/java/org/apache/activemq/artemis/jms/example/MyStompInterceptor.java @@ -25,6 +25,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; public class MyStompInterceptor implements StompFrameInterceptor { + @Override public boolean intercept(StompFrame frame, RemotingConnection remotingConnection) throws ActiveMQException { diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java index db6ee37a5a..1451366c25 100644 --- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java +++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringBindingRegistry.java @@ -28,6 +28,7 @@ public class SpringBindingRegistry implements BindingRegistry { this.factory = factory; } + @Override public Object lookup(String name) { Object obj = null; try { @@ -39,14 +40,17 @@ public class SpringBindingRegistry implements BindingRegistry { return obj; } + @Override public boolean bind(String name, Object obj) { factory.registerSingleton(name, obj); return true; } + @Override public void unbind(String name) { } + @Override public void close() { } } diff --git a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java index 02886288a3..ff4518141f 100644 --- a/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java +++ b/integration/activemq-spring-integration/src/main/java/org/apache/activemq/artemis/integration/spring/SpringJmsBootstrap.java @@ -24,6 +24,7 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory; public class SpringJmsBootstrap extends EmbeddedJMS implements BeanFactoryAware { + @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { registry = new SpringBindingRegistry((ConfigurableBeanFactory) beanFactory); } diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java index 9bfd194427..6ab5340fa5 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNameParser.java @@ -54,6 +54,7 @@ public class InVMNameParser implements NameParser, Serializable { return InVMNameParser.syntax; } + @Override public Name parse(final String name) throws NamingException { return new CompoundName(name, InVMNameParser.syntax); } diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java index 5579b1ac1e..f77a413447 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/InVMNamingContext.java @@ -65,10 +65,12 @@ public class InVMNamingContext implements Context, Serializable { // Context implementation ---------------------------------------- + @Override public Object lookup(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookup(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -93,26 +95,32 @@ public class InVMNamingContext implements Context, Serializable { } } + @Override public void bind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void bind(final String name, final Object obj) throws NamingException { internalBind(name, obj, false); } + @Override public void rebind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rebind(final String name, final Object obj) throws NamingException { internalBind(name, obj, true); } + @Override public void unbind(final Name name) throws NamingException { unbind(name.toString()); } + @Override public void unbind(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -130,26 +138,32 @@ public class InVMNamingContext implements Context, Serializable { } } + @Override public void rename(final Name oldName, final Name newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rename(final String oldName, final String newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(String contextName) throws NamingException { contextName = trimSlashes(contextName); if (!"".equals(contextName) && !".".equals(contextName)) { @@ -170,18 +184,22 @@ public class InVMNamingContext implements Context, Serializable { return new NamingEnumerationImpl(l.iterator()); } + @Override public void destroySubcontext(final Name name) throws NamingException { destroySubcontext(name.toString()); } + @Override public void destroySubcontext(final String name) throws NamingException { map.remove(trimSlashes(name)); } + @Override public Context createSubcontext(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Context createSubcontext(String name) throws NamingException { name = trimSlashes(name); if (map.get(name) != null) { @@ -192,47 +210,58 @@ public class InVMNamingContext implements Context, Serializable { return c; } + @Override public Object lookupLink(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookupLink(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); } + @Override public NameParser getNameParser(final String name) throws NamingException { return parser; } + @Override public Name composeName(final Name name, final Name prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public String composeName(final String name, final String prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object addToEnvironment(final String propName, final Object propVal) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object removeFromEnvironment(final String propName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Hashtable getEnvironment() throws NamingException { Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jms.tests.tools.container.InVMInitialContextFactory"); return env; } + @Override public void close() throws NamingException { } + @Override public String getNameInNamespace() throws NamingException { return nameInNamespace; } @@ -289,22 +318,27 @@ public class InVMNamingContext implements Context, Serializable { iterator = bindingIterator; } + @Override public void close() throws NamingException { throw new UnsupportedOperationException(); } + @Override public boolean hasMore() throws NamingException { return iterator.hasNext(); } + @Override public T next() throws NamingException { return iterator.next(); } + @Override public boolean hasMoreElements() { return iterator.hasNext(); } + @Override public T nextElement() { return iterator.next(); } diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java index 4f4ddd12ae..171eb55c8c 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/artemiswrapper/NonSerializableFactory.java @@ -91,6 +91,7 @@ public class NonSerializableFactory implements ObjectFactory { return NonSerializableFactory.getWrapperMap().get(name); } + @Override public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java index fe90ac3893..ab6ed50e9d 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/broker/region/policy/PolicyMap.java @@ -53,6 +53,7 @@ public class PolicyMap extends DestinationMap { this.defaultEntry = defaultEntry; } + @Override protected Class getEntryClass() { return PolicyEntry.class; } diff --git a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java index 6279f33d03..73fbdcda34 100644 --- a/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java +++ b/tests/activemq5-unit-tests/src/main/java/org/apache/activemq/transport/tcp/TcpTransportFactory.java @@ -69,6 +69,7 @@ public class TcpTransportFactory extends TransportFactory { return super.doConnect(location); } + @Override public TransportServer doBind(final URI location) throws IOException { try { Map options = new HashMap(URISupport.parseParameters(location)); @@ -93,6 +94,7 @@ public class TcpTransportFactory extends TransportFactory { return new TcpTransportServer(this, location, serverSocketFactory); } + @Override @SuppressWarnings("rawtypes") public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { @@ -129,6 +131,7 @@ public class TcpTransportFactory extends TransportFactory { return true; } + @Override protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException { URI localLocation = null; String path = location.getPath(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java index 24213a16a2..2bd8382642 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQMessageAuditTest.java @@ -52,10 +52,12 @@ public class ActiveMQMessageAuditTest extends TestCase { public static void main(String[] args) { } + @Override protected void setUp() throws Exception { super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java index fa745ba26c..3ee3e85fc0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ActiveMQXAConnectionFactoryTest.java @@ -582,14 +582,17 @@ public class ActiveMQXAConnectionFactoryTest extends CombinationTestSupport { final byte[] bs = baos.toByteArray(); return new Xid() { + @Override public int getFormatId() { return 86; } + @Override public byte[] getGlobalTransactionId() { return bs; } + @Override public byte[] getBranchQualifier() { return bs; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java index dd9e3e215a..5e5b9937d6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCleanupTest.java @@ -28,6 +28,7 @@ public class ConnectionCleanupTest extends TestCase { private ActiveMQConnection connection; + @Override protected void setUp() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); connection = (ActiveMQConnection) factory.createConnection(); @@ -36,6 +37,7 @@ public class ConnectionCleanupTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { connection.close(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java index a53b143be6..c4e5086d5e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesConcurrentTest.java @@ -34,6 +34,7 @@ public class ConnectionCloseMultipleTimesConcurrentTest extends TestCase { private ExecutorService executor; private int size = 200; + @Override protected void setUp() throws Exception { executor = Executors.newFixedThreadPool(20); @@ -45,6 +46,7 @@ public class ConnectionCloseMultipleTimesConcurrentTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection.isStarted()) { connection.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java index c33e0f3504..dbd31f25e8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConnectionCloseMultipleTimesTest.java @@ -28,6 +28,7 @@ public class ConnectionCloseMultipleTimesTest extends TestCase { private ActiveMQConnection connection; + @Override protected void setUp() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); connection = (ActiveMQConnection) factory.createConnection(); @@ -37,6 +38,7 @@ public class ConnectionCloseMultipleTimesTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection.isStarted()) { connection.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java index 89f6c81d8b..03ed8df2b4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ConsumerReceiveWithTimeoutTest.java @@ -31,6 +31,7 @@ public class ConsumerReceiveWithTimeoutTest extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class ConsumerReceiveWithTimeoutTest extends TestSupport { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -61,6 +63,7 @@ public class ConsumerReceiveWithTimeoutTest extends TestSupport { final Queue queue = session.createQueue("test"); Thread t = new Thread() { + @Override public void run() { try { // wait for 10 seconds to allow consumer.receive to be run diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java index 6ae8a2dad9..fa58ebe799 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/EmbeddedBrokerTestSupport.java @@ -39,6 +39,7 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport { protected ActiveMQDestination destination; protected JmsTemplate template; + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -55,6 +56,7 @@ public abstract class EmbeddedBrokerTestSupport extends CombinationTestSupport { template.afterPropertiesSet(); } + @Override protected void tearDown() throws Exception { if (broker != null) { try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java index 69d8c2d10d..c3aac48991 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ExpiryHogTest.java @@ -49,6 +49,7 @@ public class ExpiryHogTest extends JmsMultipleClientsTestSupport { allMessagesList.assertMessagesReceived(numMessages); } + @Override protected BrokerService createBroker() throws Exception { BrokerService bs = new BrokerService(); bs.setDeleteAllMessagesOnStartup(true); @@ -62,6 +63,7 @@ public class ExpiryHogTest extends JmsMultipleClientsTestSupport { return bs; } + @Override protected TextMessage createTextMessage(Session session, String initText) throws Exception { if (sleep) { TimeUnit.SECONDS.sleep(10); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java index cc22f6c623..c2f48f282e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSDurableTopicRedeliverTest.java @@ -30,6 +30,7 @@ public class JMSDurableTopicRedeliverTest extends JmsTopicRedeliverTest { private static final Logger LOG = LoggerFactory.getLogger(JMSDurableTopicRedeliverTest.class); + @Override protected void setUp() throws Exception { durable = true; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java index 543c678dfe..f924621aa4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSQueueRedeliverTest.java @@ -21,6 +21,7 @@ package org.apache.activemq; */ public class JMSQueueRedeliverTest extends JmsTopicRedeliverTest { + @Override protected void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java index fcebb6433e..fa6877db4e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JMSXAConsumerTest.java @@ -37,15 +37,19 @@ public class JMSXAConsumerTest extends JMSConsumerTest { // some tests use transactions, these will not work unless an XA transaction is in place // slip these + @Override public void testPrefetch1MessageNotDispatched() throws Exception { } + @Override public void testRedispatchOfUncommittedTx() throws Exception { } + @Override public void testRedispatchOfRolledbackTx() throws Exception { } + @Override public void testMessageListenerOnMessageCloseUnackedWithPrefetch1StayInQueue() throws Exception { } } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java index 6da44effc3..5900560c2a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckListenerTest.java @@ -31,6 +31,7 @@ public class JmsAutoAckListenerTest extends TestSupport implements MessageListen private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class JmsAutoAckListenerTest extends TestSupport implements MessageListen /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -73,6 +75,7 @@ public class JmsAutoAckListenerTest extends TestSupport implements MessageListen session.close(); } + @Override public void onMessage(Message message) { assertNotNull(message); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java index 0bca656486..39e73fec9a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsAutoAckTest.java @@ -31,6 +31,7 @@ public class JmsAutoAckTest extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class JmsAutoAckTest extends TestSupport { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java index fe96ecf4a6..9142cf8e7e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckListenerTest.java @@ -32,6 +32,7 @@ public class JmsClientAckListenerTest extends TestSupport implements MessageList private Connection connection; private boolean dontAck; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -40,6 +41,7 @@ public class JmsClientAckListenerTest extends TestSupport implements MessageList /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -114,6 +116,7 @@ public class JmsClientAckListenerTest extends TestSupport implements MessageList session.close(); } + @Override public void onMessage(Message message) { assertNotNull(message); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java index 0e54ef2864..4a86d9cb0e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsClientAckTest.java @@ -31,6 +31,7 @@ public class JmsClientAckTest extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -39,6 +40,7 @@ public class JmsClientAckTest extends TestSupport { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java index 7900b6f9d4..1a80ac9ef6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsConsumerResetActiveListenerTest.java @@ -39,11 +39,13 @@ public class JmsConsumerResetActiveListenerTest extends TestCase { private Connection connection; private ActiveMQConnectionFactory factory; + @Override protected void setUp() throws Exception { factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); connection = factory.createConnection(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -66,6 +68,7 @@ public class JmsConsumerResetActiveListenerTest extends TestCase { final Vector results = new Vector(); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (first.compareAndSet(true, false)) { try { @@ -116,6 +119,7 @@ public class JmsConsumerResetActiveListenerTest extends TestCase { final Vector results = new Vector(); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (first.compareAndSet(true, false)) { try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java index b1b39551de..f48793780e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsCreateConsumerInOnMessageTest.java @@ -41,6 +41,7 @@ public class JmsCreateConsumerInOnMessageTest extends TestSupport implements Mes /* * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); super.topic = true; @@ -58,6 +59,7 @@ public class JmsCreateConsumerInOnMessageTest extends TestSupport implements Mes /* * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { super.tearDown(); connection.close(); @@ -84,6 +86,7 @@ public class JmsCreateConsumerInOnMessageTest extends TestSupport implements Mes * * @param message */ + @Override public void onMessage(Message message) { try { testConsumer = consumerSession.createConsumer(topic); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java index 9b336cd083..bf1535a1b4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableQueueWildcardSendReceiveTest.java @@ -30,6 +30,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.PERSISTENT; @@ -39,6 +40,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the consumer subject. */ + @Override protected String getConsumerSubject() { return "FOO.>"; } @@ -46,6 +48,7 @@ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the producer subject. */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java index 3c1b04371c..7db52ae328 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSelectorTest.java @@ -21,6 +21,7 @@ package org.apache.activemq; */ public class JmsDurableTopicSelectorTest extends JmsTopicSelectorTest { + @Override public void setUp() throws Exception { durable = true; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java index 494fb7be8e..978f31c700 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicSendReceiveTest.java @@ -49,6 +49,7 @@ public class JmsDurableTopicSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { this.durable = true; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java index b9fe5eff5d..d8277787ac 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicTransactionTest.java @@ -28,6 +28,7 @@ public class JmsDurableTopicTransactionTest extends JmsTopicTransactionTest { /** * @see JmsTransactionTestSupport#getJmsResourceProvider() */ + @Override protected JmsResourceProvider getJmsResourceProvider() { JmsResourceProvider provider = new JmsResourceProvider(); provider.setTopic(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java index 4e0a2dc7f7..b913726cde 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsDurableTopicWildcardSendReceiveTest.java @@ -31,6 +31,7 @@ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveT * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = true; durable = true; @@ -41,6 +42,7 @@ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the consumer subject. */ + @Override protected String getConsumerSubject() { return "FOO.>"; } @@ -48,6 +50,7 @@ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveT /** * Returns the producer subject. */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java index 5f871990b6..6e2d284f2c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleBrokersTestSupport.java @@ -196,6 +196,7 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { boolean result = false; if (!broker.getNetworkConnectors().isEmpty()) { result = Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int activeCount = 0; for (NetworkBridge bridge : broker.getNetworkConnectors().get(bridgeIndex).activeBridges()) { @@ -240,6 +241,7 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { long time, TimeUnit units) throws InterruptedException, TimeoutException, Exception { if (!Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() { return hasBridge(localBrokerName, remoteBrokerName); } @@ -416,6 +418,7 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { final AtomicInteger actualConnected = new AtomicInteger(); final CountDownLatch latch = new CountDownLatch(1); ces.setConsumerListener(new ConsumerListener() { + @Override public void onConsumerEvent(ConsumerEvent event) { if (actualConnected.get() < count) { actualConnected.set(event.getConsumerCount()); @@ -508,12 +511,14 @@ public class JmsMultipleBrokersTestSupport extends CombinationTestSupport { } } + @Override protected void setUp() throws Exception { super.setUp(); brokers = new HashMap(); destinations = new HashMap(); } + @Override protected void tearDown() throws Exception { destroyAllBrokers(); super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java index 38dbcd1fed..233e9e08d7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsMultipleClientsTestSupport.java @@ -94,6 +94,7 @@ public class JmsMultipleClientsTestSupport { for (int i = 0; i < producerCount; i++) { Thread t = new Thread(new Runnable() { + @Override public void run() { try { sendMessages(factory.createConnection(), dest, msgCount); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java index 79485cd056..19103217c5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueCompositeSendReceiveTest.java @@ -42,6 +42,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.NON_PERSISTENT; @@ -54,6 +55,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.BAR.HUMBUG"; } @@ -64,6 +66,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG,FOO.BAR.HUMBUG2"; } @@ -73,6 +76,7 @@ public class JmsQueueCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @throws Exception */ + @Override public void testSendReceive() throws Exception { super.testSendReceive(); messages.clear(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java index ed847313f7..839a9b4937 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueRequestReplyTest.java @@ -26,6 +26,7 @@ public class JmsQueueRequestReplyTest extends JmsTopicRequestReplyTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java index 93169f5b1e..ff2d521144 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSelectorTest.java @@ -22,6 +22,7 @@ package org.apache.activemq; */ public class JmsQueueSelectorTest extends JmsTopicSelectorTest { + @Override public void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java index 3a8c23c22c..f007190008 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTest.java @@ -28,6 +28,7 @@ public class JmsQueueSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java index b717607289..412577e962 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java @@ -57,14 +57,17 @@ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQ } } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("failover:(tcp://localhost:61616)?maxReconnectAttempts=10&useExponentialBackOff=false&initialReconnectDelay=200"); } + @Override protected void setUp() throws Exception { setAutoFail(true); // now lets asynchronously start a broker Thread thread = new Thread() { + @Override public void run() { startBroker(); } @@ -74,6 +77,7 @@ public class JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest extends JmsQ super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java index de1c17aa2e..e5f0738f62 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueSendReceiveUsingTwoSessionsTest.java @@ -26,6 +26,7 @@ public class JmsQueueSendReceiveUsingTwoSessionsTest extends JmsQueueSendReceive * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { useSeparateSession = true; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java index fe1d53303e..28173b8f9c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueTopicCompositeSendReceiveTest.java @@ -37,6 +37,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { deliveryMode = DeliveryMode.NON_PERSISTENT; topic = false; @@ -59,6 +60,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.BAR.HUMBUG"; } @@ -69,6 +71,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "queue://FOO.BAR.HUMBUG,topic://FOO.BAR.HUMBUG2"; } @@ -78,6 +81,7 @@ public class JmsQueueTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTe * * @throws Exception */ + @Override public void testSendReceive() throws Exception { super.testSendReceive(); messages.clear(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java index 96ae1c7249..296a56ec75 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsQueueWildcardSendReceiveTest.java @@ -43,6 +43,7 @@ public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.NON_PERSISTENT; @@ -55,6 +56,7 @@ public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.>"; } @@ -65,6 +67,7 @@ public class JmsQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java index a6a4f23bfb..6b985eb9fc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsRedeliveredTest.java @@ -49,6 +49,7 @@ public class JmsRedeliveredTest extends TestCase { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { connection = createConnection(); } @@ -56,6 +57,7 @@ public class JmsRedeliveredTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -533,6 +535,7 @@ public class JmsRedeliveredTest extends TestCase { * * @return int - persistent delivery mode. */ + @Override protected int getDeliveryMode() { return DeliveryMode.PERSISTENT; } @@ -548,6 +551,7 @@ public class JmsRedeliveredTest extends TestCase { * * @return int - non-persistent delivery mode. */ + @Override protected int getDeliveryMode() { return DeliveryMode.NON_PERSISTENT; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java index b3c2d37e18..6fd36cc89b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveTestSupport.java @@ -60,6 +60,7 @@ public class JmsSendReceiveTestSupport extends TestSupport implements MessageLis /* * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); String temp = System.getProperty("messageCount"); @@ -195,6 +196,7 @@ public class JmsSendReceiveTestSupport extends TestSupport implements MessageLis * * @see javax.jms.MessageListener#onMessage(javax.jms.Message) */ + @Override public synchronized void onMessage(Message message) { consumeMessage(message, messages); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java index f7889dc3ba..19290c0007 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSendReceiveWithMessageExpirationTest.java @@ -56,6 +56,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport { protected Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); @@ -299,6 +300,7 @@ public class JmsSendReceiveWithMessageExpirationTest extends TestSupport { return session.createConsumer(consumerDestination); } + @Override protected void tearDown() throws Exception { LOG.info("Dumping stats..."); LOG.info("Closing down connection"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java index f0737241eb..e08333229b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsSessionRecoverTest.java @@ -47,6 +47,7 @@ public class JmsSessionRecoverTest extends TestCase { /** * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); connection = factory.createConnection(); @@ -55,6 +56,7 @@ public class JmsSessionRecoverTest extends TestCase { /** * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -171,6 +173,7 @@ public class JmsSessionRecoverTest extends TestCase { consumer.setMessageListener(new MessageListener() { int counter; + @Override public void onMessage(Message msg) { counter++; try { @@ -242,6 +245,7 @@ public class JmsSessionRecoverTest extends TestCase { consumer.setMessageListener(new MessageListener() { int counter; + @Override public void onMessage(Message msg) { counter++; try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java index 3fc6addd58..03bf32c263 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTestSupport.java @@ -112,6 +112,7 @@ public class JmsTestSupport extends CombinationTestSupport { return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false")); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -127,6 +128,7 @@ public class JmsTestSupport extends CombinationTestSupport { connections.add(connection); } + @Override protected void tearDown() throws Exception { for (Iterator iter = connections.iterator(); iter.hasNext(); ) { Connection conn = iter.next(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java index 4536d3b9f1..eb9a06d8c6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicCompositeSendReceiveTest.java @@ -38,6 +38,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { deliveryMode = DeliveryMode.NON_PERSISTENT; super.setUp(); @@ -59,6 +60,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "FOO.BAR.HUMBUG"; } @@ -69,6 +71,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG,FOO.BAR.HUMBUG2"; } @@ -78,6 +81,7 @@ public class JmsTopicCompositeSendReceiveTest extends JmsTopicSendReceiveTest { * * @throws Exception */ + @Override public void testSendReceive() throws Exception { super.testSendReceive(); messages.clear(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java index 2842e0b059..3bb2df9ead 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRedeliverTest.java @@ -48,6 +48,7 @@ public class JmsTopicRedeliverTest extends TestSupport { protected boolean verbose; protected long initRedeliveryDelay; + @Override protected void setUp() throws Exception { super.setUp(); @@ -88,6 +89,7 @@ public class JmsTopicRedeliverTest extends TestSupport { LOG.info("Created connection: " + connection); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -101,6 +103,7 @@ public class JmsTopicRedeliverTest extends TestSupport { * @return String - consumer subject * @see org.apache.activemq.test.TestSupport#getConsumerSubject() */ + @Override protected String getConsumerSubject() { return "TEST"; } @@ -111,6 +114,7 @@ public class JmsTopicRedeliverTest extends TestSupport { * @return String - producer subject * @see org.apache.activemq.test.TestSupport#getProducerSubject() */ + @Override protected String getProducerSubject() { return "TEST"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java index 02848bf489..ce73a837bb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicRequestReplyTest.java @@ -109,6 +109,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList /** * Use the asynchronous subscription mechanism */ + @Override public void onMessage(Message message) { try { TextMessage requestMessage = (TextMessage) message; @@ -163,6 +164,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList } } + @Override protected void setUp() throws Exception { super.setUp(); @@ -181,6 +183,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList } else { Thread thread = new Thread(new Runnable() { + @Override public void run() { syncConsumeLoop(requestConsumer); } @@ -190,6 +193,7 @@ public class JmsTopicRequestReplyTest extends TestSupport implements MessageList serverConnection.start(); } + @Override protected void tearDown() throws Exception { super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java index ece92cb818..8968d31a53 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSelectorTest.java @@ -48,6 +48,7 @@ public class JmsTopicSelectorTest extends TestSupport { protected boolean durable; protected int deliveryMode = DeliveryMode.PERSISTENT; + @Override public void setUp() throws Exception { super.setUp(); @@ -81,6 +82,7 @@ public class JmsTopicSelectorTest extends TestSupport { connection.start(); } + @Override public void tearDown() throws Exception { session.close(); connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java index 514b70e9cc..3f120a6536 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveSubscriberTest.java @@ -26,6 +26,7 @@ import javax.jms.TopicSession; */ public class JmsTopicSendReceiveSubscriberTest extends JmsTopicSendReceiveTest { + @Override protected MessageConsumer createConsumer() throws JMSException { if (durable) { return super.createConsumer(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java index a801911b0e..71ddcd53c6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveTest.java @@ -35,6 +35,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { protected Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); @@ -80,6 +81,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { return session.createConsumer(consumerDestination); } + @Override protected void tearDown() throws Exception { LOG.info("Dumping stats..."); // connectionFactory.getStats().reset(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java index be9abb1c39..b5dcaccfcf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsTest.java @@ -34,6 +34,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes protected Connection receiveConnection; protected Session receiveSession; + @Override protected void setUp() throws Exception { super.setUp(); @@ -97,10 +98,12 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes return session.createConsumer(dest); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); } + @Override protected void tearDown() throws Exception { session.close(); receiveSession.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java index 508740f0ca..5acaece435 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendReceiveWithTwoConnectionsWithJMXTest.java @@ -22,6 +22,7 @@ package org.apache.activemq; */ public class JmsTopicSendReceiveWithTwoConnectionsWithJMXTest extends JmsTopicSendReceiveWithTwoConnectionsTest { + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=true"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java index 02c408a47f..7b84a15f8f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicSendSameMessageTest.java @@ -25,6 +25,7 @@ public class JmsTopicSendSameMessageTest extends JmsTopicSendReceiveWithTwoConne private static final org.apache.commons.logging.Log LOG = org.apache.commons.logging.LogFactory.getLog(JmsTopicSendSameMessageTest.class); + @Override public void testSendReceive() throws Exception { messages.clear(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java index 2beb0a0d59..b9ec483cd7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicTransactionTest.java @@ -26,6 +26,7 @@ public class JmsTopicTransactionTest extends JmsTransactionTestSupport { /** * @see org.apache.activemq.JmsTransactionTestSupport#getJmsResourceProvider() */ + @Override protected JmsResourceProvider getJmsResourceProvider() { JmsResourceProvider p = new JmsResourceProvider(); p.setTopic(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java index 69177714a9..8fd1c00021 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/JmsTopicWildcardSendReceiveTest.java @@ -38,6 +38,7 @@ public class JmsTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest { private String destination3String = "TEST.ONE.TWO"; private String destination4String = "TEST.TWO.ONE"; + @Override protected void setUp() throws Exception { topic = true; durable = false; @@ -45,10 +46,12 @@ public class JmsTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest { super.setUp(); } + @Override protected String getConsumerSubject() { return "FOO.>"; } + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java index 55cb99780e..889ec768ee 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LargeMessageTestSupport.java @@ -84,6 +84,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag } } + @Override public void setUp() throws Exception { super.setUp(); ClientTestSupport.removeMessageStore(); @@ -135,6 +136,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag activeMQConnection.getPrefetchPolicy().setOptimizeDurableTopicPrefetch(prefetchValue); } + @Override public void tearDown() throws Exception { Thread.sleep(1000); producerConnection.close(); @@ -159,6 +161,7 @@ public class LargeMessageTestSupport extends ClientTestSupport implements Messag return result; } + @Override public void onMessage(Message msg) { try { BytesMessage ba = (BytesMessage) msg; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java index e243a6afe3..94bd3d53b1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/LoadTestBurnIn.java @@ -62,11 +62,13 @@ public class LoadTestBurnIn extends JmsTestSupport { return suite(LoadTestBurnIn.class); } + @Override protected void setUp() throws Exception { LOG.info("Start: " + getName()); super.setUp(); } + @Override protected void tearDown() throws Exception { try { super.tearDown(); @@ -83,12 +85,14 @@ public class LoadTestBurnIn extends JmsTestSupport { junit.textui.TestRunner.run(suite()); } + @Override protected BrokerService createBroker() throws Exception { return BrokerFactory.createBroker(new URI("broker://(tcp://localhost:0)?useJmx=true")); // return BrokerFactory.createBroker(new // URI("xbean:org/apache/activemq/broker/store/loadtester.xml")); } + @Override protected ConnectionFactory createConnectionFactory() throws URISyntaxException, IOException { return new ActiveMQConnectionFactory(((TransportConnector) broker.getTransportConnectors().get(0)).getServer().getConnectURI()); } @@ -126,6 +130,7 @@ public class LoadTestBurnIn extends JmsTestSupport { // Send the messages, async new Thread() { + @Override public void run() { Connection connection2 = null; try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java index 2d8e2f21c6..25a8fad171 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java @@ -48,12 +48,14 @@ public class MessageTransformationTest extends TestCase { * * @throws Exception */ + @Override protected void setUp() throws Exception { } /** * Clears up the resources used in the unit test. */ + @Override protected void tearDown() throws Exception { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java index 92635fa144..0246253d4d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java @@ -93,6 +93,7 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport { return new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString()); } + @Override @Before public void setUp() throws Exception { setAutoFail(true); @@ -106,6 +107,7 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport { connection.start(); } + @Override @After public void tearDown() throws Exception { connectionConsumer.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java index 557b5ce910..f55dee247c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java @@ -160,6 +160,7 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport { } } + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setDeleteAllMessagesOnStartup(true); @@ -180,11 +181,13 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport { return service; } + @Override public void setUp() throws Exception { setAutoFail(true); super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { TcpTransport t = (TcpTransport) connection.getTransport().narrow(TcpTransport.class); @@ -194,6 +197,7 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport { } } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(connector.getConnectUri()); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java index 535f991753..4a4a07c137 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java @@ -36,6 +36,7 @@ import org.apache.activemq.broker.region.policy.VMPendingSubscriberMessageStorag public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setPersistent(false); @@ -167,6 +168,7 @@ public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest { protected ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(connector.getConnectUri()); connectionFactory.setExceptionListener(new ExceptionListener() { + @Override public void onException(JMSException arg0) { if (arg0 instanceof ResourceAllocationException) { gotResourceException.set(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java index 0ab2c03371..ea4bc165b0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java @@ -259,6 +259,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { // Once the send starts to block it will not reset the done flag // anymore. new Thread("Fill thread.") { + @Override public void run() { Session session = null; try { @@ -296,6 +297,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { private CountDownLatch asyncSendTo(final ActiveMQQueue queue, final String message) throws JMSException { final CountDownLatch done = new CountDownLatch(1); new Thread("Send thread.") { + @Override public void run() { Session session = null; try { @@ -315,6 +317,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { return done; } + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setPersistent(false); @@ -334,11 +337,13 @@ public class ProducerFlowControlTest extends JmsTestSupport { return service; } + @Override public void setUp() throws Exception { setAutoFail(true); super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { TcpTransport t = (TcpTransport) connection.getTransport().narrow(TcpTransport.class); @@ -348,6 +353,7 @@ public class ProducerFlowControlTest extends JmsTestSupport { super.tearDown(); } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(connector.getConnectUri()); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java index e11820074e..c6f60f86c7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java @@ -99,11 +99,13 @@ public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport { return new ActiveMQConnectionFactory((useFailover ? "failover:" : "") + broker.getTransportConnectors().get(0).getPublishableConnectString()); } + @Override protected void setUp() throws Exception { bindAddress = "tcp://localhost:0"; super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java index cdf6143e3b..8a9871ef4e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java @@ -95,10 +95,12 @@ public class ConsumerListenerTest extends EmbeddedBrokerTestSupport implements C assertConsumerEvent(0, false); } + @Override public void onConsumerEvent(ConsumerEvent event) { eventQueue.add(event); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -108,6 +110,7 @@ public class ConsumerListenerTest extends EmbeddedBrokerTestSupport implements C consumerEventSource.setConsumerListener(this); } + @Override protected void tearDown() throws Exception { if (consumerEventSource != null) { consumerEventSource.stop(); @@ -137,6 +140,7 @@ public class ConsumerListenerTest extends EmbeddedBrokerTestSupport implements C Session answer = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer consumer = answer.createConsumer(destination); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { LOG.info("Received message by: " + consumerText + " message: " + message); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java index 8a227861c8..0f0e118ce4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java @@ -92,6 +92,7 @@ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implement LOG.info("New destinations are: " + newDestinations); } + @Override public void onDestinationEvent(DestinationEvent event) { ActiveMQDestination destination = event.getDestination(); if (event.isAddOperation()) { @@ -104,6 +105,7 @@ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implement } } + @Override protected void setUp() throws Exception { super.setUp(); @@ -119,6 +121,7 @@ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implement return broker; } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java index 5c8ea8966f..4d84c024e5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java @@ -94,10 +94,12 @@ public class TempDestDeleteTest extends EmbeddedBrokerTestSupport implements Con return rb.getTopicRegion().getDestinationMap().containsKey(dest) || rb.getQueueRegion().getDestinationMap().containsKey(dest) || rb.getTempTopicRegion().getDestinationMap().containsKey(dest) || rb.getTempQueueRegion().getDestinationMap().containsKey(dest); } + @Override public void onConsumerEvent(ConsumerEvent event) { eventQueue.add(event); } + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -114,6 +116,7 @@ public class TempDestDeleteTest extends EmbeddedBrokerTestSupport implements Con queueConsumerEventSource.setConsumerListener(this); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -133,6 +136,7 @@ public class TempDestDeleteTest extends EmbeddedBrokerTestSupport implements Con MessageConsumer consumer = session.createConsumer(dest); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { LOG.info("Received message by: " + consumerText + " message: " + message); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java index 8d66d46565..467f0e0d7a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java @@ -47,6 +47,7 @@ public abstract class FTPTestSupport extends EmbeddedBrokerTestSupport { final File ftpHomeDirFile = new File("target/FTPBlobTest/ftptest"); + @Override protected void setUp() throws Exception { if (ftpHomeDirFile.getParentFile().exists()) { @@ -100,6 +101,7 @@ public abstract class FTPTestSupport extends EmbeddedBrokerTestSupport { connection.start(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/AMQ4351Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/AMQ4351Test.java index 408159393f..1c6a6c1259 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/AMQ4351Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/AMQ4351Test.java @@ -52,6 +52,7 @@ public class AMQ4351Test extends BrokerTestSupport { junit.textui.TestRunner.run(suite()); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java index cd616c24f9..b2f32045a6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java @@ -80,6 +80,7 @@ public class BrokerBenchmark extends BrokerTestSupport { final AtomicInteger receiveCounter = new AtomicInteger(0); for (int i = 0; i < consumerCount; i++) { new Thread() { + @Override public void run() { try { @@ -147,6 +148,7 @@ public class BrokerBenchmark extends BrokerTestSupport { // Send the messages in an async thread. for (int i = 0; i < prodcuerCount; i++) { new Thread() { + @Override public void run() { try { StubConnection connection = new StubConnection(broker); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java index 2d0da8b2ce..155dbe8112 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java @@ -173,6 +173,7 @@ public class BrokerRedeliveryTest extends org.apache.activemq.TestSupport { broker = null; } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java index 9532a2e903..db8db6322e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java @@ -53,6 +53,7 @@ public class CreateDestinationsOnStartupViaXBeanTest extends EmbeddedBrokerTestS assertEquals("Could not find destination: " + destination + ". Size of found destinations: " + answer, size, answer.size()); } + @Override protected BrokerService createBroker() throws Exception { XBeanBrokerFactory factory = new XBeanBrokerFactory(); BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri())); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java index e2779b1407..5a71517b42 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java @@ -20,6 +20,7 @@ import junit.framework.Test; public class DedicatedTaskRunnerBrokerTest extends BrokerTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setDedicatedTaskRunner(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java index d88afc73cf..1f8d1ae1cb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java @@ -112,6 +112,7 @@ public class DoubleSubscriptionTest extends NetworkTestSupport { assertNoMessagesLeft(connection3); } + @Override protected String getRemoteURI() { return remoteURI; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java index 45cf41af54..ea37fb3026 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java @@ -42,8 +42,10 @@ public class MarshallingBrokerTest extends BrokerTest { addCombinationValues("wireFormat", new Object[]{wf1, wf2,}); } + @Override protected StubConnection createConnection() throws Exception { return new StubConnection(broker) { + @Override public Response request(Command command) throws Exception { Response r = super.request((Command) wireFormat.unmarshal(wireFormat.marshal(command))); if (r != null) { @@ -52,6 +54,7 @@ public class MarshallingBrokerTest extends BrokerTest { return r; } + @Override public void send(Command command) throws Exception { super.send((Command) wireFormat.unmarshal(wireFormat.marshal(command))); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java index b112515b10..f4f1b0e80b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java @@ -62,6 +62,7 @@ public class MessageExpirationTest extends BrokerTestSupport { return broker; } + @Override protected PolicyEntry getDefaultPolicy() { PolicyEntry policy = super.getDefaultPolicy(); // disable spooling @@ -107,6 +108,7 @@ public class MessageExpirationTest extends BrokerTestSupport { // Produce in an async thread since the producer will be getting blocked // by the usage manager.. new Thread() { + @Override public void run() { // m1 and m3 should not expire.. but the others should. try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/QueueMbeanRestartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/QueueMbeanRestartTest.java index 8010961c59..886e38c20e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/QueueMbeanRestartTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/QueueMbeanRestartTest.java @@ -61,12 +61,14 @@ public class QueueMbeanRestartTest extends TestSupport { this.persistenceAdapterChoice = choice; } + @Override @Before public void setUp() throws Exception { topic = false; super.setUp(); } + @Override @After public void tearDown() throws Exception { super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java index a1555de7b0..bd04635fce 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java @@ -51,6 +51,7 @@ public class ReconnectWithJMXEnabledTest extends EmbeddedBrokerTestSupport { useConnection(connection); } + @Override protected void setUp() throws Exception { bindAddress = "tcp://localhost:0"; super.setUp(); @@ -61,6 +62,7 @@ public class ReconnectWithJMXEnabledTest extends EmbeddedBrokerTestSupport { return new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString()); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -69,6 +71,7 @@ public class ReconnectWithJMXEnabledTest extends EmbeddedBrokerTestSupport { super.tearDown(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService answer = new BrokerService(); answer.setUseJmx(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java index db79ce8dab..8f37e6b8c3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/SpringTest.java @@ -82,6 +82,7 @@ public class SpringTest extends TestCase { * * @throws Exception */ + @Override protected void tearDown() throws Exception { if (consumer != null) { consumer.stop(); @@ -95,6 +96,7 @@ public class SpringTest extends TestCase { } } + @Override protected void setUp() throws Exception { if (System.getProperty("basedir") == null) { File file = new File("."); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubBroker.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubBroker.java index 3a8d7ffc5d..fd84bee251 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubBroker.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubBroker.java @@ -50,10 +50,12 @@ public class StubBroker extends EmptyBroker { } } + @Override public void addConnection(ConnectionContext context, ConnectionInfo info) throws Exception { addConnectionData.add(new AddConnectionData(context, info)); } + @Override public void removeConnection(ConnectionContext context, ConnectionInfo info, Throwable error) throws Exception { removeConnectionData.add(new RemoveConnectionData(context, info, error)); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubConnection.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubConnection.java index 904cf8a06c..531cc4c290 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubConnection.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/StubConnection.java @@ -59,6 +59,7 @@ public class StubConnection implements Service { listener = transportListener; this.transport = transport; transport.setTransportListener(new DefaultTransportListener() { + @Override public void onCommand(Object command) { try { if (command.getClass() == ShutdownInfo.class) { @@ -71,6 +72,7 @@ public class StubConnection implements Service { } } + @Override public void onException(IOException e) { if (listener != null) { listener.onException(e); @@ -143,9 +145,11 @@ public class StubConnection implements Service { return transport; } + @Override public void start() throws Exception { } + @Override public void stop() throws Exception { shuttingDown = true; if (transport != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java index 2314b319c5..b0905dc8f9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/TopicSubscriptionTest.java @@ -32,6 +32,7 @@ import static org.junit.Assert.*; @RunWith(BlockJUnit4ClassRunner.class) public class TopicSubscriptionTest extends QueueSubscriptionTest { + @Override @Before public void setUp() throws Exception { super.setUp(); @@ -39,12 +40,14 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { topic = true; } + @Override @After public void tearDown() throws Exception { super.tearDown(); ThreadTracker.result(); } + @Override @Test(timeout = 60 * 1000) public void testManyProducersManyConsumers() throws Exception { consumerCount = 40; @@ -59,6 +62,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertDestinationMemoryUsageGoesToZero(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersLargeMessagesOnePrefetch() throws Exception { consumerCount = 2; @@ -73,6 +77,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertDestinationMemoryUsageGoesToZero(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersSmallMessagesOnePrefetch() throws Exception { consumerCount = 2; @@ -87,6 +92,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertDestinationMemoryUsageGoesToZero(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception { consumerCount = 2; @@ -100,6 +106,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertTotalMessagesReceived(messageCount * consumerCount * producerCount); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception { consumerCount = 2; @@ -114,6 +121,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertDestinationMemoryUsageGoesToZero(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerManyConsumersFewMessages() throws Exception { consumerCount = 50; @@ -128,6 +136,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertDestinationMemoryUsageGoesToZero(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerManyConsumersManyMessages() throws Exception { consumerCount = 50; @@ -142,6 +151,7 @@ public class TopicSubscriptionTest extends QueueSubscriptionTest { assertDestinationMemoryUsageGoesToZero(); } + @Override @Test(timeout = 60 * 1000) public void testManyProducersOneConsumer() throws Exception { consumerCount = 1; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java index 0c7c2e8051..fe214d447d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryDuplexNetworkBridgeTest.java @@ -41,6 +41,7 @@ public class AdvisoryDuplexNetworkBridgeTest extends AdvisoryNetworkBridgeTest { broker2.waitUntilStarted(); } + @Override public void assertCreatedByDuplex(boolean createdByDuplex) { assertTrue(createdByDuplex); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java index 0e17f70bfe..ae41515861 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/advisory/AdvisoryJmxTest.java @@ -33,6 +33,7 @@ import javax.management.remote.JMXServiceURL; public class AdvisoryJmxTest extends EmbeddedBrokerTestSupport { + @Override protected BrokerService createBroker() throws Exception { BrokerService answer = new BrokerService(); answer.setPersistent(isPersistent()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseQuiesceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseQuiesceTest.java index 280705e42c..f5c42f0a12 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseQuiesceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveLeaseQuiesceTest.java @@ -76,6 +76,7 @@ public class DbRestartJDBCQueueMasterSlaveLeaseQuiesceTest extends DbRestartJDBC } // ignore this test case + @Override public void testAdvisory() throws Exception { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java index d30ea815eb..5669ffc62c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java @@ -41,6 +41,7 @@ public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest private static final transient Logger LOG = LoggerFactory.getLogger(DbRestartJDBCQueueMasterSlaveTest.class); + @Override protected void messageSent() throws Exception { verifyExpectedBroker(inflightMessageCount); if (++inflightMessageCount == failureCount) { @@ -50,6 +51,7 @@ public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest LOG.info("DB STOPPED!@!!!!"); Thread dbRestartThread = new Thread("db-re-start-thread") { + @Override public void run() { delayTillRestartRequired(); ds.setShutdownDatabase("false"); @@ -75,6 +77,7 @@ public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest master.waitUntilStopped(); } + @Override protected void sendToProducer(MessageProducer producer, Destination producerDestination, Message message) throws JMSException { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java index 923b8adbc4..f1720749c0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java @@ -49,6 +49,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection BrokerService broker; final CountDownLatch restartDBLatch = new CountDownLatch(1); + @Override protected void setUp() throws Exception { setAutoFail(true); topic = false; @@ -76,11 +77,13 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); broker.stop(); } + @Override protected Session createSendSession(Connection sendConnection) throws Exception { if (transactedSends) { return sendConnection.createSession(true, Session.SESSION_TRANSACTED); @@ -90,6 +93,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection } } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory f = new ActiveMQConnectionFactory("failover://" + broker.getTransportConnectors().get(0).getPublishableConnectString()); f.setExceptionListener(this); @@ -110,6 +114,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection LOG.info("DB STOPPED!@!!!!"); Thread dbRestartThread = new Thread("db-re-start-thread") { + @Override public void run() { LOG.info("Sleeping for 10 seconds before allowing db restart"); try { @@ -126,6 +131,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection } } + @Override protected void sendToProducer(MessageProducer producer, Destination producerDestination, Message message) throws JMSException { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java index a30ddb7f56..1d2cd1f23a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/JDBCQueueMasterSlaveTest.java @@ -40,12 +40,14 @@ public class JDBCQueueMasterSlaveTest extends QueueMasterSlaveTestSupport { protected String MASTER_URL = "tcp://localhost:62001"; protected String SLAVE_URL = "tcp://localhost:62002"; + @Override protected void setUp() throws Exception { // startup db sharedDs = new SyncCreateDataSource((EmbeddedDataSource) DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory())); super.setUp(); } + @Override protected void createMaster() throws Exception { master = new BrokerService(); master.setBrokerName("master"); @@ -68,10 +70,12 @@ public class JDBCQueueMasterSlaveTest extends QueueMasterSlaveTestSupport { brokerService.setIoExceptionHandler(stopBrokerOnStoreException); } + @Override protected void createSlave() throws Exception { // use a separate thread as the slave will block waiting for // the exclusive db lock Thread t = new Thread() { + @Override public void run() { try { BrokerService broker = new BrokerService(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java index cc1a52718e..93377f0caa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestUsingSharedFileTest.java @@ -18,17 +18,21 @@ package org.apache.activemq.broker.ft; public class QueueMasterSlaveTestUsingSharedFileTest extends QueueMasterSlaveTestSupport { + @Override protected String getSlaveXml() { return "org/apache/activemq/broker/ft/sharedFileSlave.xml"; } + @Override protected String getMasterXml() { return "org/apache/activemq/broker/ft/sharedFileMaster.xml"; } + @Override protected void createSlave() throws Exception { // Start the Brokers async since starting them up could be a blocking operation.. new Thread(new Runnable() { + @Override public void run() { try { QueueMasterSlaveTestUsingSharedFileTest.super.createSlave(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/SyncCreateDataSource.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/SyncCreateDataSource.java index a86937be8a..c565b497db 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/SyncCreateDataSource.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/SyncCreateDataSource.java @@ -82,6 +82,7 @@ public class SyncCreateDataSource implements DataSource { return delegate; } + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { return null; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java index cf97994aa4..65de05ee81 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java @@ -36,12 +36,14 @@ public class kahaDbJdbcLeaseQueueMasterSlaveTest extends QueueMasterSlaveTestSup protected String MASTER_URL = "tcp://localhost:62001"; protected String SLAVE_URL = "tcp://localhost:62002"; + @Override protected void setUp() throws Exception { // startup db sharedDs = new SyncCreateDataSource((EmbeddedDataSource) DataSourceServiceSupport.createDataSource(IOHelper.getDefaultDataDirectory())); super.setUp(); } + @Override protected void createMaster() throws Exception { master = new BrokerService(); master.setBrokerName("master"); @@ -67,10 +69,12 @@ public class kahaDbJdbcLeaseQueueMasterSlaveTest extends QueueMasterSlaveTestSup brokerService.setIoExceptionHandler(stopBrokerOnStoreException); } + @Override protected void createSlave() throws Exception { // use a separate thread as the slave will block waiting for // the exclusive db lock Thread t = new Thread() { + @Override public void run() { try { BrokerService broker = new BrokerService(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java index 5eafadc350..e06bb2032a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ft/mKahaDbQueueMasterSlaveTest.java @@ -31,6 +31,7 @@ public class mKahaDbQueueMasterSlaveTest extends QueueMasterSlaveTestSupport { protected String MASTER_URL = "tcp://localhost:62001"; protected String SLAVE_URL = "tcp://localhost:62002"; + @Override protected void createMaster() throws Exception { master = new BrokerService(); master.setBrokerName("master"); @@ -52,10 +53,12 @@ public class mKahaDbQueueMasterSlaveTest extends QueueMasterSlaveTestSupport { master.start(); } + @Override protected void createSlave() throws Exception { // use a separate thread as the slave will block waiting for // the exclusive db lock Thread t = new Thread() { + @Override public void run() { try { BrokerService broker = new BrokerService(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java index e6057e4ac0..24878a2b53 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java @@ -211,6 +211,7 @@ public class PurgeTest extends EmbeddedBrokerTestSupport { return objectName; } + @Override protected void setUp() throws Exception { bindAddress = "tcp://localhost:0"; useTopic = false; @@ -218,6 +219,7 @@ public class PurgeTest extends EmbeddedBrokerTestSupport { mbeanServer = broker.getManagementContext().getMBeanServer(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -226,6 +228,7 @@ public class PurgeTest extends EmbeddedBrokerTestSupport { super.tearDown(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService answer = new BrokerService(); answer.setUseJmx(true); @@ -248,6 +251,7 @@ public class PurgeTest extends EmbeddedBrokerTestSupport { /** * Returns the name of the destination used in this test case */ + @Override protected String getDestinationString() { return getClass().getName() + "." + getName(true); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java index c832238d90..8d6de73a41 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mKahaDBXARecoveryBrokerTest.java @@ -56,6 +56,7 @@ public class mKahaDBXARecoveryBrokerTest extends XARecoveryBrokerTest { junit.textui.TestRunner.run(suite()); } + @Override protected ActiveMQDestination createDestination() { return new ActiveMQQueue("test,special"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java index 0b66883d4e..b766a869a0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/mLevelDBXARecoveryBrokerTest.java @@ -57,14 +57,17 @@ public class mLevelDBXARecoveryBrokerTest extends XARecoveryBrokerTest { junit.textui.TestRunner.run(suite()); } + @Override protected ActiveMQDestination createDestination() { return new ActiveMQQueue("test,special"); } + @Override public void testQueuePersistentPreparedAcksAvailableAfterRestartAndRollback() throws Exception { // super.testQueuePersistentPreparedAcksAvailableAfterRestartAndRollback(); } + @Override public void testQueuePersistentUncommittedAcksLostOnRestart() throws Exception { // super.testQueuePersistentUncommittedAcksLostOnRestart(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java index 1244581fdf..82ca73199e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/message/security/MessageAuthenticationTest.java @@ -83,6 +83,7 @@ public class MessageAuthenticationTest extends EmbeddedBrokerTestSupport { BrokerService answer = new BrokerService(); answer.setPersistent(false); answer.setMessageAuthorizationPolicy(new MessageAuthorizationPolicy() { + @Override public boolean isAllowedToConsume(ConnectionContext context, Message message) { try { Object value = message.getProperty("myHeader"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java index a22dc25241..148a0dba72 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java @@ -36,6 +36,7 @@ public class DeadLetterTest extends DeadLetterTestSupport { protected int rollbackCount; + @Override protected void doTest() throws Exception { connection.start(); @@ -72,11 +73,13 @@ public class DeadLetterTest extends DeadLetterTestSupport { LOG.info("Rolled back: " + rollbackCount + " times"); } + @Override protected void setUp() throws Exception { transactedMode = true; super.setUp(); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory answer = super.createConnectionFactory(); RedeliveryPolicy policy = new RedeliveryPolicy(); @@ -88,6 +91,7 @@ public class DeadLetterTest extends DeadLetterTestSupport { return answer; } + @Override protected Destination createDlqDestination() { return new ActiveMQQueue("ActiveMQ.DLQ"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java index d61baa9a6e..e636d35e28 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java @@ -62,6 +62,7 @@ public abstract class DeadLetterTestSupport extends TestSupport { protected int acknowledgeMode = Session.CLIENT_ACKNOWLEDGE; private Destination destination; + @Override protected void setUp() throws Exception { super.setUp(); broker = createBroker(); @@ -77,6 +78,7 @@ public abstract class DeadLetterTestSupport extends TestSupport { return toString(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java index 138b91faf6..eed3e0855e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java @@ -33,6 +33,7 @@ public class IndividualDeadLetterViaXmlTest extends DeadLetterTest { private static final Logger LOG = LoggerFactory.getLogger(IndividualDeadLetterViaXmlTest.class); + @Override protected BrokerService createBroker() throws Exception { BrokerFactoryBean factory = new BrokerFactoryBean(new ClassPathResource("org/apache/activemq/broker/policy/individual-dlq.xml")); factory.afterPropertiesSet(); @@ -40,6 +41,7 @@ public class IndividualDeadLetterViaXmlTest extends DeadLetterTest { return answer; } + @Override protected Destination createDlqDestination() { String queueName = "Test.DLQ." + getClass().getName() + "." + getName(); LOG.info("Using queue name: " + queueName); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java index 3ee3702506..cdbd6fb452 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/MessageListenerDeadLetterTest.java @@ -41,6 +41,7 @@ public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { private final Error[] error = new Error[1]; + @Override protected void doTest() throws Exception { messageCount = 200; connection.start(); @@ -72,6 +73,7 @@ public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { } } + @Override protected void makeDlqConsumer() throws JMSException { dlqDestination = createDlqDestination(); @@ -96,6 +98,7 @@ public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { ; + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory answer = super.createConnectionFactory(); RedeliveryPolicy policy = new RedeliveryPolicy(); @@ -108,6 +111,7 @@ public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { return answer; } + @Override protected Destination createDlqDestination() { return new ActiveMQQueue("ActiveMQ.DLQ"); } @@ -125,6 +129,7 @@ public class MessageListenerDeadLetterTest extends DeadLetterTestSupport { deliveryCount = delvery; } + @Override public void onMessage(Message message) { try { int expectedMessageId = rollbacks.get() / deliveryCount; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java index 28773f6f51..7258f4227d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java @@ -39,12 +39,15 @@ import org.apache.activemq.command.ActiveMQDestination; public class NoConsumerDeadLetterTest extends DeadLetterTestSupport { // lets disable the inapplicable tests + @Override public void testDurableQueueMessage() throws Exception { } + @Override public void testDurableTopicMessage() throws Exception { } + @Override protected void doTest() throws Exception { makeDlqConsumer(); sendMessages(); @@ -87,6 +90,7 @@ public class NoConsumerDeadLetterTest extends DeadLetterTestSupport { assertNotNull("Message not received", received); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); @@ -101,6 +105,7 @@ public class NoConsumerDeadLetterTest extends DeadLetterTestSupport { return broker; } + @Override protected Destination createDlqDestination() { if (this.topic) { return AdvisorySupport.getNoTopicConsumersAdvisoryTopic((ActiveMQDestination) getDestination()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java index 1c1fa2c9dc..4d123fe2dc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java @@ -33,6 +33,7 @@ import javax.jms.Session; @RunWith(BlockJUnit4ClassRunner.class) public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); @@ -47,6 +48,7 @@ public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest { return broker; } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersSmallMessagesOnePrefetch() throws Exception { super.testOneProducerTwoConsumersSmallMessagesOnePrefetch(); @@ -57,12 +59,14 @@ public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest { assertEachConsumerReceivedAtLeastXMessages(1); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersSmallMessagesLargePrefetch() throws Exception { super.testOneProducerTwoConsumersSmallMessagesLargePrefetch(); assertMessagesDividedAmongConsumers(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersLargeMessagesOnePrefetch() throws Exception { super.testOneProducerTwoConsumersLargeMessagesOnePrefetch(); @@ -73,12 +77,14 @@ public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest { assertEachConsumerReceivedAtLeastXMessages(1); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerTwoConsumersLargeMessagesLargePrefetch() throws Exception { super.testOneProducerTwoConsumersLargeMessagesLargePrefetch(); assertMessagesDividedAmongConsumers(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerManyConsumersFewMessages() throws Exception { super.testOneProducerManyConsumersFewMessages(); @@ -88,12 +94,14 @@ public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest { assertMessagesDividedAmongConsumers(); } + @Override @Test(timeout = 60 * 1000) public void testOneProducerManyConsumersManyMessages() throws Exception { super.testOneProducerManyConsumersManyMessages(); assertMessagesDividedAmongConsumers(); } + @Override @Test(timeout = 60 * 1000) public void testManyProducersManyConsumers() throws Exception { super.testManyProducersManyConsumers(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java index de51ff93b7..4e5f2c7b52 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java @@ -65,9 +65,11 @@ public class SecureDLQTest extends DeadLetterTestSupport { } // lets disable the inapplicable tests + @Override public void testTransientTopicMessage() throws Exception { } + @Override public void testDurableTopicMessage() throws Exception { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java index 842da31db9..252b7037bd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueDuplicatesFromStoreTest.java @@ -338,10 +338,12 @@ public class QueueDuplicatesFromStoreTest extends TestCase { return 0; } + @Override public void incrementConsumedCount() { } + @Override public void resetConsumedCount() { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java index 2bff33cfae..3e1abff911 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueuePurgeTest.java @@ -59,6 +59,7 @@ public class QueuePurgeTest extends CombinationTestSupport { Queue queue; MessageConsumer consumer; + @Override protected void setUp() throws Exception { setMaxTestTime(10 * 60 * 1000); // 10 mins setAutoFail(true); @@ -80,6 +81,7 @@ public class QueuePurgeTest extends CombinationTestSupport { connection.start(); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (consumer != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueResendDuringShutdownTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueResendDuringShutdownTest.java index 9445fe5e71..959c8dbf19 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueResendDuringShutdownTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/QueueResendDuringShutdownTest.java @@ -190,6 +190,7 @@ public class QueueResendDuringShutdownTest { final MessageConsumer fConsumer = consumer; consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message msg) { LOG.debug("got a message on consumer {}", fConsumer); messageReceived(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java index a54c8406d9..a2ec1f7469 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/SubscriptionAddRemoveQueueTest.java @@ -102,6 +102,7 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { public void testNoDispatchToRemovedConsumers() throws Exception { final AtomicInteger producerId = new AtomicInteger(); Runnable sender = new Runnable() { + @Override public void run() { AtomicInteger id = new AtomicInteger(); int producerIdAndIncrement = producerId.getAndIncrement(); @@ -121,6 +122,7 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { }; Runnable subRemover = new Runnable() { + @Override public void run() { for (Subscription sub : subs) { try { @@ -177,9 +179,11 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { List dispatched = Collections.synchronizedList(new ArrayList()); + @Override public void acknowledge(ConnectionContext context, MessageAck ack) throws Exception { } + @Override public void add(MessageReference node) throws Exception { // immediate dispatch QueueMessageReference qmr = (QueueMessageReference) node; @@ -187,6 +191,7 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { dispatched.add(qmr); } + @Override public ConnectionContext getContext() { return null; } @@ -227,75 +232,94 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { public void resetConsumedCount() { } + @Override public void add(ConnectionContext context, Destination destination) throws Exception { } + @Override public void destroy() { } + @Override public void gc() { } + @Override public ConsumerInfo getConsumerInfo() { return info; } + @Override public long getDequeueCounter() { return 0; } + @Override public long getDispatchedCounter() { return 0; } + @Override public int getDispatchedQueueSize() { return 0; } + @Override public long getEnqueueCounter() { return 0; } + @Override public int getInFlightSize() { return 0; } + @Override public int getInFlightUsage() { return 0; } + @Override public ObjectName getObjectName() { return null; } + @Override public int getPendingQueueSize() { return 0; } + @Override public int getPrefetchSize() { return 0; } + @Override public String getSelector() { return null; } + @Override public boolean isBrowser() { return false; } + @Override public boolean isFull() { return false; } + @Override public boolean isHighWaterMark() { return false; } + @Override public boolean isLowWaterMark() { return false; } + @Override public boolean isRecoveryRequired() { return false; } @@ -304,17 +328,21 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { return false; } + @Override public boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException { return true; } + @Override public boolean matches(ActiveMQDestination destination) { return false; } + @Override public void processMessageDispatchNotification(MessageDispatchNotification mdn) throws Exception { } + @Override public Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception { return null; } @@ -324,31 +352,39 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { return false; } + @Override public List remove(ConnectionContext context, Destination destination) throws Exception { return new ArrayList(dispatched); } + @Override public void setObjectName(ObjectName objectName) { } + @Override public void setSelector(String selector) throws InvalidSelectorException, UnsupportedOperationException { } + @Override public void updateConsumerPrefetch(int newPrefetch) { } + @Override public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception { return false; } + @Override public ActiveMQDestination getActiveMQDestination() { return null; } + @Override public int getLockPriority() { return 0; } + @Override public boolean isLockExclusive() { return false; } @@ -359,6 +395,7 @@ public class SubscriptionAddRemoveQueueTest extends TestCase { public void removeDestination(Destination destination) { } + @Override public int countBeforeFull() { return 10; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java index 460cb06cfa..fc5d5e6bfe 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorDurableTest.java @@ -31,11 +31,13 @@ import org.apache.activemq.broker.BrokerService; */ public class CursorDurableTest extends CursorSupport { + @Override protected Destination getDestination(Session session) throws JMSException { String topicName = getClass().getName(); return session.createTopic(topicName); } + @Override protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException { Connection connection = fac.createConnection(); connection.setClientID("testConsumer"); @@ -43,6 +45,7 @@ public class CursorDurableTest extends CursorSupport { return connection; } + @Override protected MessageConsumer getConsumer(Connection connection) throws Exception { Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Topic topic = (Topic) getDestination(consumerSession); @@ -50,6 +53,7 @@ public class CursorDurableTest extends CursorSupport { return consumer; } + @Override protected void configureBroker(BrokerService answer) throws Exception { answer.setDeleteAllMessagesOnStartup(true); answer.addConnector(bindAddress); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java index 6523109efe..f5f3e4c553 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java @@ -35,11 +35,13 @@ import org.apache.activemq.broker.region.policy.StorePendingQueueMessageStorageP */ public class CursorQueueStoreTest extends CursorSupport { + @Override protected Destination getDestination(Session session) throws JMSException { String queueName = "QUEUE" + getClass().getName(); return session.createQueue(queueName); } + @Override protected Connection getConsumerConnection(ConnectionFactory fac) throws JMSException { Connection connection = fac.createConnection(); connection.setClientID("testConsumer"); @@ -47,6 +49,7 @@ public class CursorQueueStoreTest extends CursorSupport { return connection; } + @Override protected MessageConsumer getConsumer(Connection connection) throws Exception { Session consumerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination dest = getDestination(consumerSession); @@ -54,6 +57,7 @@ public class CursorQueueStoreTest extends CursorSupport { return consumer; } + @Override protected void configureBroker(BrokerService answer) throws Exception { PolicyEntry policy = new PolicyEntry(); policy.setPendingQueuePolicy(new StorePendingQueueMessageStoragePolicy()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java index 4d03fa1faf..4ffb73da2f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/CursorSupport.java @@ -115,6 +115,7 @@ public abstract class CursorSupport extends CombinationTestSupport { final CountDownLatch latch = new CountDownLatch(1); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message msg) { try { // sleep to act as a slow consumer @@ -164,6 +165,7 @@ public abstract class CursorSupport extends CombinationTestSupport { return connection; } + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -171,6 +173,7 @@ public abstract class CursorSupport extends CombinationTestSupport { super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java index c3a6a2fe53..55430ae19c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreBasedCursorTest.java @@ -52,6 +52,7 @@ public class StoreBasedCursorTest extends TestCase { // gives the usageChange listener in the cursor an opportunity to kick in. int memoryLimit = 12 * messageSize; + @Override protected void setUp() throws Exception { super.setUp(); if (broker == null) { @@ -60,6 +61,7 @@ public class StoreBasedCursorTest extends TestCase { } } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java index 68a2b51614..1320432ba6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorJDBCNoDuplicateTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter; */ public class StoreQueueCursorJDBCNoDuplicateTest extends StoreQueueCursorNoDuplicateTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); PersistenceAdapter persistenceAdapter = new JDBCPersistenceAdapter(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java index 616b374ca6..a22fe621be 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/cursors/StoreQueueCursorMemoryNoDuplicateTest.java @@ -25,6 +25,7 @@ import org.apache.activemq.broker.BrokerService; */ public class StoreQueueCursorMemoryNoDuplicateTest extends StoreQueueCursorNoDuplicateTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPersistent(false); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java index 538593b03a..f51de26b23 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupHashBucketTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.broker.region.group; */ public class MessageGroupHashBucketTest extends MessageGroupMapTest { + @Override protected MessageGroupMap createMessageGroupMap() { return new MessageGroupHashBucket(1024, 64); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java index 9c80487393..a890ea39a0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java @@ -75,6 +75,7 @@ public class MessageGroupMapTest extends TestCase { assertContains(set, "2"); } + @Override protected void setUp() throws Exception { super.setUp(); map = createMessageGroupMap(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java index 8d030e03a8..49d5bd5d6b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreBrokerTest.java @@ -29,6 +29,7 @@ import org.apache.activemq.broker.BrokerTest; */ public class DefaultStoreBrokerTest extends BrokerTest { + @Override protected BrokerService createBroker() throws Exception { return BrokerFactory.createBroker(new URI("broker://()/localhost?deleteAllMessagesOnStartup=true")); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java index f75373d73b..7aa2d13f49 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/store/DefaultStoreRecoveryBrokerTest.java @@ -29,10 +29,12 @@ import org.apache.activemq.broker.RecoveryBrokerTest; */ public class DefaultStoreRecoveryBrokerTest extends RecoveryBrokerTest { + @Override protected BrokerService createBroker() throws Exception { return BrokerFactory.createBroker(new URI("broker://()/localhost?deleteAllMessagesOnStartup=true")); } + @Override protected BrokerService createRestartedBroker() throws Exception { return BrokerFactory.createBroker(new URI("broker://()/localhost")); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java index a0e5abd646..cc4b36aba4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/PluginBrokerTest.java @@ -37,11 +37,13 @@ public class PluginBrokerTest extends JmsTopicSendReceiveTest { private static final Logger LOG = LoggerFactory.getLogger(PluginBrokerTest.class); private BrokerService broker; + @Override protected void setUp() throws Exception { broker = createBroker(); super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { @@ -58,6 +60,7 @@ public class PluginBrokerTest extends JmsTopicSendReceiveTest { return BrokerFactory.createBroker(new URI("xbean:" + uri)); } + @Override protected void assertMessageValid(int index, Message message) throws JMSException { // check if broker path has been set assertEquals("localhost", message.getStringProperty("BrokerPath")); @@ -77,6 +80,7 @@ public class PluginBrokerTest extends JmsTopicSendReceiveTest { super.assertMessageValid(index, message); } + @Override protected void sendMessage(int index, Message message) throws Exception { if (index == 7) { producer.send(producerDestination, message, Message.DEFAULT_DELIVERY_MODE, Message.DEFAULT_PRIORITY, 2000); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TimeStampingBrokerPluginTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TimeStampingBrokerPluginTest.java index 0d1cbbc0f8..d14caaa0e8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TimeStampingBrokerPluginTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TimeStampingBrokerPluginTest.java @@ -50,6 +50,7 @@ public class TimeStampingBrokerPluginTest extends TestCase { String queue = "TEST.FOO"; long expiry = 500; + @Override @Before public void setUp() throws Exception { TimeStampingBrokerPlugin tsbp = new TimeStampingBrokerPlugin(); @@ -95,6 +96,7 @@ public class TimeStampingBrokerPluginTest extends TestCase { producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); } + @Override @After public void tearDown() throws Exception { // Clean up diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TraceBrokerPathPluginTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TraceBrokerPathPluginTest.java index b385c5aa6c..cd55d4ddd7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TraceBrokerPathPluginTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/util/TraceBrokerPathPluginTest.java @@ -54,6 +54,7 @@ public class TraceBrokerPathPluginTest extends TestCase { String queue = "TEST.FOO"; String traceProperty = "BROKER_PATH"; + @Override @Before public void setUp() throws Exception { TraceBrokerPathPlugin tbppA = new TraceBrokerPathPlugin(); @@ -98,6 +99,7 @@ public class TraceBrokerPathPluginTest extends TestCase { } + @Override @After public void tearDown() throws Exception { // Clean up diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java index 4a0f7ccdb5..2d8adb548d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java @@ -113,6 +113,7 @@ public class CompositeQueueTest extends EmbeddedBrokerTestSupport { return new ActiveMQQueue("MY.QUEUE"); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -120,6 +121,7 @@ public class CompositeQueueTest extends EmbeddedBrokerTestSupport { super.tearDown(); } + @Override protected BrokerService createBroker() throws Exception { XBeanBrokerFactory factory = new XBeanBrokerFactory(); BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri())); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java index 0035fe3fac..9ada103976 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java @@ -27,18 +27,22 @@ import org.apache.activemq.command.ActiveMQTopic; */ public class CompositeTopicTest extends CompositeQueueTest { + @Override protected Destination getConsumer1Dsetination() { return new ActiveMQQueue("FOO"); } + @Override protected Destination getConsumer2Dsetination() { return new ActiveMQTopic("BAR"); } + @Override protected Destination getProducerDestination() { return new ActiveMQTopic("MY.TOPIC"); } + @Override protected String getBrokerConfigUri() { return "org/apache/activemq/broker/virtual/composite-topic.xml"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/DestinationInterceptorDurableSubTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/DestinationInterceptorDurableSubTest.java index fb001ee924..205a7b94b8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/DestinationInterceptorDurableSubTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/DestinationInterceptorDurableSubTest.java @@ -199,10 +199,12 @@ public class DestinationInterceptorDurableSubTest extends EmbeddedBrokerTestSupp return false; } + @Override protected void tearDown() throws Exception { super.tearDown(); } + @Override protected BrokerService createBroker() throws Exception { XBeanBrokerFactory factory = new XBeanBrokerFactory(); BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri())); @@ -241,11 +243,13 @@ public class DestinationInterceptorDurableSubTest extends EmbeddedBrokerTestSupp /* (non-Javadoc) * @see org.apache.activemq.broker.region.DestinationInterceptor#intercept(org.apache.activemq.broker.region.Destination) */ + @Override public Destination intercept(final Destination destination) { LOG.info("intercept({})", destination.getName()); if (!destination.getActiveMQDestination().getPhysicalName().startsWith("ActiveMQ")) { return new DestinationFilter(destination) { + @Override public void send(ProducerBrokerExchange context, Message message) throws Exception { // Send message to Destination if (LOG.isDebugEnabled()) { @@ -262,6 +266,7 @@ public class DestinationInterceptorDurableSubTest extends EmbeddedBrokerTestSupp /* (non-Javadoc) * @see org.apache.activemq.broker.region.DestinationInterceptor#remove(org.apache.activemq.broker.region.Destination) */ + @Override public void remove(Destination destination) { LOG.info("remove({})", destination.getName()); this.broker = null; @@ -270,6 +275,7 @@ public class DestinationInterceptorDurableSubTest extends EmbeddedBrokerTestSupp /* (non-Javadoc) * @see org.apache.activemq.broker.region.DestinationInterceptor#create(org.apache.activemq.broker.Broker, org.apache.activemq.broker.ConnectionContext, org.apache.activemq.command.ActiveMQDestination) */ + @Override public void create(Broker broker, ConnectionContext context, ActiveMQDestination destination) throws Exception { LOG.info("create(" + broker.getBrokerName() + ", " + context.toString() + ", " + destination.getPhysicalName()); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueCorrectMemoryUsageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueCorrectMemoryUsageTest.java index 3b0c03d259..47fa95ff36 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueCorrectMemoryUsageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/MirroredQueueCorrectMemoryUsageTest.java @@ -132,11 +132,13 @@ public class MirroredQueueCorrectMemoryUsageTest extends EmbeddedBrokerTestSuppo return broker; } + @Override @Before protected void setUp() throws Exception { super.setUp(); } + @Override @After protected void tearDown() throws Exception { super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDLQTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDLQTest.java index 9abcbc71f1..9e8974b9e1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDLQTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDLQTest.java @@ -74,6 +74,7 @@ public class VirtualTopicDLQTest extends TestCase { // Number of messages private static final int numberMessages = 6; + @Override @Before public void setUp() throws Exception { try { @@ -87,6 +88,7 @@ public class VirtualTopicDLQTest extends TestCase { } } + @Override @After public void tearDown() throws Exception { try { @@ -235,6 +237,7 @@ public class VirtualTopicDLQTest extends TestCase { return latch; } + @Override public void run() { ActiveMQConnectionFactory connectionFactory = null; ActiveMQConnection connection = null; @@ -326,6 +329,7 @@ public class VirtualTopicDLQTest extends TestCase { return latch; } + @Override public void run() { try { @@ -383,6 +387,7 @@ public class VirtualTopicDLQTest extends TestCase { } } + @Override public synchronized void onException(JMSException ex) { ex.printStackTrace(); LOG.error("Consumer for destination, (" + destinationName + "), JMS Exception occurred. Shutting down client."); @@ -392,6 +397,7 @@ public class VirtualTopicDLQTest extends TestCase { this.bStop = bStop; } + @Override public synchronized void onMessage(Message message) { receivedMessageCounter++; latch.countDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDisconnectSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDisconnectSelectorTest.java index 7b5fc7b3e8..925b82caa6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDisconnectSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicDisconnectSelectorTest.java @@ -73,6 +73,7 @@ public class VirtualTopicDisconnectSelectorTest extends EmbeddedBrokerTestSuppor MessageConsumer consumer = createConsumer(session, destination, messageSelector); MessageListener listener = new MessageListener() { + @Override public void onMessage(Message message) { messageList.onMessage(message); try { @@ -116,6 +117,7 @@ public class VirtualTopicDisconnectSelectorTest extends EmbeddedBrokerTestSuppor return new ActiveMQTopic("VirtualTopic.TEST"); } + @Override protected void setUp() throws Exception { super.setUp(); } @@ -176,6 +178,7 @@ public class VirtualTopicDisconnectSelectorTest extends EmbeddedBrokerTestSuppor return "org/apache/activemq/broker/virtual/disconnected-selector.xml"; } + @Override protected BrokerService createBroker() throws Exception { XBeanBrokerFactory factory = new XBeanBrokerFactory(); BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri())); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java index 0fcbf0b41c..e203fb9bbd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java @@ -58,6 +58,7 @@ public class VirtualTopicPubSubTest extends EmbeddedBrokerTestSupport { public void doTestVirtualTopicCreation(int total) throws Exception { ConsumerBean messageList = new ConsumerBean() { + @Override public synchronized void onMessage(Message message) { super.onMessage(message); if (ackMode == Session.CLIENT_ACKNOWLEDGE) { @@ -120,6 +121,7 @@ public class VirtualTopicPubSubTest extends EmbeddedBrokerTestSupport { return "Consumer.A.VirtualTopic.TEST"; } + @Override protected void tearDown() throws Exception { for (Connection connection : connections) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java index 3c1c09298f..1d7ea7194c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java @@ -27,14 +27,17 @@ import org.apache.activemq.xbean.XBeanBrokerFactory; */ public class VirtualTopicPubSubUsingXBeanTest extends VirtualTopicPubSubTest { + @Override protected String getVirtualTopicConsumerName() { return "VirtualTopicConsumers.ConsumerNumberOne.FOO"; } + @Override protected String getVirtualTopicName() { return "FOO"; } + @Override protected BrokerService createBroker() throws Exception { XBeanBrokerFactory factory = new XBeanBrokerFactory(); BrokerService answer = factory.createBroker(new URI(getBrokerConfigUri())); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java index f8a95a2491..d94dd18677 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicSelectorTest.java @@ -37,14 +37,17 @@ public class VirtualTopicSelectorTest extends CompositeTopicTest { private static final Logger LOG = LoggerFactory.getLogger(VirtualTopicSelectorTest.class); + @Override protected Destination getConsumer1Dsetination() { return new ActiveMQQueue("Consumer.1.VirtualTopic.TEST"); } + @Override protected Destination getConsumer2Dsetination() { return new ActiveMQQueue("Consumer.2.VirtualTopic.TEST"); } + @Override protected Destination getProducerDestination() { return new ActiveMQTopic("VirtualTopic.TEST"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java index 2587cda7ba..4abf81167b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicsAndDurableSubsTest.java @@ -86,6 +86,7 @@ public class VirtualTopicsAndDurableSubsTest extends MBeanTest { return "simple.topic"; } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -94,18 +95,23 @@ public class VirtualTopicsAndDurableSubsTest extends MBeanTest { } //Overrides test cases from MBeanTest to avoid having them run. + @Override public void testMBeans() throws Exception { } + @Override public void testMoveMessages() throws Exception { } + @Override public void testRetryMessages() throws Exception { } + @Override public void testMoveMessagesBySelector() throws Exception { } + @Override public void testCopyMessagesBySelector() throws Exception { } } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java index 0366b6c848..78a60884fc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1687Test.java @@ -90,11 +90,13 @@ public class AMQ1687Test extends EmbeddedBrokerTestSupport { return "Consumer.B.VirtualTopic.TEST"; } + @Override protected void setUp() throws Exception { this.bindAddress = "tcp://localhost:0"; super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1853Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1853Test.java index 6d378d6a39..85d6c83acb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1853Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1853Test.java @@ -170,6 +170,7 @@ public class AMQ1853Test { return latch; } + @Override public void run() { ActiveMQConnectionFactory connectionFactory = null; @@ -264,6 +265,7 @@ public class AMQ1853Test { return bMessageReceiptIsOrdered; } + @Override public void run() { try { @@ -317,6 +319,7 @@ public class AMQ1853Test { } } + @Override public synchronized void onException(JMSException ex) { LOG.error("Consumer for destination, (" + destinationName + "), JMS Exception occurred. Shutting down client."); } @@ -325,6 +328,7 @@ public class AMQ1853Test { this.bStop = bStop; } + @Override public synchronized void onMessage(Message message) { receivedMessageCounter++; latch.countDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1866.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1866.java index 9a3aab2b82..4b960c451b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1866.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1866.java @@ -185,6 +185,7 @@ public class AMQ1866 extends TestCase { super(threadId); } + @Override public void run() { Connection connection = null; try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java index 701b2f1525..b9cb919fab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1893Test.java @@ -129,6 +129,7 @@ public class AMQ1893Test extends TestCase { final int totalMessageCount = MESSAGE_COUNT_OF_ONE_GROUP * PRIORITIES.length; final AtomicInteger counter = new AtomicInteger(); final MessageListener listener = new MessageListener() { + @Override public void onMessage(Message message) { if (debug) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java index abb331c6e5..3ae47ad893 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ1917Test.java @@ -61,6 +61,7 @@ public class AMQ1917Test extends TestCase { final Session[] sessions = new Session[NUM_THREADS]; final MessageProducer[] producers = new MessageProducer[NUM_THREADS]; + @Override public void setUp() throws Exception { broker = new BrokerService(); broker.setPersistent(false); @@ -75,6 +76,7 @@ public class AMQ1917Test extends TestCase { tpe.setThreadFactory(limitedthreadFactory); } + @Override public void tearDown() throws Exception { broker.stop(); tpe.shutdown(); @@ -118,6 +120,7 @@ public class AMQ1917Test extends TestCase { connection.start(); new Thread() { + @Override public void run() { while (working) { // wait for messages in infinitive loop @@ -169,6 +172,7 @@ public class AMQ1917Test extends TestCase { return idx; } + @Override public void run() { try { // get thread session and producer from pool @@ -212,6 +216,7 @@ public class AMQ1917Test extends TestCase { this.factory = threadFactory; } + @Override public Thread newThread(Runnable arg0) { if (++threadCount > NUM_THREADS) { errorLatch.countDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java index 8009699326..de9f2b54f6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2084Test.java @@ -86,6 +86,7 @@ public class AMQ2084Test { QueueReceiver receiver = session.createReceiver(queue, selectors); System.out.println("Message Selector: " + receiver.getMessageSelector()); receiver.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { if (message instanceof TextMessage) { @@ -124,6 +125,7 @@ public class AMQ2084Test { TopicSubscriber receiver = session.createSubscriber(topic, selectors, false); receiver.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { if (message instanceof TextMessage) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java index bc610de994..ae8ca8ce21 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2149Test.java @@ -191,6 +191,7 @@ public class AMQ2149Test { final int TRANSACITON_BATCH = 500; boolean resumeOnNextOrPreviousIsOk = false; + @Override public void onMessage(Message message) { try { final long seqNum = message.getLongProperty(SEQ_NUM_PROPERTY); @@ -267,6 +268,7 @@ public class AMQ2149Test { connections.add(connection); } + @Override public void run() { final String longString = buildLongString(); long nextSequenceNumber = this.nextSequenceNumber; @@ -318,6 +320,7 @@ public class AMQ2149Test { // attempt to simply replicate leveldb failure. no joy yet public void x_testRestartReReceive() throws Exception { createBroker(new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { broker.deleteAllMessages(); } @@ -338,6 +341,7 @@ public class AMQ2149Test { long expectedSeq; final TimerTask restartTask = scheduleRestartTask(null, new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { } }); @@ -364,6 +368,7 @@ public class AMQ2149Test { public void vanilaVerify_testOrder() throws Exception { createBroker(new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { broker.deleteAllMessages(); } @@ -376,6 +381,7 @@ public class AMQ2149Test { @Test(timeout = 5 * 60 * 1000) public void testOrderWithRestart() throws Exception { createBroker(new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { broker.deleteAllMessages(); } @@ -383,6 +389,7 @@ public class AMQ2149Test { final Timer timer = new Timer(); scheduleRestartTask(timer, new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { } }); @@ -400,6 +407,7 @@ public class AMQ2149Test { @Test(timeout = 5 * 60 * 1000) public void testTopicOrderWithRestart() throws Exception { createBroker(new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { broker.deleteAllMessages(); } @@ -434,6 +442,7 @@ public class AMQ2149Test { brokerStopPeriod = 10 * 1000; createBroker(new Configurer() { + @Override public void configure(BrokerService broker) throws Exception { broker.deleteAllMessages(); } @@ -472,6 +481,7 @@ public class AMQ2149Test { private TimerTask scheduleRestartTask(final Timer timer, final Configurer configurer) { class RestartTask extends TimerTask { + @Override public void run() { synchronized (brokerLock) { LOG.info("stopping broker.."); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java index 80dd0134c7..510ccb1dc2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2171Test.java @@ -144,6 +144,7 @@ public class AMQ2171Test implements Thread.UncaughtExceptionHandler { } } + @Override public void uncaughtException(Thread t, Throwable e) { exceptions.add(e); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java index a0baf1d341..fde821faf0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2314Test.java @@ -82,6 +82,7 @@ public class AMQ2314Test extends CombinationTestSupport { connection.start(); Thread producingThread = new Thread("Producing thread") { + @Override public void run() { try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -101,6 +102,7 @@ public class AMQ2314Test extends CombinationTestSupport { }; Thread consumingThread = new Thread("Consuming thread") { + @Override public void run() { try { int count = 0; @@ -143,12 +145,14 @@ public class AMQ2314Test extends CombinationTestSupport { LOG.info("Subscription Usage: " + tempUsageBySubscription + ", endUsage: " + broker.getSystemUsage().getTempUsage().getUsage()); assertTrue("temp usage decreased with removed sub", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return broker.getSystemUsage().getTempUsage().getUsage() < tempUsageBySubscription; } })); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); @@ -166,6 +170,7 @@ public class AMQ2314Test extends CombinationTestSupport { connectionUri = broker.getTransportConnectors().get(0).getPublishableConnectString(); } + @Override public void tearDown() throws Exception { broker.stop(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java index 67b5c43c70..f4fb8a26f1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2439Test.java @@ -47,6 +47,7 @@ public class AMQ2439Test extends JmsMultipleBrokersTestSupport { assertEquals("enequeue is correct", 1000, brokerView.getTotalEnqueueCount()); assertTrue("dequeue is correct", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { LOG.info("dequeue count (want 1000), is : " + brokerView.getTotalDequeueCount()); return 1000 == brokerView.getTotalDequeueCount(); @@ -77,6 +78,7 @@ public class AMQ2439Test extends JmsMultipleBrokersTestSupport { return i; } + @Override public void setUp() throws Exception { super.setUp(); createBroker(new URI("broker:(tcp://localhost:61616)/BrokerA?persistent=true&deleteAllMessagesOnStartup=true&advisorySupport=false")); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java index 423285e6bd..cc9630fa92 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2489Test.java @@ -60,11 +60,13 @@ public class AMQ2489Test extends TestSupport { private Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -162,6 +164,7 @@ public class AMQ2489Test extends TestSupport { } } + @Override public void onMessage(Message message) { try { // retrieve sequence number assigned by producer... @@ -208,6 +211,7 @@ public class AMQ2489Test extends TestSupport { private final java.util.Queue exceptions = new ConcurrentLinkedQueue(); + @Override public void onException(JMSException e) { exceptions.add(e); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java index 2d3c06d128..d950459855 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2512Test.java @@ -112,6 +112,7 @@ public class AMQ2512Test extends EmbeddedBrokerTestSupport { } } + @Override public void onMessage(Message message) { final TextMessage msg = (TextMessage) message; try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2528Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2528Test.java index f6f0b24733..148ab321dd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2528Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2528Test.java @@ -35,6 +35,7 @@ public class AMQ2528Test extends EmbeddedBrokerTestSupport { /** * Setup the test so that the destination is a queue. */ + @Override protected void setUp() throws Exception { useTopic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java index 1e4d4400df..0c3ef454a4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2571Test.java @@ -56,6 +56,7 @@ public class AMQ2571Test extends EmbeddedBrokerTestSupport { final TextMessage message = sessionB.createTextMessage("Testing AMQ TempQueue."); Thread sendingThread = new Thread(new Runnable() { + @Override public void run() { try { long end = System.currentTimeMillis() + 5 * 60 * 1000; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java index 2b295fc15a..9d79a8ece5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2580Test.java @@ -55,6 +55,7 @@ public class AMQ2580Test extends TestSupport { return suite(AMQ2580Test.class); } + @Override protected void setUp() throws Exception { super.setUp(); initDurableBroker(); @@ -62,6 +63,7 @@ public class AMQ2580Test extends TestSupport { initTopic(); } + @Override protected void tearDown() throws Exception { shutdownClient(); service.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java index 62d73f19ce..35ac1f8119 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2584ConcurrentDlqTest.java @@ -99,6 +99,7 @@ public class AMQ2584ConcurrentDlqTest extends org.apache.activemq.TestSupport { Thread.sleep(5000); FilenameFilter justLogFiles = new FilenameFilter() { + @Override public boolean accept(File file, String s) { return s.endsWith(".log"); } @@ -118,6 +119,7 @@ public class AMQ2584ConcurrentDlqTest extends org.apache.activemq.TestSupport { consumerSession = consumerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageListener listener = new MessageListener() { + @Override public void onMessage(Message message) { latch.countDown(); try { @@ -142,6 +144,7 @@ public class AMQ2584ConcurrentDlqTest extends org.apache.activemq.TestSupport { Session dlqSession = dlqConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer dlqConsumer = dlqSession.createConsumer(new ActiveMQQueue("ActiveMQ.DLQ")); dlqConsumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (received.getCount() > 0 && received.getCount() % 200 == 0) { LOG.info("remaining on DLQ: " + received.getCount()); @@ -238,6 +241,7 @@ public class AMQ2584ConcurrentDlqTest extends org.apache.activemq.TestSupport { broker = null; } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://testStoreSize?jms.watchTopicAdvisories=false&jms.redeliveryPolicy.maximumRedeliveries=1&jms.redeliveryPolicy.initialRedeliveryDelay=0&waitForStart=5000&create=false"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java index 6f7c5da2db..61a5d1eb5f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2645Test.java @@ -58,6 +58,7 @@ public class AMQ2645Test extends EmbeddedBrokerTestSupport { final MessageConsumer consumer = session.createConsumer(session.createQueue(QUEUE_NAME)); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { afterRestart.await(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java index 80b6cfa9e7..539354c1a4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java @@ -57,6 +57,7 @@ public class AMQ2751Test extends EmbeddedBrokerTestSupport { MessageConsumer consumer = session.createConsumer(queue); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { LOG.info("Got message: " + message.getJMSMessageID()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3014Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3014Test.java index b3908d634d..a67ef33fb7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3014Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3014Test.java @@ -153,6 +153,7 @@ public class AMQ3014Test { // local VMTransport dispatcher is artificially delayed. final TaskRunnerFactory realTaskRunnerFactory = localBroker.getTaskRunnerFactory(); localBroker.setTaskRunnerFactory(new TaskRunnerFactory() { + @Override public TaskRunner createTaskRunner(Task task, String name) { final TaskRunner realTaskRunner = realTaskRunnerFactory.createTaskRunner(task, name); if (name.startsWith("ActiveMQ Connection Dispatcher: ")) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3274Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3274Test.java index cdfe17ba20..08c2f78097 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3274Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3274Test.java @@ -294,6 +294,7 @@ public class AMQ3274Test { // the remote must already be running. start1 = new Thread() { + @Override public void run() { try { broker1.start(); @@ -305,6 +306,7 @@ public class AMQ3274Test { }; start2 = new Thread() { + @Override public void run() { try { broker2.start(); @@ -545,6 +547,7 @@ public class AMQ3274Test { shutdownLatch = new CountDownLatch(1); } + @Override public void run() { CountDownLatch latch; @@ -681,6 +684,7 @@ public class AMQ3274Test { this(dest, ActiveMQConnection.makeConnection(broker_url)); } + @Override public void run() { Message req; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3436Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3436Test.java index 05827d2c4a..8fd2765704 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3436Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3436Test.java @@ -144,6 +144,7 @@ public class AMQ3436Test { boolean firstMessage = true; + @Override public void onMessage(Message msg) { try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3465Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3465Test.java index 1d3d9edade..5e6b2ff473 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3465Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3465Test.java @@ -179,14 +179,17 @@ public class AMQ3465Test { final byte[] bs = baos.toByteArray(); return new Xid() { + @Override public int getFormatId() { return 86; } + @Override public byte[] getGlobalTransactionId() { return bs; } + @Override public byte[] getBranchQualifier() { return bs; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3678Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3678Test.java index 92ae7d6c13..26bef7db28 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3678Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3678Test.java @@ -106,6 +106,7 @@ public class AMQ3678Test implements MessageListener { private boolean done = false; + @Override public void run() { while (!done) { if (messagesSent.get() == 50) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3932Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3932Test.java index d42733dd73..f29ad948d9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3932Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ3932Test.java @@ -83,6 +83,7 @@ public class AMQ3932Test { ExecutorService executor = Executors.newSingleThreadExecutor(); executor.execute(new Runnable() { + @Override public void run() { try { started.countDown(); @@ -113,6 +114,7 @@ public class AMQ3932Test { ExecutorService executor = Executors.newSingleThreadExecutor(); executor.execute(new Runnable() { + @Override public void run() { try { started.countDown(); @@ -143,6 +145,7 @@ public class AMQ3932Test { ExecutorService executor = Executors.newSingleThreadExecutor(); executor.execute(new Runnable() { + @Override public void run() { try { started.countDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4083Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4083Test.java index c554af2f5e..c655a226ff 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4083Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4083Test.java @@ -113,6 +113,7 @@ public class AMQ4083Test { assertEquals(101, queueView.getInFlightCount()); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { message.acknowledge(); @@ -132,6 +133,7 @@ public class AMQ4083Test { assertTrue("Inflight count should reach zero, currently: " + queueView.getInFlightCount(), Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return queueView.getInFlightCount() == 0; } @@ -175,6 +177,7 @@ public class AMQ4083Test { assertEquals(101, queueView.getInFlightCount()); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { session.commit(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4092Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4092Test.java index 3a072c240b..633d246631 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4092Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4092Test.java @@ -155,6 +155,7 @@ public class AMQ4092Test extends TestCase { final int totalMessageCount = NUM_TO_SEND_PER_PRODUCER * DESTINATIONS.length * NUM_PRODUCERS; final AtomicInteger counter = new AtomicInteger(); final MessageListener listener = new MessageListener() { + @Override public void onMessage(Message message) { if (debug) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4160Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4160Test.java index b32c76a60d..0cd8e0b84e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4160Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4160Test.java @@ -57,6 +57,7 @@ public class AMQ4160Test extends JmsMultipleBrokersTestSupport { * Since these tests involve wait conditions, protect against indefinite * waits (due to unanticipated issues). */ + @Override public void setUp() throws Exception { setAutoFail(true); setMaxTestTime(MAX_TEST_TIME); @@ -327,6 +328,7 @@ public class AMQ4160Test extends JmsMultipleBrokersTestSupport { return next.getMbeanObjectName(); } + @Override public void resetStats() { next.resetStats(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4221Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4221Test.java index 8bb4f9a16f..5a6c630af2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4221Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4221Test.java @@ -93,6 +93,7 @@ public class AMQ4221Test extends TestSupport { System.err.println("exit on error: " + event.getMessage()); done.set(true); new Thread() { + @Override public void run() { System.exit(787); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitLevelDBTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitLevelDBTest.java index 1a320c2c5a..efaf48431b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitLevelDBTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitLevelDBTest.java @@ -28,6 +28,7 @@ public class AMQ4485LowLimitLevelDBTest extends AMQ4485LowLimitTest { numBrokers = 2; } + @Override protected BrokerService createBroker(int brokerid, boolean addToNetwork) throws Exception { BrokerService broker = super.createBroker(brokerid, addToNetwork); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java index 20c3b077f6..ba64b8b13d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485LowLimitTest.java @@ -458,6 +458,7 @@ public class AMQ4485LowLimitTest extends JmsMultipleBrokersTestSupport { } } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java index 40459bcb97..add1526dab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest.java @@ -342,6 +342,7 @@ public class AMQ4485NetworkOfXBrokersWithNDestsFanoutTransactionTest extends Jms } } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485Test.java index 98f50204f5..c9176daa5e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4485Test.java @@ -80,6 +80,7 @@ public class AMQ4485Test extends TestCase { if (true) { TransactionBroker transactionBroker = (TransactionBroker) broker.getBroker().getAdaptor(TransactionBroker.class); transactionBroker.getTransaction(producerExchange.getConnectionContext(), messageSend.getTransactionId(), false).addSynchronization(new Synchronization() { + @Override public void afterCommit() throws Exception { LOG.error("AfterCommit, NUM:" + num + ", " + messageSend.getMessageId() + ", tx: " + messageSend.getTransactionId()); if (num == 5) { @@ -174,6 +175,7 @@ public class AMQ4485Test extends TestCase { return session; } + @Override protected void setUp() throws Exception { super.setUp(); broker = new BrokerService(); @@ -185,6 +187,7 @@ public class AMQ4485Test extends TestCase { } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4607Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4607Test.java index 53a048e89b..841f46370a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4607Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4607Test.java @@ -230,6 +230,7 @@ public class AMQ4607Test extends JmsMultipleBrokersTestSupport implements Uncaug }, timeout)); } + @Override public void setUp() throws Exception { super.setUp(); @@ -253,6 +254,7 @@ public class AMQ4607Test extends JmsMultipleBrokersTestSupport implements Uncaug brokerService.setDestinationPolicy(policyMap); } + @Override public void uncaughtException(Thread t, Throwable e) { synchronized (unhandeledExceptions) { unhandeledExceptions.put(t, e); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java index 11241c634d..9cb9c66438 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4636Test.java @@ -237,6 +237,7 @@ public class AMQ4636Test { public class TestJDBCPersistenceAdapter extends JDBCPersistenceAdapter { + @Override public TransactionContext getTransactionContext() throws IOException { return new TestTransactionContext(this); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4930Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4930Test.java index ad8cb287b8..48058732a8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4930Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4930Test.java @@ -123,6 +123,7 @@ public class AMQ4930Test extends TestCase { } } + @Override protected void setUp() throws Exception { super.setUp(); broker = new BrokerService(); @@ -134,6 +135,7 @@ public class AMQ4930Test extends TestCase { } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4950Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4950Test.java index 91d9b8d5bb..1f4edc0276 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4950Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ4950Test.java @@ -142,14 +142,17 @@ public class AMQ4950Test extends BrokerRestartTestSupport { final byte[] bs = baos.toByteArray(); return new Xid() { + @Override public int getFormatId() { return 86; } + @Override public byte[] getGlobalTransactionId() { return bs; } + @Override public byte[] getBranchQualifier() { return bs; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java index 3adc8f1019..405e56bc9c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266SingleDestTest.java @@ -318,6 +318,7 @@ public class AMQ5266SingleDestTest { mp = session.createProducer(q); } + @Override public void run() { try { @@ -527,6 +528,7 @@ public class AMQ5266SingleDestTest { idList = idsByQueue.get(queueName); } + @Override public void run() { try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java index 0c1d6a492e..86dcf5ad18 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266StarvedConsumerTest.java @@ -323,6 +323,7 @@ public class AMQ5266StarvedConsumerTest { mp = session.createProducer(null); } + @Override public void run() { try { @@ -538,6 +539,7 @@ public class AMQ5266StarvedConsumerTest { idList = idsByQueue.get(queueName); } + @Override public void run() { try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java index 980a04e602..582600c823 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5266Test.java @@ -302,6 +302,7 @@ public class AMQ5266Test { mp = session.createProducer(q); } + @Override public void run() { try { @@ -512,6 +513,7 @@ public class AMQ5266Test { idList = idsByQueue.get(queueName); } + @Override public void run() { try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java index df1f80a35d..10b616845e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/AMQ5567Test.java @@ -59,6 +59,7 @@ public class AMQ5567Test extends BrokerRestartTestSupport { broker.setPersistenceAdapter(persistenceAdapter); } + @Override protected PolicyEntry getDefaultPolicy() { PolicyEntry policy = new PolicyEntry(); policy.setMemoryLimit(60 * 1024); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java index ca053257d0..2d6a48c361 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/ConnectionPerMessageTest.java @@ -79,11 +79,13 @@ public class ConnectionPerMessageTest extends EmbeddedBrokerTestSupport { } } + @Override protected void setUp() throws Exception { bindAddress = "vm://localhost"; super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService answer = new BrokerService(); answer.setDeleteAllMessagesOnStartup(true); @@ -93,10 +95,12 @@ public class ConnectionPerMessageTest extends EmbeddedBrokerTestSupport { return answer; } + @Override protected boolean isPersistent() { return true; } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java index f2d245e759..35da06c85d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java @@ -38,6 +38,7 @@ public class CraigsBugTest extends EmbeddedBrokerTestSupport { final Connection conn = cf.createConnection(); Runnable r = new Runnable() { + @Override public void run() { try { Session session = conn.createSession(false, 1); @@ -60,6 +61,7 @@ public class CraigsBugTest extends EmbeddedBrokerTestSupport { } } + @Override protected void setUp() throws Exception { bindAddress = "tcp://localhost:0"; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java index f493eb9557..a79ca58e52 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java @@ -35,6 +35,7 @@ public class DoubleExpireTest extends EmbeddedBrokerTestSupport { private static final long MESSAGE_TTL_MILLIS = 1000; private static final long MAX_TEST_TIME_MILLIS = 60000; + @Override public void setUp() throws Exception { setAutoFail(true); setMaxTestTime(MAX_TEST_TIME_MILLIS); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java index 06c3568ee6..695b1a4759 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DurableConsumerTest.java @@ -109,6 +109,7 @@ public class DurableConsumerTest extends CombinationTestSupport { } } + @Override public void onMessage(Message arg0) { } @@ -122,6 +123,7 @@ public class DurableConsumerTest extends CombinationTestSupport { } } + @Override public void onException(JMSException exception) { exceptions.add(exception); } @@ -131,6 +133,7 @@ public class DurableConsumerTest extends CombinationTestSupport { private final boolean shouldPublish = true; + @Override public void run() { TopicConnectionFactory topicConnectionFactory = null; TopicConnection topicConnection = null; @@ -186,6 +189,7 @@ public class DurableConsumerTest extends CombinationTestSupport { final int id = i; Thread thread = new Thread(new Runnable() { + @Override public void run() { SimpleTopicSubscriber s = new SimpleTopicSubscriber(CONNECTION_URL, System.currentTimeMillis() + "-" + id, TOPIC_NAME); list.add(s); @@ -231,6 +235,7 @@ public class DurableConsumerTest extends CombinationTestSupport { final CountDownLatch counsumerStarted = new CountDownLatch(numConsumers); final AtomicInteger receivedCount = new AtomicInteger(); Runnable consumer = new Runnable() { + @Override public void run() { final String consumerName = Thread.currentThread().getName(); int acked = 0; @@ -302,6 +307,7 @@ public class DurableConsumerTest extends CombinationTestSupport { executor.awaitTermination(30, TimeUnit.SECONDS); Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { LOG.info("receivedCount: " + receivedCount.get()); return receivedCount.get() == numMessages; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java index 750bbc8baa..ef24795f93 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JMSDurableTopicNoLocalTest.java @@ -48,6 +48,7 @@ public class JMSDurableTopicNoLocalTest extends EmbeddedBrokerTestSupport { final CountDownLatch latch = new CountDownLatch(1); subscriber.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { System.out.println("Receive a message " + message); latch.countDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java index 65d3c9bf75..137caa330a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java @@ -60,17 +60,20 @@ public class JmsDurableTopicSlowReceiveTest extends JmsTopicSendReceiveTest { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { this.durable = true; broker = createBroker(); super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); broker.stop(); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory result = new ActiveMQConnectionFactory("vm://localhost?async=false"); Properties props = new Properties(); @@ -109,6 +112,7 @@ public class JmsDurableTopicSlowReceiveTest extends JmsTopicSendReceiveTest { connection2.close(); new Thread(new Runnable() { + @Override public void run() { try { int count = 0; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java index abc90d5d18..81987be4ab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/JmsTimeoutTest.java @@ -56,6 +56,7 @@ public class JmsTimeoutTest extends EmbeddedBrokerTestSupport { cx.setSendTimeout(10000); Runnable r = new Runnable() { + @Override public void run() { try { LOG.info("Sender thread starting"); @@ -102,6 +103,7 @@ public class JmsTimeoutTest extends EmbeddedBrokerTestSupport { broker.getSystemUsage().setSendFailIfNoSpaceAfterTimeout(5000); Runnable r = new Runnable() { + @Override public void run() { try { LOG.info("Sender thread starting"); @@ -135,6 +137,7 @@ public class JmsTimeoutTest extends EmbeddedBrokerTestSupport { assertTrue("No exception from the broker", exceptionCount.get() > 0); } + @Override protected void setUp() throws Exception { exceptionCount.set(0); bindAddress = "tcp://localhost:0"; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/MemoryUsageBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/MemoryUsageBrokerTest.java index 26df39487d..4653ea62b4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/MemoryUsageBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/MemoryUsageBrokerTest.java @@ -32,6 +32,7 @@ public class MemoryUsageBrokerTest extends BrokerTestSupport { private static final Logger LOG = LoggerFactory.getLogger(MemoryUsageBrokerTest.class); + @Override protected void setUp() throws Exception { this.setAutoFail(true); super.setUp(); @@ -47,6 +48,7 @@ public class MemoryUsageBrokerTest extends BrokerTestSupport { return policy; } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); KahaDBStore kaha = new KahaDBStore(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OptimizeAcknowledgeWithExpiredMsgsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OptimizeAcknowledgeWithExpiredMsgsTest.java index 88426db44f..6b624e21aa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OptimizeAcknowledgeWithExpiredMsgsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OptimizeAcknowledgeWithExpiredMsgsTest.java @@ -287,6 +287,7 @@ public class OptimizeAcknowledgeWithExpiredMsgsTest { private AtomicInteger counter = new AtomicInteger(0); + @Override public void onMessage(final Message message) { try { LOG.trace("Got Message " + message.getJMSMessageID()); @@ -300,6 +301,7 @@ public class OptimizeAcknowledgeWithExpiredMsgsTest { return counter.get(); } + @Override public synchronized void onException(JMSException ex) { LOG.error("JMS Exception occurred. Shutting down client."); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java index 88d552af1c..2b848620ba 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/OutOfOrderTestCase.java @@ -51,6 +51,7 @@ public class OutOfOrderTestCase extends TestCase { private int seq = 0; + @Override public void setUp() throws Exception { brokerService = new BrokerService(); brokerService.setUseJmx(true); @@ -67,6 +68,7 @@ public class OutOfOrderTestCase extends TestCase { session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); } + @Override protected void tearDown() throws Exception { session.close(); connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java index 74b52d51d0..18853258aa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/QueueWorkerPrefetchTest.java @@ -146,6 +146,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener workItemConsumer.setMessageListener(this); } + @Override public void onMessage(javax.jms.Message message) { try { WorkMessage work = (WorkMessage) ((ObjectMessage) message).getObject(); @@ -179,6 +180,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener /** * Master message handler. Process ack messages. */ + @Override public void onMessage(javax.jms.Message message) { long acks = acksReceived.incrementAndGet(); latch.get().countDown(); @@ -187,6 +189,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener } } + @Override protected void setUp() throws Exception { // Create the message broker. super.setUp(); @@ -200,6 +203,7 @@ public class QueueWorkerPrefetchTest extends TestCase implements MessageListener connectionUri = broker.getTransportConnectors().get(0).getPublishableConnectString(); } + @Override protected void tearDown() throws Exception { // Shut down the message broker. broker.deleteAllMessages(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java index c3c2bac2fa..b4858c14fc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java @@ -66,6 +66,7 @@ public class SlowConsumerTest extends TestCase { connection.start(); Thread producingThread = new Thread("Producing thread") { + @Override public void run() { try { Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); @@ -89,6 +90,7 @@ public class SlowConsumerTest extends TestCase { Thread consumingThread = new Thread("Consuming thread") { + @Override public void run() { try { Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java index b21462f351..2038279964 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TransactionNotStartedErrorTest.java @@ -91,6 +91,7 @@ public class TransactionNotStartedErrorTest extends TestCase { LOG.info("Starting broker.."); } + @Override public void tearDown() throws Exception { hectorConnection.close(); xenaConnection.close(); @@ -104,6 +105,7 @@ public class TransactionNotStartedErrorTest extends TestCase { hectorConnection = createConnection(); Thread hectorThread = buildProducer(hectorConnection, hectorToHalo); Receiver hHectorReceiver = new Receiver() { + @Override public void receive(String s) throws Exception { haloToHectorCtr++; if (haloToHectorCtr >= counter) { @@ -118,6 +120,7 @@ public class TransactionNotStartedErrorTest extends TestCase { troyConnection = createConnection(); Thread troyThread = buildProducer(troyConnection, troyToHalo); Receiver hTroyReceiver = new Receiver() { + @Override public void receive(String s) throws Exception { haloToTroyCtr++; if (haloToTroyCtr >= counter) { @@ -132,6 +135,7 @@ public class TransactionNotStartedErrorTest extends TestCase { xenaConnection = createConnection(); Thread xenaThread = buildProducer(xenaConnection, xenaToHalo); Receiver hXenaReceiver = new Receiver() { + @Override public void receive(String s) throws Exception { haloToXenaCtr++; if (haloToXenaCtr >= counter) { @@ -148,6 +152,7 @@ public class TransactionNotStartedErrorTest extends TestCase { final MessageSender troySender = buildTransactionalProducer(haloToTroy, haloConnection); final MessageSender xenaSender = buildTransactionalProducer(haloToXena, haloConnection); Receiver hectorReceiver = new Receiver() { + @Override public void receive(String s) throws Exception { hectorToHaloCtr++; troySender.send("halo to troy because of hector"); @@ -159,6 +164,7 @@ public class TransactionNotStartedErrorTest extends TestCase { } }; Receiver xenaReceiver = new Receiver() { + @Override public void receive(String s) throws Exception { xenaToHaloCtr++; hectorSender.send("halo to hector because of xena"); @@ -170,6 +176,7 @@ public class TransactionNotStartedErrorTest extends TestCase { } }; Receiver troyReceiver = new Receiver() { + @Override public void receive(String s) throws Exception { troyToHaloCtr++; xenaSender.send("halo to xena because of troy"); @@ -242,6 +249,7 @@ public class TransactionNotStartedErrorTest extends TestCase { final MessageSender producer = new MessageSender(queueName, connection, false, false); Thread thread = new Thread() { + @Override public synchronized void run() { for (int i = 0; i < counter; i++) { try { @@ -268,6 +276,7 @@ public class TransactionNotStartedErrorTest extends TestCase { MessageConsumer inputMessageConsumer = session.createConsumer(session.createQueue(queueName)); MessageListener messageListener = new MessageListener() { + @Override public void onMessage(Message message) { try { ObjectMessage objectMessage = (ObjectMessage) message; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java index dfda2993f0..36a80b442e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/TrapMessageInJDBCStoreTest.java @@ -249,6 +249,7 @@ public class TrapMessageInJDBCStoreTest extends TestCase { public class TestJDBCPersistenceAdapter extends JDBCPersistenceAdapter { + @Override public TransactionContext getTransactionContext() throws IOException { return testTransactionContext; } @@ -262,6 +263,7 @@ public class TrapMessageInJDBCStoreTest extends TestCase { super(jdbcPersistenceAdapter); } + @Override public void executeBatch() throws SQLException { super.executeBatch(); count++; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java index 577464bf40..84c1765330 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/VMTransportClosureTest.java @@ -38,6 +38,7 @@ public class VMTransportClosureTest extends EmbeddedBrokerTestSupport { private static final long MAX_TEST_TIME_MILLIS = 300000; // 5min private static final int NUM_ATTEMPTS = 100000; + @Override public void setUp() throws Exception { setAutoFail(true); setMaxTestTime(MAX_TEST_TIME_MILLIS); @@ -93,6 +94,7 @@ public class VMTransportClosureTest extends EmbeddedBrokerTestSupport { // transport should not affect the persistent connection. final Transport localTransport = TransportFactory.connect(broker.getVmConnectorURI()); localTransport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { if (command instanceof ShutdownInfo) { try { @@ -104,14 +106,17 @@ public class VMTransportClosureTest extends EmbeddedBrokerTestSupport { } } + @Override public void onException(IOException error) { // ignore } + @Override public void transportInterupted() { // ignore } + @Override public void transportResumed() { // ignore } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java index cdda13a4dc..b74887fd99 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsClient.java @@ -65,6 +65,7 @@ public class TryJmsClient { private void startUsageMonitor(final BrokerService brokerService) { new Thread(new Runnable() { + @Override public void run() { while (true) { try { @@ -106,6 +107,7 @@ public class TryJmsClient { private class MessageSend implements Runnable { + @Override public void run() { try { String url = "vm://TestBroker"; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java index fe2ceaa3b2..91ca459180 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/amq1974/TryJmsManager.java @@ -65,6 +65,7 @@ public class TryJmsManager { private void startUsageMonitor(final BrokerService brokerService) { new Thread(new Runnable() { + @Override public void run() { while (true) { try { @@ -108,6 +109,7 @@ public class TryJmsManager { MessageConsumer consumer = session.createConsumer(dest); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { try { System.out.println("got message " + message.getJMSMessageID()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java index 9d51fea44d..7551258f43 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java @@ -39,6 +39,7 @@ public class ActiveMQBytesMessageTest extends TestCase { /* * @see TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); } @@ -46,6 +47,7 @@ public class ActiveMQBytesMessageTest extends TestCase { /* * @see TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java index 9fa4e393cd..46ede44255 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQDestinationTest.java @@ -75,13 +75,16 @@ public class ActiveMQDestinationTest extends DataStructureTestSupport { this.topicName = topicName; } + @Override public void delete() throws JMSException { } + @Override public String getTopicName() throws JMSException { return topicName; } + @Override public String getQueueName() throws JMSException { return qName; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java index 117c85295c..4bc17a9aac 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQMapMessageTest.java @@ -58,6 +58,7 @@ public class ActiveMQMapMessageTest extends TestCase { /* * @see TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); } @@ -65,6 +66,7 @@ public class ActiveMQMapMessageTest extends TestCase { /* * @see TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java index 4a2f6bcd5d..94f0d93a61 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQObjectMessageTest.java @@ -45,6 +45,7 @@ public class ActiveMQObjectMessageTest extends TestCase { /* * @see TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); } @@ -52,6 +53,7 @@ public class ActiveMQObjectMessageTest extends TestCase { /* * @see TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java index 757fb7fa13..34ceb1433f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java @@ -46,6 +46,7 @@ public class ActiveMQStreamMessageTest extends TestCase { /* * @see TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); } @@ -53,6 +54,7 @@ public class ActiveMQStreamMessageTest extends TestCase { /* * @see TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java index 074ebe4bdc..6cdee065dc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java @@ -149,6 +149,7 @@ public abstract class DataStructureTestSupport extends CombinationTestSupport { } } + @Override protected void setUp() throws Exception { wireFormat = createWireFormat(); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/MessageCompressionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/MessageCompressionTest.java index fc4182b30d..4a3ba4211b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/MessageCompressionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/command/MessageCompressionTest.java @@ -43,6 +43,7 @@ public class MessageCompressionTest extends TestCase { private ActiveMQQueue queue; private String connectionUri; + @Override protected void setUp() throws Exception { broker = new BrokerService(); connectionUri = broker.addConnector(BROKER_URL).getPublishableConnectString(); @@ -50,6 +51,7 @@ public class MessageCompressionTest extends TestCase { queue = new ActiveMQQueue("TEST." + System.currentTimeMillis()); } + @Override protected void tearDown() throws Exception { if (broker != null) { broker.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java index 0e52c78f7e..b93babc836 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java @@ -24,6 +24,7 @@ import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest; */ public class BrokerXmlConfigTest extends JmsTopicSendReceiveWithTwoConnectionsTest { + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { // START SNIPPET: bean diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3410Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3410Test.java index 6be65ce447..6ba38ef322 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3410Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3410Test.java @@ -42,6 +42,7 @@ public class AMQ3410Test extends TestCase { protected AbstractApplicationContext context; + @Override protected void setUp() throws Exception { super.setUp(); @@ -53,6 +54,7 @@ public class AMQ3410Test extends TestCase { return new ClassPathXmlApplicationContext("org/apache/activemq/console/command/activemq.xml"); } + @Override protected void tearDown() throws Exception { BrokerService broker = (BrokerService) context.getBean("localbroker"); broker.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3411Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3411Test.java index 9db2af09f6..dc307cba88 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3411Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/console/command/AMQ3411Test.java @@ -41,6 +41,7 @@ public class AMQ3411Test extends TestCase { protected AbstractApplicationContext context; protected static final String origPassword = "ABCDEFG"; + @Override protected void setUp() throws Exception { super.setUp(); @@ -52,6 +53,7 @@ public class AMQ3411Test extends TestCase { return new ClassPathXmlApplicationContext("org/apache/activemq/console/command/activemq.xml"); } + @Override protected void tearDown() throws Exception { BrokerService broker = (BrokerService) context.getBean("localbroker"); broker.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java index b15ff38f12..547d2c913b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/filter/DummyPolicyEntry.java @@ -32,6 +32,7 @@ public class DummyPolicyEntry extends DestinationMapEntry { this.description = description; } + @Override public Comparable getValue() { return description; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java index df3c56448b..801c475d13 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java @@ -25,6 +25,7 @@ public class XAConnectionFactoryTest extends ActiveMQInitialContextFactoryTest { assertTrue("connection factory implements XA", context.lookup(getConnectionFactoryLookupName()) instanceof XAConnectionFactory); } + @Override protected void configureEnvironment() { environment.put("xa", "true"); super.configureEnvironment(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java index c8472c531e..d5109d97be 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java @@ -57,12 +57,14 @@ public class ActiveMQAdmin implements Admin { return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false")); } + @Override public String getName() { return getClass().getName(); } BrokerService broker; + @Override public void startServer() throws Exception { if (System.getProperty("basedir") == null) { File file = new File("."); @@ -72,20 +74,25 @@ public class ActiveMQAdmin implements Admin { broker.start(); } + @Override public void stopServer() throws Exception { broker.stop(); } + @Override public void start() throws Exception { } + @Override public void stop() throws Exception { } + @Override public Context createContext() throws NamingException { return context; } + @Override public void createQueue(String name) { try { context.bind(name, new ActiveMQQueue(name)); @@ -95,6 +102,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createTopic(String name) { try { context.bind(name, new ActiveMQTopic(name)); @@ -104,6 +112,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteQueue(String name) { // BrokerTestSupport.delete_queue((Broker)base.broker, name); try { @@ -114,6 +123,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteTopic(String name) { try { context.unbind(name); @@ -123,6 +133,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createConnectionFactory(String name) { try { final ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); @@ -134,6 +145,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteConnectionFactory(String name) { try { context.unbind(name); @@ -143,18 +155,22 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createQueueConnectionFactory(String name) { createConnectionFactory(name); } + @Override public void createTopicConnectionFactory(String name) { createConnectionFactory(name); } + @Override public void deleteQueueConnectionFactory(String name) { deleteConnectionFactory(name); } + @Override public void deleteTopicConnectionFactory(String name) { deleteConnectionFactory(name); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java index e272f8fe02..4a0146cc9a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java @@ -85,6 +85,7 @@ public class LoadClient implements Runnable { } } + @Override public void run() { try { while (running) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java index 9657522b81..2d9443db92 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java @@ -58,6 +58,7 @@ public class LoadTest extends TestCase { * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(bindAddress); @@ -105,6 +106,7 @@ public class LoadTest extends TestCase { super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); managementConnection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java index e02976f967..ded835b771 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java @@ -26,6 +26,7 @@ public class BoundedRangeStatisticTest extends RangeStatisticTest { * * @throws Exception */ + @Override public void testStatistic() throws Exception { BoundedRangeStatisticImpl stat = new BoundedRangeStatisticImpl("myRange", "millis", "myDescription", 10, 3000); assertStatistic(stat, "myRange", "millis", "myDescription"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java index 2cf1f68261..368b971a01 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java @@ -29,10 +29,12 @@ public class DummyMessage extends ActiveMQMessage { this.size = size; } + @Override public int getSize() { return size; } + @Override public String toString() { return "DummyMessage[id=" + getMessageId() + " size=" + size + "]"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java index 120a934878..9ddfc65a6a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java @@ -40,6 +40,7 @@ public abstract class MemoryBufferTestSupport extends TestCase { protected abstract MessageBuffer createMessageBuffer(); + @Override protected void setUp() throws Exception { buffer = createMessageBuffer(); qA = buffer.createMessageQueue(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java index 353097636f..b89b0a5200 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java @@ -66,6 +66,7 @@ public class OrderBasedMemoryBufferTest extends MemoryBufferTestSupport { assertEquals("qC", 20, qC.getSize()); } + @Override protected MessageBuffer createMessageBuffer() { return new OrderBasedMessageBuffer(40); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java index eea4f1fa3f..ed7575e467 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java @@ -49,6 +49,7 @@ public class SizeBasedMessageBufferTest extends MemoryBufferTestSupport { assertEquals("qC", 20, qC.getSize()); } + @Override protected MessageBuffer createMessageBuffer() { return new SizeBasedMessageBuffer(40); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java index 76ebe70eeb..dacc9f05f6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java @@ -142,6 +142,7 @@ public class DemandForwardingBridgeFilterTest extends NetworkTestSupport { return m; } + @Override protected void setUp() throws Exception { super.setUp(); @@ -160,6 +161,7 @@ public class DemandForwardingBridgeFilterTest extends NetworkTestSupport { consumerConnection.send(consumerSessionInfo); } + @Override protected void tearDown() throws Exception { bridge.stop(); super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java index 411ac1be33..30df2b4254 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java @@ -128,6 +128,7 @@ public class ForwardingBridgeTest extends NetworkTestSupport { assertNotNull(m); } + @Override protected void setUp() throws Exception { super.setUp(); bridge = new ForwardingBridge(createTransport(), createRemoteTransport()); @@ -136,6 +137,7 @@ public class ForwardingBridgeTest extends NetworkTestSupport { bridge.start(); } + @Override protected void tearDown() throws Exception { bridge.stop(); super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java index 81901fa00d..0bf10d4f6c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java @@ -21,10 +21,12 @@ package org.apache.activemq.network; */ public class MulticastNetworkTest extends SimpleNetworkTest { + @Override protected String getRemoteBrokerURI() { return "org/apache/activemq/network/multicast/remoteBroker.xml"; } + @Override protected String getLocalBrokerURI() { return "org/apache/activemq/network/multicast/localBroker.xml"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java index 389bdfdcbd..0a8ed30bd9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java @@ -91,6 +91,7 @@ public class NetworkLoadTest extends TestCase { MessageConsumer consumer = fromSession.createConsumer(new ActiveMQQueue("Q" + from)); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message msg) { try { producer.send(msg); @@ -122,6 +123,7 @@ public class NetworkLoadTest extends TestCase { private BrokerService[] brokers; private ForwardingClient[] forwardingClients; + @Override protected void setUp() throws Exception { groupId = "network-load-test-" + System.currentTimeMillis(); brokers = new BrokerService[BROKER_COUNT]; @@ -143,6 +145,7 @@ public class NetworkLoadTest extends TestCase { } } + @Override protected void tearDown() throws Exception { for (int i = 0; i < forwardingClients.length; i++) { LOG.info("Stoping fowarding client " + i); @@ -234,6 +237,7 @@ public class NetworkLoadTest extends TestCase { // Setup the consumer.. consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message msg) { ActiveMQTextMessage m = (ActiveMQTextMessage) msg; ActiveMQTextMessage last = lastMessageReceived.get(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java index 1984a1f4af..34d779ec78 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java @@ -183,6 +183,7 @@ public class NetworkReconnectTest extends TestCase { } + @Override protected void setUp() throws Exception { LOG.info("==============================================================================="); @@ -195,6 +196,7 @@ public class NetworkReconnectTest extends TestCase { } + @Override protected void tearDown() throws Exception { disposeConsumerConnections(); try { @@ -300,6 +302,7 @@ public class NetworkReconnectTest extends TestCase { ConsumerEventSource source = new ConsumerEventSource(connection, destination); source.setConsumerListener(new ConsumerListener() { + @Override public void onConsumerEvent(ConsumerEvent event) { rc.set(event.getConsumerCount()); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java index f34451f65f..d100c54e01 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java @@ -106,12 +106,14 @@ public class NetworkRestartTest extends TestSupport { assertEquals("after", ((TextMessage) after).getText()); } + @Override protected void setUp() throws Exception { setAutoFail(true); super.setUp(); doSetUp(); } + @Override protected void tearDown() throws Exception { localBroker.deleteAllMessages(); remoteBroker.deleteAllMessages(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java index 274fe0c670..9355714195 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeTest.java @@ -50,6 +50,7 @@ public class QueueBridgeTest extends TestCase implements MessageListener { protected MessageConsumer requestServerConsumer; protected MessageProducer requestServerProducer; + @Override protected void setUp() throws Exception { super.setUp(); context = createApplicationContext(); @@ -80,6 +81,7 @@ public class QueueBridgeTest extends TestCase implements MessageListener { return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/queue-config.xml"); } + @Override protected void tearDown() throws Exception { localConnection.close(); super.tearDown(); @@ -94,6 +96,7 @@ public class QueueBridgeTest extends TestCase implements MessageListener { } } + @Override public void onMessage(Message msg) { try { TextMessage textMsg = (TextMessage) msg; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java index 1691af1fbe..120792c376 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/QueueBridgeXBeanTest.java @@ -25,6 +25,7 @@ import org.springframework.context.support.AbstractApplicationContext; */ public class QueueBridgeXBeanTest extends QueueBridgeTest { + @Override protected AbstractApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/queue-xbean.xml"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java index e40db2d6b1..bd3336266f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeSpringTest.java @@ -50,6 +50,7 @@ public class TopicBridgeSpringTest extends TestCase implements MessageListener { protected MessageConsumer requestServerConsumer; protected MessageProducer requestServerProducer; + @Override protected void setUp() throws Exception { super.setUp(); @@ -74,6 +75,7 @@ public class TopicBridgeSpringTest extends TestCase implements MessageListener { return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/topic-spring.xml"); } + @Override protected void tearDown() throws Exception { localConnection.close(); super.tearDown(); @@ -89,6 +91,7 @@ public class TopicBridgeSpringTest extends TestCase implements MessageListener { } } + @Override public void onMessage(Message msg) { try { TextMessage textMsg = (TextMessage) msg; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java index c4b0bd3279..747d59cb5c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/jms/TopicBridgeXBeanTest.java @@ -25,6 +25,7 @@ import org.springframework.context.support.AbstractApplicationContext; */ public class TopicBridgeXBeanTest extends TopicBridgeSpringTest { + @Override protected AbstractApplicationContext createApplicationContext() { return new ClassPathXmlApplicationContext("org/apache/activemq/network/jms/topic-config.xml"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java index e289115bce..6b4e09023d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/BrokerInfoData.java @@ -21,6 +21,7 @@ import org.apache.activemq.command.BrokerInfo; public class BrokerInfoData extends DataFileGenerator { + @Override protected Object createObject() { BrokerInfo rc = new BrokerInfo(); rc.setResponseRequired(false); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java index c396abb113..c9689393af 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/WireFormatInfoData.java @@ -22,6 +22,7 @@ import org.apache.activemq.command.WireFormatInfo; public class WireFormatInfoData extends DataFileGenerator { + @Override protected Object createObject() throws IOException { WireFormatInfo rc = new WireFormatInfo(); rc.setResponseRequired(false); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java index 81ccac0723..1a4fcf7d80 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQBytesMessageTest extends ActiveMQMessageTest { public static final ActiveMQBytesMessageTest SINGLETON = new ActiveMQBytesMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQBytesMessage info = new ActiveMQBytesMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQBytesMessage info = (ActiveMQBytesMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java index 90cec8ba20..4c5a0db3ff 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQDestinationTestSupport.java @@ -29,6 +29,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class ActiveMQDestinationTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQDestination info = (ActiveMQDestination) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java index 48662a5acf..f9ec5d1943 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQMapMessageTest extends ActiveMQMessageTest { public static final ActiveMQMapMessageTest SINGLETON = new ActiveMQMapMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQMapMessage info = new ActiveMQMapMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQMapMessage info = (ActiveMQMapMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java index df78d73f0a..bac2c5357c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQMessageTest extends MessageTestSupport { public static final ActiveMQMessageTest SINGLETON = new ActiveMQMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQMessage info = new ActiveMQMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQMessage info = (ActiveMQMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java index 7dd20c0f71..d67cb6ef00 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQObjectMessageTest extends ActiveMQMessageTest { public static final ActiveMQObjectMessageTest SINGLETON = new ActiveMQObjectMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQObjectMessage info = new ActiveMQObjectMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQObjectMessage info = (ActiveMQObjectMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java index 09427c7ae2..8b57bcfb8c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQQueueTest.java @@ -28,12 +28,14 @@ public class ActiveMQQueueTest extends ActiveMQDestinationTestSupport { public static final ActiveMQQueueTest SINGLETON = new ActiveMQQueueTest(); + @Override public Object createObject() throws Exception { ActiveMQQueue info = new ActiveMQQueue(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQQueue info = (ActiveMQQueue) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java index d69f80a9c5..3af498d189 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageTest.java @@ -28,12 +28,14 @@ public class ActiveMQStreamMessageTest extends ActiveMQMessageTest { public static final ActiveMQStreamMessageTest SINGLETON = new ActiveMQStreamMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQStreamMessage info = new ActiveMQStreamMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQStreamMessage info = (ActiveMQStreamMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java index c486dba2df..816715a9a6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationTestSupport.java @@ -26,6 +26,7 @@ import org.apache.activemq.command.ActiveMQTempDestination; */ public abstract class ActiveMQTempDestinationTestSupport extends ActiveMQDestinationTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTempDestination info = (ActiveMQTempDestination) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java index 60c5342aa9..20f6f26980 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueTest.java @@ -28,12 +28,14 @@ public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport { public static final ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest(); + @Override public Object createObject() throws Exception { ActiveMQTempQueue info = new ActiveMQTempQueue(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTempQueue info = (ActiveMQTempQueue) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java index 8e6d048b88..d06c2f8113 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicTest.java @@ -28,12 +28,14 @@ public class ActiveMQTempTopicTest extends ActiveMQTempDestinationTestSupport { public static final ActiveMQTempTopicTest SINGLETON = new ActiveMQTempTopicTest(); + @Override public Object createObject() throws Exception { ActiveMQTempTopic info = new ActiveMQTempTopic(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTempTopic info = (ActiveMQTempTopic) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java index 56fef8e52c..402c9e139c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageTest.java @@ -28,12 +28,14 @@ public class ActiveMQTextMessageTest extends ActiveMQMessageTest { public static final ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQTextMessage info = new ActiveMQTextMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTextMessage info = (ActiveMQTextMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java index e85b5bca06..fe8f74acd7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ActiveMQTopicTest.java @@ -28,12 +28,14 @@ public class ActiveMQTopicTest extends ActiveMQDestinationTestSupport { public static final ActiveMQTopicTest SINGLETON = new ActiveMQTopicTest(); + @Override public Object createObject() throws Exception { ActiveMQTopic info = new ActiveMQTopic(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTopic info = (ActiveMQTopic) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java index befa49a56f..86357bd056 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java index 798646f013..2db742ce3b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerIdTest.java @@ -31,12 +31,14 @@ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static final BrokerIdTest SINGLETON = new BrokerIdTest(); + @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java index 010edc99a0..cd1bc98fd7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/BrokerInfoTest.java @@ -28,12 +28,14 @@ public class BrokerInfoTest extends BaseCommandTestSupport { public static final BrokerInfoTest SINGLETON = new BrokerInfoTest(); + @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java index 207359f82e..de4f29ec4d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionControlTest.java @@ -30,12 +30,14 @@ public class ConnectionControlTest extends BaseCommandTestSupport { public static final ConnectionControlTest SINGLETON = new ConnectionControlTest(); + @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java index aaa399e2f4..5acd495198 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionErrorTest.java @@ -30,12 +30,14 @@ public class ConnectionErrorTest extends BaseCommandTestSupport { public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); + @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java index 105910f7c6..0ea97ea356 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionIdTest.java @@ -31,12 +31,14 @@ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static final ConnectionIdTest SINGLETON = new ConnectionIdTest(); + @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java index 784052c6a7..3c1e8fa10d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConnectionInfoTest.java @@ -29,12 +29,14 @@ public class ConnectionInfoTest extends BaseCommandTestSupport { public static final ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); + @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java index e86c538a74..32727c60da 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerControlTest.java @@ -30,12 +30,14 @@ public class ConsumerControlTest extends BaseCommandTestSupport { public static final ConsumerControlTest SINGLETON = new ConsumerControlTest(); + @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java index fd049856f1..1d37eb98a8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerIdTest.java @@ -31,12 +31,14 @@ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static final ConsumerIdTest SINGLETON = new ConsumerIdTest(); + @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java index d516b8d478..10d4fab99e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ConsumerInfoTest.java @@ -29,12 +29,14 @@ public class ConsumerInfoTest extends BaseCommandTestSupport { public static final ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); + @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java index 165929b71f..b9393540cf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ControlCommandTest.java @@ -30,12 +30,14 @@ public class ControlCommandTest extends BaseCommandTestSupport { public static final ControlCommandTest SINGLETON = new ControlCommandTest(); + @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java index b4de6685b2..92842b61ca 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataArrayResponseTest.java @@ -29,12 +29,14 @@ public class DataArrayResponseTest extends ResponseTest { public static final DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); + @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java index 61236774bf..d360fa48c9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DataResponseTest.java @@ -30,12 +30,14 @@ public class DataResponseTest extends ResponseTest { public static final DataResponseTest SINGLETON = new DataResponseTest(); + @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java index 31d43857e6..2c8b858785 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DestinationInfoTest.java @@ -29,12 +29,14 @@ public class DestinationInfoTest extends BaseCommandTestSupport { public static final DestinationInfoTest SINGLETON = new DestinationInfoTest(); + @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java index 09fa5c228f..40a14c8b43 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/DiscoveryEventTest.java @@ -31,12 +31,14 @@ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static final DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); + @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java index ae219f948b..126ced0d95 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ExceptionResponseTest.java @@ -30,12 +30,14 @@ public class ExceptionResponseTest extends ResponseTest { public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); + @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java index 1fee22b87f..ced5ebfb0f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/FlushCommandTest.java @@ -30,12 +30,14 @@ public class FlushCommandTest extends BaseCommandTestSupport { public static final FlushCommandTest SINGLETON = new FlushCommandTest(); + @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java index b082093508..1d7231d8d1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/IntegerResponseTest.java @@ -30,12 +30,14 @@ public class IntegerResponseTest extends ResponseTest { public static final IntegerResponseTest SINGLETON = new IntegerResponseTest(); + @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java index 54eff67609..b9cc450545 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalQueueAckTest.java @@ -31,12 +31,14 @@ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static final JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); + @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java index 863ef030e5..66f6d797bb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTopicAckTest.java @@ -31,12 +31,14 @@ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static final JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); + @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java index cbcc549636..2d3c9a35f8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTraceTest.java @@ -31,12 +31,14 @@ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static final JournalTraceTest SINGLETON = new JournalTraceTest(); + @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java index c76ba646f0..ad79551bd3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/JournalTransactionTest.java @@ -31,12 +31,14 @@ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static final JournalTransactionTest SINGLETON = new JournalTransactionTest(); + @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java index 316dd34302..55b98c0a4f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/KeepAliveInfoTest.java @@ -30,12 +30,14 @@ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static final KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); + @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java index 39c447c26a..3f7403ae5f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LastPartialCommandTest.java @@ -30,12 +30,14 @@ public class LastPartialCommandTest extends PartialCommandTest { public static final LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); + @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java index c7d33e2d38..41041303ce 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/LocalTransactionIdTest.java @@ -30,12 +30,14 @@ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static final LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); + @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java index 375f2cefef..1bf1bd985d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageAckTest.java @@ -30,12 +30,14 @@ public class MessageAckTest extends BaseCommandTestSupport { public static final MessageAckTest SINGLETON = new MessageAckTest(); + @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java index a7103df1d8..a211d95144 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchNotificationTest.java @@ -30,12 +30,14 @@ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); + @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java index 31a2514fe3..2b0654a1db 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageDispatchTest.java @@ -30,12 +30,14 @@ public class MessageDispatchTest extends BaseCommandTestSupport { public static final MessageDispatchTest SINGLETON = new MessageDispatchTest(); + @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java index b65de9364a..6db063b9bc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageIdTest.java @@ -31,12 +31,14 @@ public class MessageIdTest extends DataFileGeneratorTestSupport { public static final MessageIdTest SINGLETON = new MessageIdTest(); + @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java index 1d067bad8e..fa4515312f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/MessageTestSupport.java @@ -33,6 +33,7 @@ import org.apache.activemq.util.MarshallingSupport; */ public abstract class MessageTestSupport extends BaseCommandTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java index 836982cf52..2798641778 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/NetworkBridgeFilterTest.java @@ -31,12 +31,14 @@ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static final NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); + @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java index 74bf73f2b7..a2ee4b8564 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/PartialCommandTest.java @@ -31,12 +31,14 @@ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static final PartialCommandTest SINGLETON = new PartialCommandTest(); + @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java index 0269b1ac61..3e976e1a3b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerIdTest.java @@ -31,12 +31,14 @@ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static final ProducerIdTest SINGLETON = new ProducerIdTest(); + @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java index 40b6dccf41..67c7248e4a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ProducerInfoTest.java @@ -29,12 +29,14 @@ public class ProducerInfoTest extends BaseCommandTestSupport { public static final ProducerInfoTest SINGLETON = new ProducerInfoTest(); + @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java index fa9ac7983b..6f0986c9e2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveInfoTest.java @@ -30,12 +30,14 @@ public class RemoveInfoTest extends BaseCommandTestSupport { public static final RemoveInfoTest SINGLETON = new RemoveInfoTest(); + @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java index 965218dd19..fd6751507a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/RemoveSubscriptionInfoTest.java @@ -30,12 +30,14 @@ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); + @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java index 1281161a24..5dc3a8a14d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ReplayCommandTest.java @@ -30,12 +30,14 @@ public class ReplayCommandTest extends BaseCommandTestSupport { public static final ReplayCommandTest SINGLETON = new ReplayCommandTest(); + @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java index 3834c29c13..a063d007db 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ResponseTest.java @@ -30,12 +30,14 @@ public class ResponseTest extends BaseCommandTestSupport { public static final ResponseTest SINGLETON = new ResponseTest(); + @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java index 404beddbc1..e01bd74e8b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionIdTest.java @@ -31,12 +31,14 @@ public class SessionIdTest extends DataFileGeneratorTestSupport { public static final SessionIdTest SINGLETON = new SessionIdTest(); + @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java index 16289a2cc7..1b8cc8a30c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SessionInfoTest.java @@ -30,12 +30,14 @@ public class SessionInfoTest extends BaseCommandTestSupport { public static final SessionInfoTest SINGLETON = new SessionInfoTest(); + @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java index ae1f45305a..1b6da82cc5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/ShutdownInfoTest.java @@ -30,12 +30,14 @@ public class ShutdownInfoTest extends BaseCommandTestSupport { public static final ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); + @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java index 1c77629c6b..f049d1c1e8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/SubscriptionInfoTest.java @@ -31,12 +31,14 @@ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static final SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); + @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java index 3d63fcf5d6..47a3fef8ab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionIdTestSupport.java @@ -29,6 +29,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java index f9d796374c..e9a08b4c99 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java @@ -30,12 +30,14 @@ public class TransactionInfoTest extends BaseCommandTestSupport { public static final TransactionInfoTest SINGLETON = new TransactionInfoTest(); + @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java index 8279feb880..bb639fce8b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/WireFormatInfoTest.java @@ -29,12 +29,14 @@ public class WireFormatInfoTest extends DataFileGeneratorTestSupport { public static final WireFormatInfoTest SINGLETON = new WireFormatInfoTest(); + @Override public Object createObject() throws Exception { WireFormatInfo info = new WireFormatInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); WireFormatInfo info = (WireFormatInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java index 4e4056d19f..8175154798 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java @@ -30,12 +30,14 @@ public class XATransactionIdTest extends TransactionIdTestSupport { public static final XATransactionIdTest SINGLETON = new XATransactionIdTest(); + @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java index 16b61e5929..0dcaba04c0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQBytesMessageTest extends ActiveMQMessageTest { public static final ActiveMQBytesMessageTest SINGLETON = new ActiveMQBytesMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQBytesMessage info = new ActiveMQBytesMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQBytesMessage info = (ActiveMQBytesMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java index 08c3b55031..3476e4310c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java @@ -29,6 +29,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class ActiveMQDestinationTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQDestination info = (ActiveMQDestination) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java index c9a7fe2fe9..a39cd08d06 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQMapMessageTest extends ActiveMQMessageTest { public static final ActiveMQMapMessageTest SINGLETON = new ActiveMQMapMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQMapMessage info = new ActiveMQMapMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQMapMessage info = (ActiveMQMapMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java index 8e8ccb81fa..4dd1f0b590 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQMessageTest extends MessageTestSupport { public static final ActiveMQMessageTest SINGLETON = new ActiveMQMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQMessage info = new ActiveMQMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQMessage info = (ActiveMQMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java index 70c9c2a891..8d5ef4bd95 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQObjectMessageTest extends ActiveMQMessageTest { public static final ActiveMQObjectMessageTest SINGLETON = new ActiveMQObjectMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQObjectMessage info = new ActiveMQObjectMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQObjectMessage info = (ActiveMQObjectMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java index 5dbd63454d..dd13b5ed14 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java @@ -30,12 +30,14 @@ public class ActiveMQQueueTest extends ActiveMQDestinationTestSupport { public static final ActiveMQQueueTest SINGLETON = new ActiveMQQueueTest(); + @Override public Object createObject() throws Exception { ActiveMQQueue info = new ActiveMQQueue(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQQueue info = (ActiveMQQueue) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java index 0c62a79b33..d96959a224 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQStreamMessageTest extends ActiveMQMessageTest { public static final ActiveMQStreamMessageTest SINGLETON = new ActiveMQStreamMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQStreamMessage info = new ActiveMQStreamMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQStreamMessage info = (ActiveMQStreamMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java index 7b4aa1980d..480c16299e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java @@ -28,6 +28,7 @@ import org.apache.activemq.command.ActiveMQTempDestination; */ public abstract class ActiveMQTempDestinationTestSupport extends ActiveMQDestinationTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTempDestination info = (ActiveMQTempDestination) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java index c9733fdbe3..d3ba1c9ced 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java @@ -30,12 +30,14 @@ public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport { public static final ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest(); + @Override public Object createObject() throws Exception { ActiveMQTempQueue info = new ActiveMQTempQueue(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTempQueue info = (ActiveMQTempQueue) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java index 2dc535747f..9ddb5d7b23 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java @@ -30,12 +30,14 @@ public class ActiveMQTempTopicTest extends ActiveMQTempDestinationTestSupport { public static final ActiveMQTempTopicTest SINGLETON = new ActiveMQTempTopicTest(); + @Override public Object createObject() throws Exception { ActiveMQTempTopic info = new ActiveMQTempTopic(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTempTopic info = (ActiveMQTempTopic) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java index 36975897b2..01d9cd107e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java @@ -30,12 +30,14 @@ public class ActiveMQTextMessageTest extends ActiveMQMessageTest { public static final ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest(); + @Override public Object createObject() throws Exception { ActiveMQTextMessage info = new ActiveMQTextMessage(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTextMessage info = (ActiveMQTextMessage) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java index 48e0c5c91e..7ff1ad91c1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java @@ -30,12 +30,14 @@ public class ActiveMQTopicTest extends ActiveMQDestinationTestSupport { public static final ActiveMQTopicTest SINGLETON = new ActiveMQTopicTest(); + @Override public Object createObject() throws Exception { ActiveMQTopic info = new ActiveMQTopic(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ActiveMQTopic info = (ActiveMQTopic) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java index 43bb7f89d2..0e6e0eac9f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java index 8960410714..52ec352ddf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerIdTest.java @@ -32,12 +32,14 @@ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static final BrokerIdTest SINGLETON = new BrokerIdTest(); + @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java index 252010c6cf..cdc71b4880 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/BrokerInfoTest.java @@ -28,12 +28,14 @@ public class BrokerInfoTest extends BaseCommandTestSupport { public static final BrokerInfoTest SINGLETON = new BrokerInfoTest(); + @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java index 12bcaf96be..e048b27225 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionControlTest.java @@ -31,12 +31,14 @@ public class ConnectionControlTest extends BaseCommandTestSupport { public static final ConnectionControlTest SINGLETON = new ConnectionControlTest(); + @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java index 818955d7f5..c82a1272c2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionErrorTest.java @@ -31,12 +31,14 @@ public class ConnectionErrorTest extends BaseCommandTestSupport { public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); + @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java index 04bcf112d8..dbb5bffe08 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionIdTest.java @@ -32,12 +32,14 @@ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static final ConnectionIdTest SINGLETON = new ConnectionIdTest(); + @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java index 258dbec596..729469d836 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConnectionInfoTest.java @@ -29,12 +29,14 @@ public class ConnectionInfoTest extends BaseCommandTestSupport { public static final ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); + @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java index 0d190ab06f..56a951214a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerControlTest.java @@ -31,12 +31,14 @@ public class ConsumerControlTest extends BaseCommandTestSupport { public static final ConsumerControlTest SINGLETON = new ConsumerControlTest(); + @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java index 6c826eda5f..f53b2d740c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerIdTest.java @@ -32,12 +32,14 @@ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static final ConsumerIdTest SINGLETON = new ConsumerIdTest(); + @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java index ecc1d32c43..1290440f39 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ConsumerInfoTest.java @@ -29,12 +29,14 @@ public class ConsumerInfoTest extends BaseCommandTestSupport { public static final ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); + @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java index 4e0d9dd5f0..ef5e90f5e7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ControlCommandTest.java @@ -31,12 +31,14 @@ public class ControlCommandTest extends BaseCommandTestSupport { public static final ControlCommandTest SINGLETON = new ControlCommandTest(); + @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java index 0a2d82bc6e..b8696def12 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataArrayResponseTest.java @@ -29,12 +29,14 @@ public class DataArrayResponseTest extends ResponseTest { public static final DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); + @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java index 866582bb44..43ef32f046 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DataResponseTest.java @@ -31,12 +31,14 @@ public class DataResponseTest extends ResponseTest { public static final DataResponseTest SINGLETON = new DataResponseTest(); + @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java index f43e579ffd..9a0cb979cf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DestinationInfoTest.java @@ -29,12 +29,14 @@ public class DestinationInfoTest extends BaseCommandTestSupport { public static final DestinationInfoTest SINGLETON = new DestinationInfoTest(); + @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java index 426713ad5d..cda035fdad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/DiscoveryEventTest.java @@ -32,12 +32,14 @@ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static final DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); + @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java index 977799f7c0..46b1170c94 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ExceptionResponseTest.java @@ -31,12 +31,14 @@ public class ExceptionResponseTest extends ResponseTest { public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); + @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java index 17237cbee6..22077ea1a1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/FlushCommandTest.java @@ -31,12 +31,14 @@ public class FlushCommandTest extends BaseCommandTestSupport { public static final FlushCommandTest SINGLETON = new FlushCommandTest(); + @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java index 04ed49df07..67048f07be 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/IntegerResponseTest.java @@ -31,12 +31,14 @@ public class IntegerResponseTest extends ResponseTest { public static final IntegerResponseTest SINGLETON = new IntegerResponseTest(); + @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java index 3d99ec5145..f44661cfb8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalQueueAckTest.java @@ -32,12 +32,14 @@ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static final JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); + @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java index 2599225c93..c6397c7cb5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTopicAckTest.java @@ -32,12 +32,14 @@ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static final JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); + @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java index 06e3160c77..7111b4fef9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTraceTest.java @@ -32,12 +32,14 @@ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static final JournalTraceTest SINGLETON = new JournalTraceTest(); + @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java index bab04fff3f..890bc893a8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/JournalTransactionTest.java @@ -32,12 +32,14 @@ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static final JournalTransactionTest SINGLETON = new JournalTransactionTest(); + @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java index e83159e95a..0590fd45c8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/KeepAliveInfoTest.java @@ -31,12 +31,14 @@ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static final KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); + @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java index b7c8885d11..58fefe703a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LastPartialCommandTest.java @@ -31,12 +31,14 @@ public class LastPartialCommandTest extends PartialCommandTest { public static final LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); + @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java index 2959f6d6dd..d5ff795482 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/LocalTransactionIdTest.java @@ -31,12 +31,14 @@ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static final LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); + @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java index 6ac350f724..ec07890425 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageAckTest.java @@ -31,12 +31,14 @@ public class MessageAckTest extends BaseCommandTestSupport { public static final MessageAckTest SINGLETON = new MessageAckTest(); + @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java index 69dcdcef0a..2724d64db0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchNotificationTest.java @@ -31,12 +31,14 @@ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); + @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java index c7c8bb4369..ba6784dc24 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageDispatchTest.java @@ -31,12 +31,14 @@ public class MessageDispatchTest extends BaseCommandTestSupport { public static final MessageDispatchTest SINGLETON = new MessageDispatchTest(); + @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java index b4a247dc59..3c439383ca 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageIdTest.java @@ -32,12 +32,14 @@ public class MessageIdTest extends DataFileGeneratorTestSupport { public static final MessageIdTest SINGLETON = new MessageIdTest(); + @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java index d63d66b437..3667df38e4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessagePullTest.java @@ -31,12 +31,14 @@ public class MessagePullTest extends BaseCommandTestSupport { public static final MessagePullTest SINGLETON = new MessagePullTest(); + @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java index d36d937e03..9c467dfd96 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/MessageTestSupport.java @@ -33,6 +33,7 @@ import org.apache.activemq.util.MarshallingSupport; */ public abstract class MessageTestSupport extends BaseCommandTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java index 92f130ef05..4520dd4736 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/NetworkBridgeFilterTest.java @@ -32,12 +32,14 @@ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static final NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); + @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java index 3e366d6425..6458d75d36 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/PartialCommandTest.java @@ -32,12 +32,14 @@ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static final PartialCommandTest SINGLETON = new PartialCommandTest(); + @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java index 02dfc5c90c..c3cb1c545a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerIdTest.java @@ -32,12 +32,14 @@ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static final ProducerIdTest SINGLETON = new ProducerIdTest(); + @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java index 98dda5c54f..33f33296b9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ProducerInfoTest.java @@ -29,12 +29,14 @@ public class ProducerInfoTest extends BaseCommandTestSupport { public static final ProducerInfoTest SINGLETON = new ProducerInfoTest(); + @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java index 23eb8e7c6b..512f9c762d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveInfoTest.java @@ -31,12 +31,14 @@ public class RemoveInfoTest extends BaseCommandTestSupport { public static final RemoveInfoTest SINGLETON = new RemoveInfoTest(); + @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java index a2e0669aee..47218075e7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/RemoveSubscriptionInfoTest.java @@ -31,12 +31,14 @@ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); + @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java index 0677ce9666..3165b29977 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ReplayCommandTest.java @@ -31,12 +31,14 @@ public class ReplayCommandTest extends BaseCommandTestSupport { public static final ReplayCommandTest SINGLETON = new ReplayCommandTest(); + @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java index 4614b5f6c1..1723da590b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ResponseTest.java @@ -31,12 +31,14 @@ public class ResponseTest extends BaseCommandTestSupport { public static final ResponseTest SINGLETON = new ResponseTest(); + @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java index f1e8d9d65d..ced44eecce 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionIdTest.java @@ -32,12 +32,14 @@ public class SessionIdTest extends DataFileGeneratorTestSupport { public static final SessionIdTest SINGLETON = new SessionIdTest(); + @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java index 836ac8ebaa..3d5b4a0d65 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SessionInfoTest.java @@ -31,12 +31,14 @@ public class SessionInfoTest extends BaseCommandTestSupport { public static final SessionInfoTest SINGLETON = new SessionInfoTest(); + @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java index d837faafca..e94caed563 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/ShutdownInfoTest.java @@ -31,12 +31,14 @@ public class ShutdownInfoTest extends BaseCommandTestSupport { public static final ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); + @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java index a27052ae66..67799f3bf0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/SubscriptionInfoTest.java @@ -32,12 +32,14 @@ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static final SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); + @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java index 7bf6d3d1e2..f1810bdfdb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionIdTestSupport.java @@ -30,6 +30,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java index 03b457734b..8978478858 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/TransactionInfoTest.java @@ -31,12 +31,14 @@ public class TransactionInfoTest extends BaseCommandTestSupport { public static final TransactionInfoTest SINGLETON = new TransactionInfoTest(); + @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java index d7237a9671..94f51bac0f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/WireFormatInfoTest.java @@ -29,12 +29,14 @@ public class WireFormatInfoTest extends DataFileGeneratorTestSupport { public static final WireFormatInfoTest SINGLETON = new WireFormatInfoTest(); + @Override public Object createObject() throws Exception { WireFormatInfo info = new WireFormatInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); WireFormatInfo info = (WireFormatInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java index 9b49001489..3d9ea6c30a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v2/XATransactionIdTest.java @@ -31,12 +31,14 @@ public class XATransactionIdTest extends TransactionIdTestSupport { public static final XATransactionIdTest SINGLETON = new XATransactionIdTest(); + @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java index bab20c4c43..1619b26d1a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java @@ -29,6 +29,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java index f19dcc07c0..e4ef68466f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java @@ -32,12 +32,14 @@ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static final BrokerIdTest SINGLETON = new BrokerIdTest(); + @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java index 0d4be46dfb..494d7d2fee 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java @@ -28,12 +28,14 @@ public class BrokerInfoTest extends BaseCommandTestSupport { public static final BrokerInfoTest SINGLETON = new BrokerInfoTest(); + @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java index ccb5880d15..3106db476d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java @@ -31,12 +31,14 @@ public class ConnectionControlTest extends BaseCommandTestSupport { public static final ConnectionControlTest SINGLETON = new ConnectionControlTest(); + @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java index 0908400099..8d23282fbd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java @@ -31,12 +31,14 @@ public class ConnectionErrorTest extends BaseCommandTestSupport { public static final ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); + @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java index bd65d86c7e..2a371b4ca1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java @@ -32,12 +32,14 @@ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static final ConnectionIdTest SINGLETON = new ConnectionIdTest(); + @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java index 0bf71131c2..9bc45ec271 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java @@ -29,12 +29,14 @@ public class ConnectionInfoTest extends BaseCommandTestSupport { public static final ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); + @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java index 5c2bf7f2f2..db11e7f1e9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java @@ -31,12 +31,14 @@ public class ConsumerControlTest extends BaseCommandTestSupport { public static final ConsumerControlTest SINGLETON = new ConsumerControlTest(); + @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java index 8da7fd9ead..25e526f259 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java @@ -32,12 +32,14 @@ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static final ConsumerIdTest SINGLETON = new ConsumerIdTest(); + @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java index 6d3db8097f..c5c7253a4d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java @@ -29,12 +29,14 @@ public class ConsumerInfoTest extends BaseCommandTestSupport { public static final ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); + @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java index 735997702e..4a1d72d589 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java @@ -31,12 +31,14 @@ public class ControlCommandTest extends BaseCommandTestSupport { public static final ControlCommandTest SINGLETON = new ControlCommandTest(); + @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java index 0198aa5399..877671a048 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java @@ -29,12 +29,14 @@ public class DataArrayResponseTest extends ResponseTest { public static final DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); + @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java index 76b1b3f1f8..3db762d5e0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java @@ -31,12 +31,14 @@ public class DataResponseTest extends ResponseTest { public static final DataResponseTest SINGLETON = new DataResponseTest(); + @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java index b52316b95c..6ee9f152dc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java @@ -29,12 +29,14 @@ public class DestinationInfoTest extends BaseCommandTestSupport { public static final DestinationInfoTest SINGLETON = new DestinationInfoTest(); + @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java index a9282fbb60..76b1ff5b66 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java @@ -32,12 +32,14 @@ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static final DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); + @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java index 0311b8829d..fe90b22a5a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java @@ -31,12 +31,14 @@ public class ExceptionResponseTest extends ResponseTest { public static final ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); + @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java index 21c5bafe7e..c653d30fae 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java @@ -31,12 +31,14 @@ public class FlushCommandTest extends BaseCommandTestSupport { public static final FlushCommandTest SINGLETON = new FlushCommandTest(); + @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java index 790eb5ca25..e22c3ac9d2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java @@ -31,12 +31,14 @@ public class IntegerResponseTest extends ResponseTest { public static final IntegerResponseTest SINGLETON = new IntegerResponseTest(); + @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java index 4ec3fcc217..775caaca96 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java @@ -32,12 +32,14 @@ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static final JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); + @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java index 599403d37d..5883b8311c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java @@ -32,12 +32,14 @@ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static final JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); + @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java index 624ec60f87..5df78b5009 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java @@ -32,12 +32,14 @@ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static final JournalTraceTest SINGLETON = new JournalTraceTest(); + @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java index cc4efb303c..de9b925e16 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java @@ -32,12 +32,14 @@ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static final JournalTransactionTest SINGLETON = new JournalTransactionTest(); + @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java index 5222970220..932f1ba390 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java @@ -31,12 +31,14 @@ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static final KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); + @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java index 58df6da6a9..694c4ccdcb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java @@ -31,12 +31,14 @@ public class LastPartialCommandTest extends PartialCommandTest { public static final LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); + @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java index 45bce5ef62..303266d63a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java @@ -31,12 +31,14 @@ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static final LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); + @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java index e6ba17a66a..0a5ce94bc5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java @@ -31,12 +31,14 @@ public class MessageAckTest extends BaseCommandTestSupport { public static final MessageAckTest SINGLETON = new MessageAckTest(); + @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java index 3898ab0f5c..099adb091c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java @@ -31,12 +31,14 @@ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static final MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); + @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java index 68e606cb96..c6d29c014d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java @@ -31,12 +31,14 @@ public class MessageDispatchTest extends BaseCommandTestSupport { public static final MessageDispatchTest SINGLETON = new MessageDispatchTest(); + @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java index b59ff2e4ec..a82b8f4687 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java @@ -32,12 +32,14 @@ public class MessageIdTest extends DataFileGeneratorTestSupport { public static final MessageIdTest SINGLETON = new MessageIdTest(); + @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java index 43e8dbb240..5ce9770c6c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java @@ -31,12 +31,14 @@ public class MessagePullTest extends BaseCommandTestSupport { public static final MessagePullTest SINGLETON = new MessagePullTest(); + @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java index 3571230958..549d116378 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.command.Message; */ public abstract class MessageTestSupport extends BaseCommandTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java index b3f93076e7..625f000229 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java @@ -32,12 +32,14 @@ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static final NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); + @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java index ef102fce1c..73da1c6003 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java @@ -32,12 +32,14 @@ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static final PartialCommandTest SINGLETON = new PartialCommandTest(); + @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java index 84c94ad072..672ea8958e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerAckTest.java @@ -31,12 +31,14 @@ public class ProducerAckTest extends BaseCommandTestSupport { public static final ProducerAckTest SINGLETON = new ProducerAckTest(); + @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java index df980fb605..1cab659c99 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java @@ -32,12 +32,14 @@ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static final ProducerIdTest SINGLETON = new ProducerIdTest(); + @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java index e25687aea6..8e6ac5e137 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java @@ -29,12 +29,14 @@ public class ProducerInfoTest extends BaseCommandTestSupport { public static final ProducerInfoTest SINGLETON = new ProducerInfoTest(); + @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java index 0dd4053430..92e4b2e707 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java @@ -31,12 +31,14 @@ public class RemoveInfoTest extends BaseCommandTestSupport { public static final RemoveInfoTest SINGLETON = new RemoveInfoTest(); + @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java index b516f1ea1e..594cf9fcb5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java @@ -31,12 +31,14 @@ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static final RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); + @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java index fa5e6f2bbd..3b763f323b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java @@ -31,12 +31,14 @@ public class ReplayCommandTest extends BaseCommandTestSupport { public static final ReplayCommandTest SINGLETON = new ReplayCommandTest(); + @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java index 51afa4f9d4..5172b33907 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java @@ -31,12 +31,14 @@ public class ResponseTest extends BaseCommandTestSupport { public static final ResponseTest SINGLETON = new ResponseTest(); + @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java index 847600bfda..3947980594 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java @@ -32,12 +32,14 @@ public class SessionIdTest extends DataFileGeneratorTestSupport { public static final SessionIdTest SINGLETON = new SessionIdTest(); + @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java index d89967dbb0..b51fb2f663 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java @@ -31,12 +31,14 @@ public class SessionInfoTest extends BaseCommandTestSupport { public static final SessionInfoTest SINGLETON = new SessionInfoTest(); + @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java index 0c1b1ba9a1..cd635e9d58 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java @@ -31,12 +31,14 @@ public class ShutdownInfoTest extends BaseCommandTestSupport { public static final ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); + @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java index 2960f82a29..cbab21ffcd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java @@ -32,12 +32,14 @@ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static final SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); + @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java index 62c4ffe545..2bc91720eb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java @@ -30,6 +30,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java index 8619cc1b4a..4e0f84f9ea 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java @@ -31,12 +31,14 @@ public class TransactionInfoTest extends BaseCommandTestSupport { public static final TransactionInfoTest SINGLETON = new TransactionInfoTest(); + @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java index 9b47863161..be42e181bd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java @@ -31,12 +31,14 @@ public class XATransactionIdTest extends TransactionIdTestSupport { public static final XATransactionIdTest SINGLETON = new XATransactionIdTest(); + @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java index bf60757e86..ed5d454717 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java index 52fc6cafea..73aee8f235 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerIdTest.java @@ -37,12 +37,14 @@ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); + @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java index 21fea6f0f5..35a0fa2e3f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/BrokerInfoTest.java @@ -37,12 +37,14 @@ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); + @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java index 06fc534130..850ea9f3d7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionControlTest.java @@ -37,12 +37,14 @@ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); + @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java index 43be7f0ab4..a04aa391d5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionErrorTest.java @@ -37,12 +37,14 @@ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); + @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java index a04b0c4bca..bd75fd1328 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionIdTest.java @@ -37,12 +37,14 @@ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); + @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java index 333153424f..8c21d793c6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConnectionInfoTest.java @@ -37,12 +37,14 @@ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); + @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java index 57d722e0a2..536b63f40e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerControlTest.java @@ -37,12 +37,14 @@ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); + @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java index 5142821fc6..5cfd0377de 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerIdTest.java @@ -37,12 +37,14 @@ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); + @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java index 6af8133000..4e9901cc52 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ConsumerInfoTest.java @@ -37,12 +37,14 @@ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); + @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java index e487428618..2c325c767b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ControlCommandTest.java @@ -37,12 +37,14 @@ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); + @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java index e66384377f..119d2afaad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataArrayResponseTest.java @@ -37,12 +37,14 @@ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); + @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java index 9dd492176b..06948fa4d2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DataResponseTest.java @@ -37,12 +37,14 @@ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); + @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java index 8eae2289ac..ad08ab206c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DestinationInfoTest.java @@ -37,12 +37,14 @@ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); + @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java index 55e546054b..eafe52ea59 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/DiscoveryEventTest.java @@ -37,12 +37,14 @@ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); + @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java index e8ff554481..dd0764bfa3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ExceptionResponseTest.java @@ -37,12 +37,14 @@ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); + @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java index 961087ca3a..7678ebb4ea 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/FlushCommandTest.java @@ -37,12 +37,14 @@ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); + @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java index 1f71ddde1d..c15d90291d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/IntegerResponseTest.java @@ -37,12 +37,14 @@ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); + @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java index f5f09f9b3e..14727751e7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalQueueAckTest.java @@ -37,12 +37,14 @@ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); + @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java index f4361e588c..2b50dc85ca 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTopicAckTest.java @@ -37,12 +37,14 @@ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); + @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java index 091ace2a2b..c986f25687 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTraceTest.java @@ -37,12 +37,14 @@ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); + @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java index 1bfedd1233..7e6a675707 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/JournalTransactionTest.java @@ -37,12 +37,14 @@ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); + @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java index 46d50c5cf4..73e46b1a28 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/KeepAliveInfoTest.java @@ -37,12 +37,14 @@ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); + @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java index 9721de85ae..e2b0f8731f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LastPartialCommandTest.java @@ -37,12 +37,14 @@ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); + @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java index 2a0e32545e..0ad31d3061 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/LocalTransactionIdTest.java @@ -37,12 +37,14 @@ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); + @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java index de815ed49b..64f5df3082 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageAckTest.java @@ -37,12 +37,14 @@ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); + @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java index 5ceaa0db64..840d1012bc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchNotificationTest.java @@ -37,12 +37,14 @@ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); + @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java index 9faf35bc18..9c85381632 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageDispatchTest.java @@ -37,12 +37,14 @@ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); + @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java index 26a5aa514d..29b32696a6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageIdTest.java @@ -37,12 +37,14 @@ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); + @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java index e841784d57..7a7ba3fadd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessagePullTest.java @@ -37,12 +37,14 @@ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); + @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java index 4f1bd36252..f84ddc97c2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/MessageTestSupport.java @@ -30,6 +30,7 @@ import org.apache.activemq.command.*; */ public abstract class MessageTestSupport extends BaseCommandTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java index 0b736cab41..587ddd6b3c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/NetworkBridgeFilterTest.java @@ -37,12 +37,14 @@ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); + @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java index 9eebbeb9f1..b255f50a2e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/PartialCommandTest.java @@ -37,12 +37,14 @@ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); + @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java index 8d8e83ca77..76812bbf7b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerAckTest.java @@ -37,12 +37,14 @@ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); + @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java index fee5717e0a..b5e3a3e2c6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerIdTest.java @@ -37,12 +37,14 @@ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); + @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java index 6310eebf30..fff9ce1541 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ProducerInfoTest.java @@ -37,12 +37,14 @@ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); + @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java index 3370cfad84..311754d4b1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveInfoTest.java @@ -37,12 +37,14 @@ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); + @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java index a6a6a56edb..b6d49ec723 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/RemoveSubscriptionInfoTest.java @@ -37,12 +37,14 @@ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); + @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java index e8eec8a205..37adbf6a6d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ReplayCommandTest.java @@ -37,12 +37,14 @@ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); + @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java index 3a64c3982b..f65ac58093 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ResponseTest.java @@ -37,12 +37,14 @@ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); + @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java index 33c56dedbb..b2fb344622 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionIdTest.java @@ -37,12 +37,14 @@ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); + @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java index 34ed897dbe..b9394ad0c4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SessionInfoTest.java @@ -37,12 +37,14 @@ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); + @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java index 827f2067aa..9f39bd6a6f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/ShutdownInfoTest.java @@ -37,12 +37,14 @@ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); + @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java index 16938910ff..3e2a518c8a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/SubscriptionInfoTest.java @@ -37,12 +37,14 @@ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); + @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java index 5e028fff3f..191459c078 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionIdTestSupport.java @@ -35,6 +35,7 @@ import org.apache.activemq.command.*; */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java index fa0591c7c6..c0ec50e257 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/TransactionInfoTest.java @@ -37,12 +37,14 @@ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); + @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java index 27d60ac02e..c4b9652626 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v4/XATransactionIdTest.java @@ -37,12 +37,14 @@ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); + @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java index 5e2288f659..b3ba4e92e8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java index 73c8663d9c..aafd080eae 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerIdTest.java @@ -37,12 +37,14 @@ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); + @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java index 2a74d44fde..ccabc06946 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/BrokerInfoTest.java @@ -37,12 +37,14 @@ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); + @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java index 2dd2fb5b63..1dc5569b19 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionControlTest.java @@ -37,12 +37,14 @@ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); + @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java index eb62bbafe7..2c9b4a57d9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionErrorTest.java @@ -37,12 +37,14 @@ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); + @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java index 565a4d52f0..ed8ad98ee2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionIdTest.java @@ -37,12 +37,14 @@ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); + @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java index 6358411178..b5f7c18d14 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConnectionInfoTest.java @@ -37,12 +37,14 @@ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); + @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java index 920da538af..e7dad8bbbe 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerControlTest.java @@ -37,12 +37,14 @@ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); + @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java index 0e8e56397d..2defb2b91f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerIdTest.java @@ -37,12 +37,14 @@ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); + @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java index 07ee77da06..a6562bbd87 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ConsumerInfoTest.java @@ -37,12 +37,14 @@ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); + @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java index dc1a257b60..f09db1586f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ControlCommandTest.java @@ -37,12 +37,14 @@ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); + @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java index 826a170672..3f95002409 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataArrayResponseTest.java @@ -37,12 +37,14 @@ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); + @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java index d7e20ac647..64b8f6118e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DataResponseTest.java @@ -37,12 +37,14 @@ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); + @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java index da96ce6511..7db3624a22 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DestinationInfoTest.java @@ -37,12 +37,14 @@ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); + @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java index 3131ff5e43..0022260e42 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/DiscoveryEventTest.java @@ -37,12 +37,14 @@ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); + @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java index dcce7a66c6..7a14f70717 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ExceptionResponseTest.java @@ -37,12 +37,14 @@ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); + @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java index 42bc839ab1..06a860ae66 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/FlushCommandTest.java @@ -37,12 +37,14 @@ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); + @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java index 4fb93b85c9..61cadb58a1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/IntegerResponseTest.java @@ -37,12 +37,14 @@ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); + @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java index dd58581c44..70c041406c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalQueueAckTest.java @@ -37,12 +37,14 @@ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); + @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java index 0911ef9191..9ba2ae6238 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTopicAckTest.java @@ -37,12 +37,14 @@ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); + @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java index 5b6181db76..05e4402c0b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTraceTest.java @@ -37,12 +37,14 @@ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); + @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java index 166b360feb..629e951980 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/JournalTransactionTest.java @@ -37,12 +37,14 @@ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); + @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java index 9b6478f727..da6de0972c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/KeepAliveInfoTest.java @@ -37,12 +37,14 @@ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); + @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java index 5b7003154f..ce965e096e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LastPartialCommandTest.java @@ -37,12 +37,14 @@ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); + @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java index 9baab76102..cc7fa8a25a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/LocalTransactionIdTest.java @@ -37,12 +37,14 @@ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); + @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java index c57a6163ca..b558c44de9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageAckTest.java @@ -37,12 +37,14 @@ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); + @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java index 937ec23210..343fa7b999 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchNotificationTest.java @@ -37,12 +37,14 @@ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); + @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java index 2a7e570e5b..67081b696d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageDispatchTest.java @@ -37,12 +37,14 @@ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); + @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java index 0664cdd5b7..86511938bc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageIdTest.java @@ -37,12 +37,14 @@ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); + @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java index 2bd3c57446..17a1a83fe3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessagePullTest.java @@ -37,12 +37,14 @@ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); + @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java index 408846cdf4..fc1345775f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/MessageTestSupport.java @@ -30,6 +30,7 @@ import org.apache.activemq.command.*; */ public abstract class MessageTestSupport extends BaseCommandTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java index d20d918592..5b0bf2b15a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/NetworkBridgeFilterTest.java @@ -37,12 +37,14 @@ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); + @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java index 99212a17fd..2fbaef78ce 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/PartialCommandTest.java @@ -37,12 +37,14 @@ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); + @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java index 317a737d30..79b1dbc147 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerAckTest.java @@ -37,12 +37,14 @@ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); + @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java index e8b07943e5..a9a919cea1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerIdTest.java @@ -37,12 +37,14 @@ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); + @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java index 22f325f971..5fd9479f06 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ProducerInfoTest.java @@ -37,12 +37,14 @@ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); + @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java index 5609701b1b..5dee5f207e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveInfoTest.java @@ -37,12 +37,14 @@ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); + @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java index 371c7bfd9d..aae5c421b9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/RemoveSubscriptionInfoTest.java @@ -37,12 +37,14 @@ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); + @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java index 6b13c89037..b217cc3078 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ReplayCommandTest.java @@ -37,12 +37,14 @@ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); + @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java index 3e017ae7d3..85953a5863 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ResponseTest.java @@ -37,12 +37,14 @@ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); + @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java index a4b4ebf1f5..452ed0b426 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionIdTest.java @@ -37,12 +37,14 @@ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); + @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java index 716cee2fb4..e45f15beab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SessionInfoTest.java @@ -37,12 +37,14 @@ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); + @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java index d50e923298..d503d8b8cc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/ShutdownInfoTest.java @@ -37,12 +37,14 @@ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); + @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java index f79708ce1c..b42e95ea17 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/SubscriptionInfoTest.java @@ -37,12 +37,14 @@ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); + @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java index 54f32ef7d7..5adf15981c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionIdTestSupport.java @@ -35,6 +35,7 @@ import org.apache.activemq.command.*; */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java index c958cd3493..a7bf0409c5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/TransactionInfoTest.java @@ -37,12 +37,14 @@ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); + @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java index 9312dc934f..d7885d47ca 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v5/XATransactionIdTest.java @@ -37,12 +37,14 @@ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); + @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java index a6f2460ebd..108315ed15 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java index ef6874e7f4..ff7bf87f1f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerIdTest.java @@ -37,12 +37,14 @@ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); + @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java index 7327579486..163f0298ed 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/BrokerInfoTest.java @@ -37,12 +37,14 @@ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); + @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java index 39167c95c6..6084882fbf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionControlTest.java @@ -37,12 +37,14 @@ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); + @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java index 571a27791e..2ea5ae3022 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionErrorTest.java @@ -37,12 +37,14 @@ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); + @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java index ae4bf75f7d..cdd83119c4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionIdTest.java @@ -37,12 +37,14 @@ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); + @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java index 78d32a4360..ecb1463189 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConnectionInfoTest.java @@ -37,12 +37,14 @@ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); + @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java index 0671cf681e..1a7bd18aec 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerControlTest.java @@ -37,12 +37,14 @@ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); + @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java index 45fc3c3a8b..9a41c884bb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerIdTest.java @@ -37,12 +37,14 @@ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); + @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java index 4f15b40ac3..205bee1ba6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ConsumerInfoTest.java @@ -37,12 +37,14 @@ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); + @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java index d75aba4aeb..1f2bae3edb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ControlCommandTest.java @@ -37,12 +37,14 @@ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); + @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java index ab2c9b29eb..ba31ed7452 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataArrayResponseTest.java @@ -37,12 +37,14 @@ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); + @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java index ad88e2a5e0..8d3560c73c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DataResponseTest.java @@ -37,12 +37,14 @@ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); + @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java index 930bb10413..62d32fb74f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DestinationInfoTest.java @@ -37,12 +37,14 @@ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); + @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java index 66ee50ee72..1c3dc6f071 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/DiscoveryEventTest.java @@ -37,12 +37,14 @@ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); + @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java index 98c76eb710..48867ad926 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ExceptionResponseTest.java @@ -37,12 +37,14 @@ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); + @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java index 6afaf6f2e7..5de7678598 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/FlushCommandTest.java @@ -37,12 +37,14 @@ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); + @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java index 80c8b3be01..845c9d02ae 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/IntegerResponseTest.java @@ -37,12 +37,14 @@ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); + @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java index 8cb9761077..9fc7c57de5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalQueueAckTest.java @@ -37,12 +37,14 @@ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); + @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java index c844f37d06..ffb9f1033e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTopicAckTest.java @@ -37,12 +37,14 @@ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); + @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java index 75c0c60878..d9227403e8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTraceTest.java @@ -37,12 +37,14 @@ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); + @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java index 18cab1bbb8..8a0146efad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/JournalTransactionTest.java @@ -37,12 +37,14 @@ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); + @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java index 241231f73c..2ac9449e68 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/KeepAliveInfoTest.java @@ -37,12 +37,14 @@ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); + @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java index 11a8eb2255..d28beff6be 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LastPartialCommandTest.java @@ -37,12 +37,14 @@ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); + @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java index 89a2c5f64f..ed303a479c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/LocalTransactionIdTest.java @@ -37,12 +37,14 @@ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); + @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java index 89acfabb63..cd83d57b81 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageAckTest.java @@ -37,12 +37,14 @@ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); + @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java index 055274da6e..6e6d41e6e1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchNotificationTest.java @@ -37,12 +37,14 @@ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); + @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java index 3f38a16b3f..aed02613d6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageDispatchTest.java @@ -37,12 +37,14 @@ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); + @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java index 4d85416ce9..ac72169c5c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageIdTest.java @@ -37,12 +37,14 @@ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); + @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java index 7c2ce1cf88..73ddc4a2ab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessagePullTest.java @@ -37,12 +37,14 @@ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); + @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java index 92edf106aa..684ebddcf4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/MessageTestSupport.java @@ -30,6 +30,7 @@ import org.apache.activemq.command.*; */ public abstract class MessageTestSupport extends BaseCommandTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java index 19c15b1081..92aa4b9d9b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/NetworkBridgeFilterTest.java @@ -37,12 +37,14 @@ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); + @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java index 79793794ec..9478f104ad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/PartialCommandTest.java @@ -37,12 +37,14 @@ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); + @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java index 636a5c800c..b2e6162354 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerAckTest.java @@ -37,12 +37,14 @@ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); + @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java index 209f70e692..f95444aa81 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerIdTest.java @@ -37,12 +37,14 @@ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); + @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java index 20044bf4e2..20a28c38bd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ProducerInfoTest.java @@ -37,12 +37,14 @@ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); + @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java index 13d0118a89..f192d89681 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveInfoTest.java @@ -37,12 +37,14 @@ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); + @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java index 913c1c3084..a15bb20226 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/RemoveSubscriptionInfoTest.java @@ -37,12 +37,14 @@ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); + @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java index c808ada380..e3f6b07dc7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ReplayCommandTest.java @@ -37,12 +37,14 @@ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); + @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java index 903fd3f799..56384aee64 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ResponseTest.java @@ -37,12 +37,14 @@ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); + @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java index a0d272e2bf..debd654468 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionIdTest.java @@ -37,12 +37,14 @@ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); + @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java index 5ba5884a8b..25d62ab8b3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SessionInfoTest.java @@ -37,12 +37,14 @@ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); + @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java index 02cb37abe6..886e126452 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/ShutdownInfoTest.java @@ -37,12 +37,14 @@ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); + @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java index 2af59c6002..b65ee999eb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/SubscriptionInfoTest.java @@ -37,12 +37,14 @@ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); + @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java index 791e5d2ac7..3a58bd8cb5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionIdTestSupport.java @@ -35,6 +35,7 @@ import org.apache.activemq.command.*; */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java index 9df27f4cb0..b963cd31f9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/TransactionInfoTest.java @@ -37,12 +37,14 @@ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); + @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java index 65bb5815f9..73d7969a2b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v6/XATransactionIdTest.java @@ -37,12 +37,14 @@ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); + @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java index 03e354898e..d78bf96a00 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java index 20beaccd55..5dc13a9e2a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; info.setValue("Value:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; info.setValue("Value:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java index cb15d0c82c..fe5a609546 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/BrokerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; info.setBrokerId(createBrokerId("BrokerId:1")); info.setBrokerURL("BrokerURL:2"); { BrokerInfo value[] = new BrokerInfo[0]; for (int i = 0; i < 0; i++) { value[i] = createBrokerInfo("PeerBrokerInfos:3"); } info.setPeerBrokerInfos(value); } info.setBrokerName("BrokerName:4"); info.setSlaveBroker(true); info.setMasterBroker(false); info.setFaultTolerantConfiguration(true); info.setDuplexConnection(false); info.setNetworkConnection(true); info.setConnectionId(1); info.setBrokerUploadUrl("BrokerUploadUrl:5"); info.setNetworkProperties("NetworkProperties:6"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; info.setBrokerId(createBrokerId("BrokerId:1")); info.setBrokerURL("BrokerURL:2"); { BrokerInfo value[] = new BrokerInfo[0]; for (int i = 0; i < 0; i++) { value[i] = createBrokerInfo("PeerBrokerInfos:3"); } info.setPeerBrokerInfos(value); } info.setBrokerName("BrokerName:4"); info.setSlaveBroker(true); info.setMasterBroker(false); info.setFaultTolerantConfiguration(true); info.setDuplexConnection(false); info.setNetworkConnection(true); info.setConnectionId(1); info.setBrokerUploadUrl("BrokerUploadUrl:5"); info.setNetworkProperties("NetworkProperties:6"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java index f0de0554b0..8490f85220 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionControlTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; info.setClose(true); info.setExit(false); info.setFaultTolerant(true); info.setResume(false); info.setSuspend(true); info.setConnectedBrokers("ConnectedBrokers:1"); info.setReconnectTo("ReconnectTo:2"); info.setRebalanceConnection(false); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; info.setClose(true); info.setExit(false); info.setFaultTolerant(true); info.setResume(false); info.setSuspend(true); info.setConnectedBrokers("ConnectedBrokers:1"); info.setReconnectTo("ReconnectTo:2"); info.setRebalanceConnection(false); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java index f96a33000b..96a9912f1c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionErrorTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionError * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; info.setException(createThrowable("Exception:1")); info.setConnectionId(createConnectionId("ConnectionId:2")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionError * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; info.setException(createThrowable("Exception:1")); info.setConnectionId(createConnectionId("ConnectionId:2")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java index 518b61c787..50a41499df 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; info.setValue("Value:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; info.setValue("Value:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java index 98b1eade67..f404702712 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConnectionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setClientId("ClientId:2"); info.setPassword("Password:3"); info.setUserName("UserName:4"); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setBrokerMasterConnector(true); info.setManageable(false); info.setClientMaster(true); info.setFaultTolerant(false); info.setFailoverReconnect(true); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setClientId("ClientId:2"); info.setPassword("Password:3"); info.setUserName("UserName:4"); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setBrokerMasterConnector(true); info.setManageable(false); info.setClientMaster(true); info.setFaultTolerant(false); info.setFailoverReconnect(true); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java index a08dc2e58b..aee6d34b49 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerControlTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:2")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:2")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java index f06db24554..339ebc63e0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; info.setConnectionId("ConnectionId:1"); info.setSessionId(1); info.setValue(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; info.setConnectionId("ConnectionId:1"); info.setSessionId(1); info.setValue(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java index 309ad4ccf7..5c25f11d4f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ConsumerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setBrowser(true); info.setDestination(createActiveMQDestination("Destination:2")); info.setPrefetchSize(1); info.setMaximumPendingMessageLimit(2); info.setDispatchAsync(false); info.setSelector("Selector:3"); info.setSubscriptionName("SubscriptionName:4"); info.setNoLocal(true); info.setExclusive(false); info.setRetroactive(true); info.setPriority((byte) 1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); info.setNetworkSubscription(false); info.setOptimizedAcknowledge(true); info.setNoRangeAcks(false); { ConsumerId value[] = new ConsumerId[2]; for (int i = 0; i < 2; i++) { value[i] = createConsumerId("NetworkConsumerPath:7"); } info.setNetworkConsumerPath(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setBrowser(true); info.setDestination(createActiveMQDestination("Destination:2")); info.setPrefetchSize(1); info.setMaximumPendingMessageLimit(2); info.setDispatchAsync(false); info.setSelector("Selector:3"); info.setSubscriptionName("SubscriptionName:4"); info.setNoLocal(true); info.setExclusive(false); info.setRetroactive(true); info.setPriority((byte) 1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); info.setNetworkSubscription(false); info.setOptimizedAcknowledge(true); info.setNoRangeAcks(false); { ConsumerId value[] = new ConsumerId[2]; for (int i = 0; i < 2; i++) { value[i] = createConsumerId("NetworkConsumerPath:7"); } info.setNetworkConsumerPath(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java index b20acfe356..cad57469dc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ControlCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ControlCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; info.setCommand("Command:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ControlCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; info.setCommand("Command:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java index 78044f3283..16344e309e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataArrayResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataArrayResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; { DataStructure value[] = new DataStructure[2]; for (int i = 0; i < 2; i++) { value[i] = createDataStructure("Data:1"); } info.setData(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataArrayResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; { DataStructure value[] = new DataStructure[2]; for (int i = 0; i < 2; i++) { value[i] = createDataStructure("Data:1"); } info.setData(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java index e9bd160a6a..f885a1537f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DataResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; info.setData(createDataStructure("Data:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; info.setData(createDataStructure("Data:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java index fb0eeba106..ee9ae00a09 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DestinationInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DestinationInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setOperationType((byte) 1); info.setTimeout(1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DestinationInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setOperationType((byte) 1); info.setTimeout(1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java index bf0515d960..395d29d094 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/DiscoveryEventTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DiscoveryEvent * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; info.setServiceName("ServiceName:1"); info.setBrokerName("BrokerName:2"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DiscoveryEvent * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; info.setServiceName("ServiceName:1"); info.setBrokerName("BrokerName:2"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java index 83965a5d43..321a5b4b65 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ExceptionResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ExceptionResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; info.setException(createThrowable("Exception:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ExceptionResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; info.setException(createThrowable("Exception:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java index 590f76a6ac..3460cba5d9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/FlushCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for FlushCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for FlushCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java index 0e99cf6deb..343cd57bc6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/IntegerResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for IntegerResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; info.setResult(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for IntegerResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; info.setResult(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java index 412a028568..7d34ce9918 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalQueueAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalQueueAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageAck(createMessageAck("MessageAck:2")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalQueueAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageAck(createMessageAck("MessageAck:2")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java index e98135f87b..a2491d008a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTopicAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTopicAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageId(createMessageId("MessageId:2")); info.setMessageSequenceId(1); info.setSubscritionName("SubscritionName:3"); info.setClientId("ClientId:4"); info.setTransactionId(createTransactionId("TransactionId:5")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTopicAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageId(createMessageId("MessageId:2")); info.setMessageSequenceId(1); info.setSubscritionName("SubscritionName:3"); info.setClientId("ClientId:4"); info.setTransactionId(createTransactionId("TransactionId:5")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java index 88389fa63c..9d8bfc4a51 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTraceTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTrace * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; info.setMessage("Message:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTrace * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; info.setMessage("Message:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java index 691cc0b476..7ca2728905 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/JournalTransactionTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTransaction * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; info.setTransactionId(createTransactionId("TransactionId:1")); info.setType((byte) 1); info.setWasPrepared(true); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTransaction * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; info.setTransactionId(createTransactionId("TransactionId:1")); info.setType((byte) 1); info.setWasPrepared(true); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java index c4c2760371..70833e618e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/KeepAliveInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for KeepAliveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for KeepAliveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java index 81363be0a5..d5c403b2a9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LastPartialCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LastPartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LastPartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java index 475401e8bf..51ea095abf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/LocalTransactionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LocalTransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; info.setValue(1); info.setConnectionId(createConnectionId("ConnectionId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LocalTransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; info.setValue(1); info.setConnectionId(createConnectionId("ConnectionId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java index 7211b8021f..74dc8d6ba6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setConsumerId(createConsumerId("ConsumerId:3")); info.setAckType((byte) 1); info.setFirstMessageId(createMessageId("FirstMessageId:4")); info.setLastMessageId(createMessageId("LastMessageId:5")); info.setMessageCount(1); info.setPoisonCause(createThrowable("PoisonCause:6")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setConsumerId(createConsumerId("ConsumerId:3")); info.setAckType((byte) 1); info.setFirstMessageId(createMessageId("FirstMessageId:4")); info.setLastMessageId(createMessageId("LastMessageId:5")); info.setMessageCount(1); info.setPoisonCause(createThrowable("PoisonCause:6")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java index ca5a604fa5..92b64ab8f0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchNotificationTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatchNotification * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setDeliverySequenceId(1); info.setMessageId(createMessageId("MessageId:3")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatchNotification * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setDeliverySequenceId(1); info.setMessageId(createMessageId("MessageId:3")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java index 049d0fa1b6..61fc4331a9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageDispatchTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatch * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setMessage(createMessage("Message:3")); info.setRedeliveryCounter(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatch * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setMessage(createMessage("Message:3")); info.setRedeliveryCounter(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java index f9b57ff6d4..4709ae3417 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; info.setProducerId(createProducerId("ProducerId:1")); info.setProducerSequenceId(1); info.setBrokerSequenceId(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; info.setProducerId(createProducerId("ProducerId:1")); info.setProducerSequenceId(1); info.setBrokerSequenceId(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java index 6a1ccf8654..b12bdb52ae 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessagePullTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessagePull * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTimeout(1); info.setCorrelationId("CorrelationId:3"); info.setMessageId(createMessageId("MessageId:4")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessagePull * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTimeout(1); info.setCorrelationId("CorrelationId:3"); info.setMessageId(createMessageId("MessageId:4")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java index edce61d627..ad9f357b39 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/MessageTestSupport.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Message * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class MessageTestSupport extends BaseCommandTestSupport { protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTransactionId(createTransactionId("TransactionId:3")); info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4")); info.setMessageId(createMessageId("MessageId:5")); info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6")); info.setGroupID("GroupID:7"); info.setGroupSequence(1); info.setCorrelationId("CorrelationId:8"); info.setPersistent(true); info.setExpiration(1); info.setPriority((byte) 1); info.setReplyTo(createActiveMQDestination("ReplyTo:9")); info.setTimestamp(2); info.setType("Type:10"); { byte data[] = "Content:11".getBytes(); info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } { byte data[] = "MarshalledProperties:12".getBytes(); info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } info.setDataStructure(createDataStructure("DataStructure:13")); info.setTargetConsumerId(createConsumerId("TargetConsumerId:14")); info.setCompressed(false); info.setRedeliveryCounter(2); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:15"); } info.setBrokerPath(value); } info.setArrival(3); info.setUserID("UserID:16"); info.setRecievedByDFBridge(true); info.setDroppable(false); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("Cluster:17"); } info.setCluster(value); } info.setBrokerInTime(4); info.setBrokerOutTime(5); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Message * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class MessageTestSupport extends BaseCommandTestSupport { @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTransactionId(createTransactionId("TransactionId:3")); info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4")); info.setMessageId(createMessageId("MessageId:5")); info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6")); info.setGroupID("GroupID:7"); info.setGroupSequence(1); info.setCorrelationId("CorrelationId:8"); info.setPersistent(true); info.setExpiration(1); info.setPriority((byte) 1); info.setReplyTo(createActiveMQDestination("ReplyTo:9")); info.setTimestamp(2); info.setType("Type:10"); { byte data[] = "Content:11".getBytes(); info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } { byte data[] = "MarshalledProperties:12".getBytes(); info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } info.setDataStructure(createDataStructure("DataStructure:13")); info.setTargetConsumerId(createConsumerId("TargetConsumerId:14")); info.setCompressed(false); info.setRedeliveryCounter(2); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:15"); } info.setBrokerPath(value); } info.setArrival(3); info.setUserID("UserID:16"); info.setRecievedByDFBridge(true); info.setDroppable(false); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("Cluster:17"); } info.setCluster(value); } info.setBrokerInTime(4); info.setBrokerOutTime(5); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java index 6bd0ed4974..c67fe1df6b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/NetworkBridgeFilterTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for NetworkBridgeFilter * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; info.setNetworkTTL(1); info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for NetworkBridgeFilter * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; info.setNetworkTTL(1); info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java index 33915cfad0..b6529a66ad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/PartialCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for PartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; info.setCommandId(1); info.setData("Data:1".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for PartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; info.setCommandId(1); info.setData("Data:1".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java index 92c533b45c..47ff8d8bda 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; info.setProducerId(createProducerId("ProducerId:1")); info.setSize(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; info.setProducerId(createProducerId("ProducerId:1")); info.setSize(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java index aaffa7aa4e..1926ebbce9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); info.setSessionId(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); info.setSessionId(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java index 8f3854bbbd..140cc56cee 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ProducerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } info.setDispatchAsync(true); info.setWindowSize(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } info.setDispatchAsync(true); info.setWindowSize(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java index d1df3041b6..f76aed23a7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; info.setObjectId(createDataStructure("ObjectId:1")); info.setLastDeliveredSequenceId(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; info.setObjectId(createDataStructure("ObjectId:1")); info.setLastDeliveredSequenceId(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java index 84067d6e7e..ac56900272 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/RemoveSubscriptionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveSubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setSubcriptionName("SubcriptionName:2"); info.setClientId("ClientId:3"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveSubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setSubcriptionName("SubcriptionName:2"); info.setClientId("ClientId:3"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java index 0bc0a40c88..ab5f536866 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ReplayCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ReplayCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; info.setFirstNakNumber(1); info.setLastNakNumber(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ReplayCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; info.setFirstNakNumber(1); info.setLastNakNumber(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java index a592bf2cba..6fb0a1c465 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Response * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; info.setCorrelationId(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Response * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; info.setCorrelationId(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java index 76ffec0848..de21d3feda 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java index d803c0442c..b2d8f59e79 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SessionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; info.setSessionId(createSessionId("SessionId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; info.setSessionId(createSessionId("SessionId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java index 02478a4738..b4699f7b54 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/ShutdownInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ShutdownInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ShutdownInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java index a025cf96d6..23b5232257 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/SubscriptionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; info.setClientId("ClientId:1"); info.setDestination(createActiveMQDestination("Destination:2")); info.setSelector("Selector:3"); info.setSubcriptionName("SubcriptionName:4"); info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; info.setClientId("ClientId:1"); info.setDestination(createActiveMQDestination("Destination:2")); info.setSelector("Selector:3"); info.setSubcriptionName("SubcriptionName:4"); info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java index be6d188953..26eeb4a167 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionIdTestSupport.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java index 0ee6687551..c1b0a04f03 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/TransactionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setType((byte) 1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setType((byte) 1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java index 977e13d424..034e1ffae1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v7/XATransactionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v7; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BaseCommandTestSupport.java index 9c9f5d9f59..3999913562 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerIdTest.java index 27da9c656e..dc3631907c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; info.setValue("Value:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; info.setValue("Value:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerInfoTest.java index 962f2fb48b..3f1af52545 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/BrokerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; info.setBrokerId(createBrokerId("BrokerId:1")); info.setBrokerURL("BrokerURL:2"); { BrokerInfo value[] = new BrokerInfo[0]; for (int i = 0; i < 0; i++) { value[i] = createBrokerInfo("PeerBrokerInfos:3"); } info.setPeerBrokerInfos(value); } info.setBrokerName("BrokerName:4"); info.setSlaveBroker(true); info.setMasterBroker(false); info.setFaultTolerantConfiguration(true); info.setDuplexConnection(false); info.setNetworkConnection(true); info.setConnectionId(1); info.setBrokerUploadUrl("BrokerUploadUrl:5"); info.setNetworkProperties("NetworkProperties:6"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; info.setBrokerId(createBrokerId("BrokerId:1")); info.setBrokerURL("BrokerURL:2"); { BrokerInfo value[] = new BrokerInfo[0]; for (int i = 0; i < 0; i++) { value[i] = createBrokerInfo("PeerBrokerInfos:3"); } info.setPeerBrokerInfos(value); } info.setBrokerName("BrokerName:4"); info.setSlaveBroker(true); info.setMasterBroker(false); info.setFaultTolerantConfiguration(true); info.setDuplexConnection(false); info.setNetworkConnection(true); info.setConnectionId(1); info.setBrokerUploadUrl("BrokerUploadUrl:5"); info.setNetworkProperties("NetworkProperties:6"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionControlTest.java index 5800995394..3e15949619 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionControlTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; info.setClose(true); info.setExit(false); info.setFaultTolerant(true); info.setResume(false); info.setSuspend(true); info.setConnectedBrokers("ConnectedBrokers:1"); info.setReconnectTo("ReconnectTo:2"); info.setRebalanceConnection(false); info.setToken("Token:3".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; info.setClose(true); info.setExit(false); info.setFaultTolerant(true); info.setResume(false); info.setSuspend(true); info.setConnectedBrokers("ConnectedBrokers:1"); info.setReconnectTo("ReconnectTo:2"); info.setRebalanceConnection(false); info.setToken("Token:3".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionErrorTest.java index 4c12286cbf..d17f6818ef 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionErrorTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionError * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; info.setException(createThrowable("Exception:1")); info.setConnectionId(createConnectionId("ConnectionId:2")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionError * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; info.setException(createThrowable("Exception:1")); info.setConnectionId(createConnectionId("ConnectionId:2")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionIdTest.java index b2ae1977ac..e2b71cfdb0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; info.setValue("Value:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; info.setValue("Value:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionInfoTest.java index c0166e9d65..0e6eba3016 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConnectionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setClientId("ClientId:2"); info.setPassword("Password:3"); info.setUserName("UserName:4"); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setBrokerMasterConnector(true); info.setManageable(false); info.setClientMaster(true); info.setFaultTolerant(false); info.setFailoverReconnect(true); info.setClientIp("ClientIp:6"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setClientId("ClientId:2"); info.setPassword("Password:3"); info.setUserName("UserName:4"); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setBrokerMasterConnector(true); info.setManageable(false); info.setClientMaster(true); info.setFaultTolerant(false); info.setFailoverReconnect(true); info.setClientIp("ClientIp:6"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerControlTest.java index 19cb7f7b92..d18d22ebe0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerControlTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:2")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:2")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerIdTest.java index b0240021ac..270c9ce0b8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; info.setConnectionId("ConnectionId:1"); info.setSessionId(1); info.setValue(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; info.setConnectionId("ConnectionId:1"); info.setSessionId(1); info.setValue(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerInfoTest.java index 331da0a78d..926d22df49 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ConsumerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setBrowser(true); info.setDestination(createActiveMQDestination("Destination:2")); info.setPrefetchSize(1); info.setMaximumPendingMessageLimit(2); info.setDispatchAsync(false); info.setSelector("Selector:3"); info.setSubscriptionName("SubscriptionName:4"); info.setNoLocal(true); info.setExclusive(false); info.setRetroactive(true); info.setPriority((byte) 1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); info.setNetworkSubscription(false); info.setOptimizedAcknowledge(true); info.setNoRangeAcks(false); { ConsumerId value[] = new ConsumerId[2]; for (int i = 0; i < 2; i++) { value[i] = createConsumerId("NetworkConsumerPath:7"); } info.setNetworkConsumerPath(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setBrowser(true); info.setDestination(createActiveMQDestination("Destination:2")); info.setPrefetchSize(1); info.setMaximumPendingMessageLimit(2); info.setDispatchAsync(false); info.setSelector("Selector:3"); info.setSubscriptionName("SubscriptionName:4"); info.setNoLocal(true); info.setExclusive(false); info.setRetroactive(true); info.setPriority((byte) 1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); info.setNetworkSubscription(false); info.setOptimizedAcknowledge(true); info.setNoRangeAcks(false); { ConsumerId value[] = new ConsumerId[2]; for (int i = 0; i < 2; i++) { value[i] = createConsumerId("NetworkConsumerPath:7"); } info.setNetworkConsumerPath(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ControlCommandTest.java index 436e233c6d..6d0768418e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ControlCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ControlCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; info.setCommand("Command:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ControlCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; info.setCommand("Command:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataArrayResponseTest.java index e180b6308a..5c91e50411 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataArrayResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataArrayResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; { DataStructure value[] = new DataStructure[2]; for (int i = 0; i < 2; i++) { value[i] = createDataStructure("Data:1"); } info.setData(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataArrayResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; { DataStructure value[] = new DataStructure[2]; for (int i = 0; i < 2; i++) { value[i] = createDataStructure("Data:1"); } info.setData(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataResponseTest.java index 802f74a2fd..996b1bde69 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DataResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; info.setData(createDataStructure("Data:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; info.setData(createDataStructure("Data:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DestinationInfoTest.java index 6bd16c6f8a..b218e1c1ac 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DestinationInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DestinationInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setOperationType((byte) 1); info.setTimeout(1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DestinationInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setOperationType((byte) 1); info.setTimeout(1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DiscoveryEventTest.java index 9c6a1c88c4..45f42493e7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/DiscoveryEventTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DiscoveryEvent * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; info.setServiceName("ServiceName:1"); info.setBrokerName("BrokerName:2"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DiscoveryEvent * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; info.setServiceName("ServiceName:1"); info.setBrokerName("BrokerName:2"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ExceptionResponseTest.java index 6e82d556a4..43b5c770e3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ExceptionResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ExceptionResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; info.setException(createThrowable("Exception:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ExceptionResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; info.setException(createThrowable("Exception:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/FlushCommandTest.java index ff2ce6faa5..e13d189f4d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/FlushCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for FlushCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for FlushCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/IntegerResponseTest.java index 2e8ff61543..6a4b8e2e76 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/IntegerResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for IntegerResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; info.setResult(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for IntegerResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; info.setResult(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalQueueAckTest.java index 51d4cbf716..a93374c43a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalQueueAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalQueueAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageAck(createMessageAck("MessageAck:2")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalQueueAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageAck(createMessageAck("MessageAck:2")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTopicAckTest.java index fa8e6805f6..4f8c818c70 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTopicAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTopicAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageId(createMessageId("MessageId:2")); info.setMessageSequenceId(1); info.setSubscritionName("SubscritionName:3"); info.setClientId("ClientId:4"); info.setTransactionId(createTransactionId("TransactionId:5")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTopicAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageId(createMessageId("MessageId:2")); info.setMessageSequenceId(1); info.setSubscritionName("SubscritionName:3"); info.setClientId("ClientId:4"); info.setTransactionId(createTransactionId("TransactionId:5")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTraceTest.java index 3f1edb0761..8eb0a2db59 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTraceTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTrace * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; info.setMessage("Message:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTrace * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; info.setMessage("Message:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTransactionTest.java index 6c19c3ac07..496154a754 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/JournalTransactionTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTransaction * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; info.setTransactionId(createTransactionId("TransactionId:1")); info.setType((byte) 1); info.setWasPrepared(true); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTransaction * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; info.setTransactionId(createTransactionId("TransactionId:1")); info.setType((byte) 1); info.setWasPrepared(true); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/KeepAliveInfoTest.java index 95237c892d..7d012cb906 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/KeepAliveInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for KeepAliveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for KeepAliveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LastPartialCommandTest.java index 28de402e8f..5dd36d86e6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LastPartialCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LastPartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LastPartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LocalTransactionIdTest.java index 21ab9c6819..4e99e0919c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/LocalTransactionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LocalTransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; info.setValue(1); info.setConnectionId(createConnectionId("ConnectionId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LocalTransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; info.setValue(1); info.setConnectionId(createConnectionId("ConnectionId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageAckTest.java index 8f109c721f..5d87613c84 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setConsumerId(createConsumerId("ConsumerId:3")); info.setAckType((byte) 1); info.setFirstMessageId(createMessageId("FirstMessageId:4")); info.setLastMessageId(createMessageId("LastMessageId:5")); info.setMessageCount(1); info.setPoisonCause(createThrowable("PoisonCause:6")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setConsumerId(createConsumerId("ConsumerId:3")); info.setAckType((byte) 1); info.setFirstMessageId(createMessageId("FirstMessageId:4")); info.setLastMessageId(createMessageId("LastMessageId:5")); info.setMessageCount(1); info.setPoisonCause(createThrowable("PoisonCause:6")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchNotificationTest.java index 34b5e4be6c..2f173c348c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchNotificationTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatchNotification * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setDeliverySequenceId(1); info.setMessageId(createMessageId("MessageId:3")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatchNotification * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setDeliverySequenceId(1); info.setMessageId(createMessageId("MessageId:3")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchTest.java index b004b2bac5..a7f1b23522 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageDispatchTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatch * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setMessage(createMessage("Message:3")); info.setRedeliveryCounter(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatch * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setMessage(createMessage("Message:3")); info.setRedeliveryCounter(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageIdTest.java index f3dad49429..51084a63cc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; info.setProducerId(createProducerId("ProducerId:1")); info.setProducerSequenceId(1); info.setBrokerSequenceId(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; info.setProducerId(createProducerId("ProducerId:1")); info.setProducerSequenceId(1); info.setBrokerSequenceId(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessagePullTest.java index ec85fffb8e..9d1881f970 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessagePullTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessagePull * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTimeout(1); info.setCorrelationId("CorrelationId:3"); info.setMessageId(createMessageId("MessageId:4")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessagePull * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTimeout(1); info.setCorrelationId("CorrelationId:3"); info.setMessageId(createMessageId("MessageId:4")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageTestSupport.java index 94251d6677..cbf9581102 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/MessageTestSupport.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Message * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class MessageTestSupport extends BaseCommandTestSupport { protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTransactionId(createTransactionId("TransactionId:3")); info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4")); info.setMessageId(createMessageId("MessageId:5")); info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6")); info.setGroupID("GroupID:7"); info.setGroupSequence(1); info.setCorrelationId("CorrelationId:8"); info.setPersistent(true); info.setExpiration(1); info.setPriority((byte) 1); info.setReplyTo(createActiveMQDestination("ReplyTo:9")); info.setTimestamp(2); info.setType("Type:10"); { byte data[] = "Content:11".getBytes(); info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } { byte data[] = "MarshalledProperties:12".getBytes(); info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } info.setDataStructure(createDataStructure("DataStructure:13")); info.setTargetConsumerId(createConsumerId("TargetConsumerId:14")); info.setCompressed(false); info.setRedeliveryCounter(2); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:15"); } info.setBrokerPath(value); } info.setArrival(3); info.setUserID("UserID:16"); info.setRecievedByDFBridge(true); info.setDroppable(false); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("Cluster:17"); } info.setCluster(value); } info.setBrokerInTime(4); info.setBrokerOutTime(5); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Message * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class MessageTestSupport extends BaseCommandTestSupport { @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTransactionId(createTransactionId("TransactionId:3")); info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4")); info.setMessageId(createMessageId("MessageId:5")); info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6")); info.setGroupID("GroupID:7"); info.setGroupSequence(1); info.setCorrelationId("CorrelationId:8"); info.setPersistent(true); info.setExpiration(1); info.setPriority((byte) 1); info.setReplyTo(createActiveMQDestination("ReplyTo:9")); info.setTimestamp(2); info.setType("Type:10"); { byte data[] = "Content:11".getBytes(); info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } { byte data[] = "MarshalledProperties:12".getBytes(); info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } info.setDataStructure(createDataStructure("DataStructure:13")); info.setTargetConsumerId(createConsumerId("TargetConsumerId:14")); info.setCompressed(false); info.setRedeliveryCounter(2); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:15"); } info.setBrokerPath(value); } info.setArrival(3); info.setUserID("UserID:16"); info.setRecievedByDFBridge(true); info.setDroppable(false); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("Cluster:17"); } info.setCluster(value); } info.setBrokerInTime(4); info.setBrokerOutTime(5); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/NetworkBridgeFilterTest.java index b259d868ba..0a45142927 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/NetworkBridgeFilterTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for NetworkBridgeFilter * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; info.setNetworkTTL(1); info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for NetworkBridgeFilter * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; info.setNetworkTTL(1); info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/PartialCommandTest.java index bab437c67e..8c11858366 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/PartialCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for PartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; info.setCommandId(1); info.setData("Data:1".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for PartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; info.setCommandId(1); info.setData("Data:1".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerAckTest.java index 12139c840b..76ae6969e5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; info.setProducerId(createProducerId("ProducerId:1")); info.setSize(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; info.setProducerId(createProducerId("ProducerId:1")); info.setSize(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerIdTest.java index 6fca0d68af..ab7d376b05 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); info.setSessionId(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); info.setSessionId(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerInfoTest.java index 305baee899..d20153687f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ProducerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } info.setDispatchAsync(true); info.setWindowSize(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } info.setDispatchAsync(true); info.setWindowSize(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveInfoTest.java index 7bebb00aee..fd85a69e26 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; info.setObjectId(createDataStructure("ObjectId:1")); info.setLastDeliveredSequenceId(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; info.setObjectId(createDataStructure("ObjectId:1")); info.setLastDeliveredSequenceId(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveSubscriptionInfoTest.java index 4a68a7d529..40c206e7f8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/RemoveSubscriptionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveSubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setSubcriptionName("SubcriptionName:2"); info.setClientId("ClientId:3"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveSubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setSubcriptionName("SubcriptionName:2"); info.setClientId("ClientId:3"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ReplayCommandTest.java index 4a4db661fc..80e731cfe4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ReplayCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ReplayCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; info.setFirstNakNumber(1); info.setLastNakNumber(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ReplayCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; info.setFirstNakNumber(1); info.setLastNakNumber(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ResponseTest.java index c36f7f1c0e..cc71e31105 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Response * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; info.setCorrelationId(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Response * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; info.setCorrelationId(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionIdTest.java index 74407d76d3..cb89b33eb3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionInfoTest.java index 937c7c18ec..07523531e8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SessionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; info.setSessionId(createSessionId("SessionId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; info.setSessionId(createSessionId("SessionId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ShutdownInfoTest.java index bb2b21106f..6aae928092 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/ShutdownInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ShutdownInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ShutdownInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SubscriptionInfoTest.java index f7559d913f..01a53864f4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/SubscriptionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; info.setClientId("ClientId:1"); info.setDestination(createActiveMQDestination("Destination:2")); info.setSelector("Selector:3"); info.setSubcriptionName("SubcriptionName:4"); info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; info.setClientId("ClientId:1"); info.setDestination(createActiveMQDestination("Destination:2")); info.setSelector("Selector:3"); info.setSubcriptionName("SubcriptionName:4"); info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionIdTestSupport.java index ab29ed4bc4..7a696fc09a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionIdTestSupport.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionInfoTest.java index 2d20d9b2e1..089629b860 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/TransactionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setType((byte) 1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setType((byte) 1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/XATransactionIdTest.java index aea3bd5af1..cf408695db 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v8/XATransactionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v8; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BaseCommandTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BaseCommandTestSupport.java index afeea6b402..88a75f2077 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BaseCommandTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BaseCommandTestSupport.java @@ -27,6 +27,7 @@ import org.apache.activemq.openwire.DataFileGeneratorTestSupport; */ public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BaseCommand info = (BaseCommand) object; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerIdTest.java index 15e0f1f91a..7ca61a4dd1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; info.setValue("Value:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerIdTest extends DataFileGeneratorTestSupport { public static BrokerIdTest SINGLETON = new BrokerIdTest(); @Override public Object createObject() throws Exception { BrokerId info = new BrokerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerId info = (BrokerId) object; info.setValue("Value:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerInfoTest.java index 7f5afbee52..674e184fcc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/BrokerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; info.setBrokerId(createBrokerId("BrokerId:1")); info.setBrokerURL("BrokerURL:2"); { BrokerInfo value[] = new BrokerInfo[0]; for (int i = 0; i < 0; i++) { value[i] = createBrokerInfo("PeerBrokerInfos:3"); } info.setPeerBrokerInfos(value); } info.setBrokerName("BrokerName:4"); info.setSlaveBroker(true); info.setMasterBroker(false); info.setFaultTolerantConfiguration(true); info.setDuplexConnection(false); info.setNetworkConnection(true); info.setConnectionId(1); info.setBrokerUploadUrl("BrokerUploadUrl:5"); info.setNetworkProperties("NetworkProperties:6"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for BrokerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class BrokerInfoTest extends BaseCommandTestSupport { public static BrokerInfoTest SINGLETON = new BrokerInfoTest(); @Override public Object createObject() throws Exception { BrokerInfo info = new BrokerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); BrokerInfo info = (BrokerInfo) object; info.setBrokerId(createBrokerId("BrokerId:1")); info.setBrokerURL("BrokerURL:2"); { BrokerInfo value[] = new BrokerInfo[0]; for (int i = 0; i < 0; i++) { value[i] = createBrokerInfo("PeerBrokerInfos:3"); } info.setPeerBrokerInfos(value); } info.setBrokerName("BrokerName:4"); info.setSlaveBroker(true); info.setMasterBroker(false); info.setFaultTolerantConfiguration(true); info.setDuplexConnection(false); info.setNetworkConnection(true); info.setConnectionId(1); info.setBrokerUploadUrl("BrokerUploadUrl:5"); info.setNetworkProperties("NetworkProperties:6"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionControlTest.java index 3286b2f33a..6940077bfa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionControlTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; info.setClose(true); info.setExit(false); info.setFaultTolerant(true); info.setResume(false); info.setSuspend(true); info.setConnectedBrokers("ConnectedBrokers:1"); info.setReconnectTo("ReconnectTo:2"); info.setRebalanceConnection(false); info.setToken("Token:3".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionControlTest extends BaseCommandTestSupport { public static ConnectionControlTest SINGLETON = new ConnectionControlTest(); @Override public Object createObject() throws Exception { ConnectionControl info = new ConnectionControl(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionControl info = (ConnectionControl) object; info.setClose(true); info.setExit(false); info.setFaultTolerant(true); info.setResume(false); info.setSuspend(true); info.setConnectedBrokers("ConnectedBrokers:1"); info.setReconnectTo("ReconnectTo:2"); info.setRebalanceConnection(false); info.setToken("Token:3".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionErrorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionErrorTest.java index 72a52d031b..27fca5538d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionErrorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionErrorTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionError * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; info.setException(createThrowable("Exception:1")); info.setConnectionId(createConnectionId("ConnectionId:2")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionError * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionErrorTest extends BaseCommandTestSupport { public static ConnectionErrorTest SINGLETON = new ConnectionErrorTest(); @Override public Object createObject() throws Exception { ConnectionError info = new ConnectionError(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionError info = (ConnectionError) object; info.setException(createThrowable("Exception:1")); info.setConnectionId(createConnectionId("ConnectionId:2")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionIdTest.java index 8b98c25911..8634d425b4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; info.setValue("Value:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionIdTest extends DataFileGeneratorTestSupport { public static ConnectionIdTest SINGLETON = new ConnectionIdTest(); @Override public Object createObject() throws Exception { ConnectionId info = new ConnectionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionId info = (ConnectionId) object; info.setValue("Value:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionInfoTest.java index e43eee5dd3..900cdc0ba7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConnectionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setClientId("ClientId:2"); info.setPassword("Password:3"); info.setUserName("UserName:4"); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setBrokerMasterConnector(true); info.setManageable(false); info.setClientMaster(true); info.setFaultTolerant(false); info.setFailoverReconnect(true); info.setClientIp("ClientIp:6"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConnectionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConnectionInfoTest extends BaseCommandTestSupport { public static ConnectionInfoTest SINGLETON = new ConnectionInfoTest(); @Override public Object createObject() throws Exception { ConnectionInfo info = new ConnectionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConnectionInfo info = (ConnectionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setClientId("ClientId:2"); info.setPassword("Password:3"); info.setUserName("UserName:4"); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setBrokerMasterConnector(true); info.setManageable(false); info.setClientMaster(true); info.setFaultTolerant(false); info.setFailoverReconnect(true); info.setClientIp("ClientIp:6"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerControlTest.java index 11a4f5c575..5e7ec1f82a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerControlTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:2")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerControl * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerControlTest extends BaseCommandTestSupport { public static ConsumerControlTest SINGLETON = new ConsumerControlTest(); @Override public Object createObject() throws Exception { ConsumerControl info = new ConsumerControl(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerControl info = (ConsumerControl) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:2")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerIdTest.java index 7e6374477e..036a130712 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; info.setConnectionId("ConnectionId:1"); info.setSessionId(1); info.setValue(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerIdTest extends DataFileGeneratorTestSupport { public static ConsumerIdTest SINGLETON = new ConsumerIdTest(); @Override public Object createObject() throws Exception { ConsumerId info = new ConsumerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerId info = (ConsumerId) object; info.setConnectionId("ConnectionId:1"); info.setSessionId(1); info.setValue(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerInfoTest.java index 5ff9aaeff2..8917fa7958 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ConsumerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setBrowser(true); info.setDestination(createActiveMQDestination("Destination:2")); info.setPrefetchSize(1); info.setMaximumPendingMessageLimit(2); info.setDispatchAsync(false); info.setSelector("Selector:3"); info.setSubscriptionName("SubscriptionName:4"); info.setNoLocal(true); info.setExclusive(false); info.setRetroactive(true); info.setPriority((byte) 1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); info.setNetworkSubscription(false); info.setOptimizedAcknowledge(true); info.setNoRangeAcks(false); { ConsumerId value[] = new ConsumerId[2]; for (int i = 0; i < 2; i++) { value[i] = createConsumerId("NetworkConsumerPath:7"); } info.setNetworkConsumerPath(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ConsumerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ConsumerInfoTest extends BaseCommandTestSupport { public static ConsumerInfoTest SINGLETON = new ConsumerInfoTest(); @Override public Object createObject() throws Exception { ConsumerInfo info = new ConsumerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ConsumerInfo info = (ConsumerInfo) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setBrowser(true); info.setDestination(createActiveMQDestination("Destination:2")); info.setPrefetchSize(1); info.setMaximumPendingMessageLimit(2); info.setDispatchAsync(false); info.setSelector("Selector:3"); info.setSubscriptionName("SubscriptionName:4"); info.setNoLocal(true); info.setExclusive(false); info.setRetroactive(true); info.setPriority((byte) 1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:5"); } info.setBrokerPath(value); } info.setAdditionalPredicate(createBooleanExpression("AdditionalPredicate:6")); info.setNetworkSubscription(false); info.setOptimizedAcknowledge(true); info.setNoRangeAcks(false); { ConsumerId value[] = new ConsumerId[2]; for (int i = 0; i < 2; i++) { value[i] = createConsumerId("NetworkConsumerPath:7"); } info.setNetworkConsumerPath(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ControlCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ControlCommandTest.java index 78506823f7..44aa7b1a80 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ControlCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ControlCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ControlCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; info.setCommand("Command:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ControlCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ControlCommandTest extends BaseCommandTestSupport { public static ControlCommandTest SINGLETON = new ControlCommandTest(); @Override public Object createObject() throws Exception { ControlCommand info = new ControlCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ControlCommand info = (ControlCommand) object; info.setCommand("Command:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataArrayResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataArrayResponseTest.java index 53f47cb7d2..a125500e51 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataArrayResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataArrayResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataArrayResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; { DataStructure value[] = new DataStructure[2]; for (int i = 0; i < 2; i++) { value[i] = createDataStructure("Data:1"); } info.setData(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataArrayResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataArrayResponseTest extends ResponseTest { public static DataArrayResponseTest SINGLETON = new DataArrayResponseTest(); @Override public Object createObject() throws Exception { DataArrayResponse info = new DataArrayResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataArrayResponse info = (DataArrayResponse) object; { DataStructure value[] = new DataStructure[2]; for (int i = 0; i < 2; i++) { value[i] = createDataStructure("Data:1"); } info.setData(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataResponseTest.java index 3f92a4acf4..c2599932de 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DataResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; info.setData(createDataStructure("Data:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DataResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DataResponseTest extends ResponseTest { public static DataResponseTest SINGLETON = new DataResponseTest(); @Override public Object createObject() throws Exception { DataResponse info = new DataResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DataResponse info = (DataResponse) object; info.setData(createDataStructure("Data:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DestinationInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DestinationInfoTest.java index 9907a8774f..0cb46d393e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DestinationInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DestinationInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DestinationInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setOperationType((byte) 1); info.setTimeout(1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DestinationInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DestinationInfoTest extends BaseCommandTestSupport { public static DestinationInfoTest SINGLETON = new DestinationInfoTest(); @Override public Object createObject() throws Exception { DestinationInfo info = new DestinationInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DestinationInfo info = (DestinationInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setOperationType((byte) 1); info.setTimeout(1); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DiscoveryEventTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DiscoveryEventTest.java index cb185406d1..a39d8f54b9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DiscoveryEventTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/DiscoveryEventTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DiscoveryEvent * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; info.setServiceName("ServiceName:1"); info.setBrokerName("BrokerName:2"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for DiscoveryEvent * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class DiscoveryEventTest extends DataFileGeneratorTestSupport { public static DiscoveryEventTest SINGLETON = new DiscoveryEventTest(); @Override public Object createObject() throws Exception { DiscoveryEvent info = new DiscoveryEvent(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); DiscoveryEvent info = (DiscoveryEvent) object; info.setServiceName("ServiceName:1"); info.setBrokerName("BrokerName:2"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ExceptionResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ExceptionResponseTest.java index f0922da4d8..e673217b0b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ExceptionResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ExceptionResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ExceptionResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; info.setException(createThrowable("Exception:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ExceptionResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ExceptionResponseTest extends ResponseTest { public static ExceptionResponseTest SINGLETON = new ExceptionResponseTest(); @Override public Object createObject() throws Exception { ExceptionResponse info = new ExceptionResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ExceptionResponse info = (ExceptionResponse) object; info.setException(createThrowable("Exception:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/FlushCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/FlushCommandTest.java index 361a161afb..0836727376 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/FlushCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/FlushCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for FlushCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for FlushCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class FlushCommandTest extends BaseCommandTestSupport { public static FlushCommandTest SINGLETON = new FlushCommandTest(); @Override public Object createObject() throws Exception { FlushCommand info = new FlushCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); FlushCommand info = (FlushCommand) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/IntegerResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/IntegerResponseTest.java index 45a29b002e..3d4f749314 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/IntegerResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/IntegerResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for IntegerResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; info.setResult(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for IntegerResponse * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class IntegerResponseTest extends ResponseTest { public static IntegerResponseTest SINGLETON = new IntegerResponseTest(); @Override public Object createObject() throws Exception { IntegerResponse info = new IntegerResponse(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); IntegerResponse info = (IntegerResponse) object; info.setResult(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalQueueAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalQueueAckTest.java index e97a586271..bc9dbaa2f2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalQueueAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalQueueAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalQueueAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageAck(createMessageAck("MessageAck:2")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalQueueAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalQueueAckTest extends DataFileGeneratorTestSupport { public static JournalQueueAckTest SINGLETON = new JournalQueueAckTest(); @Override public Object createObject() throws Exception { JournalQueueAck info = new JournalQueueAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalQueueAck info = (JournalQueueAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageAck(createMessageAck("MessageAck:2")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTopicAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTopicAckTest.java index 357750a2a4..0afd5d7fb3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTopicAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTopicAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTopicAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageId(createMessageId("MessageId:2")); info.setMessageSequenceId(1); info.setSubscritionName("SubscritionName:3"); info.setClientId("ClientId:4"); info.setTransactionId(createTransactionId("TransactionId:5")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTopicAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTopicAckTest extends DataFileGeneratorTestSupport { public static JournalTopicAckTest SINGLETON = new JournalTopicAckTest(); @Override public Object createObject() throws Exception { JournalTopicAck info = new JournalTopicAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTopicAck info = (JournalTopicAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setMessageId(createMessageId("MessageId:2")); info.setMessageSequenceId(1); info.setSubscritionName("SubscritionName:3"); info.setClientId("ClientId:4"); info.setTransactionId(createTransactionId("TransactionId:5")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTraceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTraceTest.java index 6bfaf72ae8..738f1f3af9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTraceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTraceTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTrace * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; info.setMessage("Message:1"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTrace * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTraceTest extends DataFileGeneratorTestSupport { public static JournalTraceTest SINGLETON = new JournalTraceTest(); @Override public Object createObject() throws Exception { JournalTrace info = new JournalTrace(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTrace info = (JournalTrace) object; info.setMessage("Message:1"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTransactionTest.java index 6acce92acb..e5fa414775 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/JournalTransactionTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTransaction * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; info.setTransactionId(createTransactionId("TransactionId:1")); info.setType((byte) 1); info.setWasPrepared(true); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for JournalTransaction * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class JournalTransactionTest extends DataFileGeneratorTestSupport { public static JournalTransactionTest SINGLETON = new JournalTransactionTest(); @Override public Object createObject() throws Exception { JournalTransaction info = new JournalTransaction(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); JournalTransaction info = (JournalTransaction) object; info.setTransactionId(createTransactionId("TransactionId:1")); info.setType((byte) 1); info.setWasPrepared(true); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/KeepAliveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/KeepAliveInfoTest.java index a44533c5fc..23ad49f5c5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/KeepAliveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/KeepAliveInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for KeepAliveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for KeepAliveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class KeepAliveInfoTest extends BaseCommandTestSupport { public static KeepAliveInfoTest SINGLETON = new KeepAliveInfoTest(); @Override public Object createObject() throws Exception { KeepAliveInfo info = new KeepAliveInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); KeepAliveInfo info = (KeepAliveInfo) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LastPartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LastPartialCommandTest.java index 69822e9f0c..a5cead5128 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LastPartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LastPartialCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LastPartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LastPartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LastPartialCommandTest extends PartialCommandTest { public static LastPartialCommandTest SINGLETON = new LastPartialCommandTest(); @Override public Object createObject() throws Exception { LastPartialCommand info = new LastPartialCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LastPartialCommand info = (LastPartialCommand) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LocalTransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LocalTransactionIdTest.java index 8908037e85..203e4ee054 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LocalTransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/LocalTransactionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LocalTransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; info.setValue(1); info.setConnectionId(createConnectionId("ConnectionId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for LocalTransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class LocalTransactionIdTest extends TransactionIdTestSupport { public static LocalTransactionIdTest SINGLETON = new LocalTransactionIdTest(); @Override public Object createObject() throws Exception { LocalTransactionId info = new LocalTransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); LocalTransactionId info = (LocalTransactionId) object; info.setValue(1); info.setConnectionId(createConnectionId("ConnectionId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageAckTest.java index c53ff2a923..c0a3a1959e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setConsumerId(createConsumerId("ConsumerId:3")); info.setAckType((byte) 1); info.setFirstMessageId(createMessageId("FirstMessageId:4")); info.setLastMessageId(createMessageId("LastMessageId:5")); info.setMessageCount(1); info.setPoisonCause(createThrowable("PoisonCause:6")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageAckTest extends BaseCommandTestSupport { public static MessageAckTest SINGLETON = new MessageAckTest(); @Override public Object createObject() throws Exception { MessageAck info = new MessageAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageAck info = (MessageAck) object; info.setDestination(createActiveMQDestination("Destination:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setConsumerId(createConsumerId("ConsumerId:3")); info.setAckType((byte) 1); info.setFirstMessageId(createMessageId("FirstMessageId:4")); info.setLastMessageId(createMessageId("LastMessageId:5")); info.setMessageCount(1); info.setPoisonCause(createThrowable("PoisonCause:6")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchNotificationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchNotificationTest.java index 505bc38b7f..b2a4211a17 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchNotificationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchNotificationTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatchNotification * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setDeliverySequenceId(1); info.setMessageId(createMessageId("MessageId:3")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatchNotification * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchNotificationTest extends BaseCommandTestSupport { public static MessageDispatchNotificationTest SINGLETON = new MessageDispatchNotificationTest(); @Override public Object createObject() throws Exception { MessageDispatchNotification info = new MessageDispatchNotification(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatchNotification info = (MessageDispatchNotification) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setDeliverySequenceId(1); info.setMessageId(createMessageId("MessageId:3")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchTest.java index 5de7938356..1c7e59cd8f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageDispatchTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatch * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setMessage(createMessage("Message:3")); info.setRedeliveryCounter(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageDispatch * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageDispatchTest extends BaseCommandTestSupport { public static MessageDispatchTest SINGLETON = new MessageDispatchTest(); @Override public Object createObject() throws Exception { MessageDispatch info = new MessageDispatch(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageDispatch info = (MessageDispatch) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setMessage(createMessage("Message:3")); info.setRedeliveryCounter(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageIdTest.java index 346bb1e23d..3e56cadbba 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; info.setProducerId(createProducerId("ProducerId:1")); info.setProducerSequenceId(1); info.setBrokerSequenceId(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessageId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessageIdTest extends DataFileGeneratorTestSupport { public static MessageIdTest SINGLETON = new MessageIdTest(); @Override public Object createObject() throws Exception { MessageId info = new MessageId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessageId info = (MessageId) object; info.setProducerId(createProducerId("ProducerId:1")); info.setProducerSequenceId(1); info.setBrokerSequenceId(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessagePullTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessagePullTest.java index f48b7aa001..4f084292ec 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessagePullTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessagePullTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessagePull * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTimeout(1); info.setCorrelationId("CorrelationId:3"); info.setMessageId(createMessageId("MessageId:4")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for MessagePull * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class MessagePullTest extends BaseCommandTestSupport { public static MessagePullTest SINGLETON = new MessagePullTest(); @Override public Object createObject() throws Exception { MessagePull info = new MessagePull(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); MessagePull info = (MessagePull) object; info.setConsumerId(createConsumerId("ConsumerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTimeout(1); info.setCorrelationId("CorrelationId:3"); info.setMessageId(createMessageId("MessageId:4")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageTestSupport.java index 0965fa8f52..0c4d02735a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/MessageTestSupport.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Message * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class MessageTestSupport extends BaseCommandTestSupport { protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTransactionId(createTransactionId("TransactionId:3")); info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4")); info.setMessageId(createMessageId("MessageId:5")); info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6")); info.setGroupID("GroupID:7"); info.setGroupSequence(1); info.setCorrelationId("CorrelationId:8"); info.setPersistent(true); info.setExpiration(1); info.setPriority((byte) 1); info.setReplyTo(createActiveMQDestination("ReplyTo:9")); info.setTimestamp(2); info.setType("Type:10"); { byte data[] = "Content:11".getBytes(); info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } { byte data[] = "MarshalledProperties:12".getBytes(); info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } info.setDataStructure(createDataStructure("DataStructure:13")); info.setTargetConsumerId(createConsumerId("TargetConsumerId:14")); info.setCompressed(false); info.setRedeliveryCounter(2); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:15"); } info.setBrokerPath(value); } info.setArrival(3); info.setUserID("UserID:16"); info.setRecievedByDFBridge(true); info.setDroppable(false); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("Cluster:17"); } info.setCluster(value); } info.setBrokerInTime(4); info.setBrokerOutTime(5); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Message * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class MessageTestSupport extends BaseCommandTestSupport { @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Message info = (Message) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); info.setTransactionId(createTransactionId("TransactionId:3")); info.setOriginalDestination(createActiveMQDestination("OriginalDestination:4")); info.setMessageId(createMessageId("MessageId:5")); info.setOriginalTransactionId(createTransactionId("OriginalTransactionId:6")); info.setGroupID("GroupID:7"); info.setGroupSequence(1); info.setCorrelationId("CorrelationId:8"); info.setPersistent(true); info.setExpiration(1); info.setPriority((byte) 1); info.setReplyTo(createActiveMQDestination("ReplyTo:9")); info.setTimestamp(2); info.setType("Type:10"); { byte data[] = "Content:11".getBytes(); info.setContent(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } { byte data[] = "MarshalledProperties:12".getBytes(); info.setMarshalledProperties(new org.apache.activemq.util.ByteSequence(data, 0, data.length)); } info.setDataStructure(createDataStructure("DataStructure:13")); info.setTargetConsumerId(createConsumerId("TargetConsumerId:14")); info.setCompressed(false); info.setRedeliveryCounter(2); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:15"); } info.setBrokerPath(value); } info.setArrival(3); info.setUserID("UserID:16"); info.setRecievedByDFBridge(true); info.setDroppable(false); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("Cluster:17"); } info.setCluster(value); } info.setBrokerInTime(4); info.setBrokerOutTime(5); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/NetworkBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/NetworkBridgeFilterTest.java index fca4b63102..8e4adbb021 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/NetworkBridgeFilterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/NetworkBridgeFilterTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for NetworkBridgeFilter * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; info.setNetworkTTL(1); info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for NetworkBridgeFilter * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class NetworkBridgeFilterTest extends DataFileGeneratorTestSupport { public static NetworkBridgeFilterTest SINGLETON = new NetworkBridgeFilterTest(); @Override public Object createObject() throws Exception { NetworkBridgeFilter info = new NetworkBridgeFilter(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); NetworkBridgeFilter info = (NetworkBridgeFilter) object; info.setNetworkTTL(1); info.setNetworkBrokerId(createBrokerId("NetworkBrokerId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/PartialCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/PartialCommandTest.java index 327fe9f71d..cb762ba44a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/PartialCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/PartialCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for PartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; info.setCommandId(1); info.setData("Data:1".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for PartialCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class PartialCommandTest extends DataFileGeneratorTestSupport { public static PartialCommandTest SINGLETON = new PartialCommandTest(); @Override public Object createObject() throws Exception { PartialCommand info = new PartialCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); PartialCommand info = (PartialCommand) object; info.setCommandId(1); info.setData("Data:1".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerAckTest.java index faa3bfe216..609d790ebc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerAckTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerAckTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; info.setProducerId(createProducerId("ProducerId:1")); info.setSize(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerAck * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerAckTest extends BaseCommandTestSupport { public static ProducerAckTest SINGLETON = new ProducerAckTest(); @Override public Object createObject() throws Exception { ProducerAck info = new ProducerAck(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerAck info = (ProducerAck) object; info.setProducerId(createProducerId("ProducerId:1")); info.setSize(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerIdTest.java index 07ce7e299f..7671d5b5a8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); info.setSessionId(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerIdTest extends DataFileGeneratorTestSupport { public static ProducerIdTest SINGLETON = new ProducerIdTest(); @Override public Object createObject() throws Exception { ProducerId info = new ProducerId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerId info = (ProducerId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); info.setSessionId(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerInfoTest.java index b73851ee56..241c1f9dc3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ProducerInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } info.setDispatchAsync(true); info.setWindowSize(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ProducerInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ProducerInfoTest extends BaseCommandTestSupport { public static ProducerInfoTest SINGLETON = new ProducerInfoTest(); @Override public Object createObject() throws Exception { ProducerInfo info = new ProducerInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ProducerInfo info = (ProducerInfo) object; info.setProducerId(createProducerId("ProducerId:1")); info.setDestination(createActiveMQDestination("Destination:2")); { BrokerId value[] = new BrokerId[2]; for (int i = 0; i < 2; i++) { value[i] = createBrokerId("BrokerPath:3"); } info.setBrokerPath(value); } info.setDispatchAsync(true); info.setWindowSize(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveInfoTest.java index 5add80f71e..e3c2a3efba 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; info.setObjectId(createDataStructure("ObjectId:1")); info.setLastDeliveredSequenceId(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveInfoTest extends BaseCommandTestSupport { public static RemoveInfoTest SINGLETON = new RemoveInfoTest(); @Override public Object createObject() throws Exception { RemoveInfo info = new RemoveInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveInfo info = (RemoveInfo) object; info.setObjectId(createDataStructure("ObjectId:1")); info.setLastDeliveredSequenceId(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveSubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveSubscriptionInfoTest.java index 77b6a00186..d0293df127 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveSubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/RemoveSubscriptionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveSubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setSubcriptionName("SubcriptionName:2"); info.setClientId("ClientId:3"); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for RemoveSubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class RemoveSubscriptionInfoTest extends BaseCommandTestSupport { public static RemoveSubscriptionInfoTest SINGLETON = new RemoveSubscriptionInfoTest(); @Override public Object createObject() throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setSubcriptionName("SubcriptionName:2"); info.setClientId("ClientId:3"); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ReplayCommandTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ReplayCommandTest.java index 63e358f3bf..d3b59255a8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ReplayCommandTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ReplayCommandTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ReplayCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; info.setFirstNakNumber(1); info.setLastNakNumber(2); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ReplayCommand * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ReplayCommandTest extends BaseCommandTestSupport { public static ReplayCommandTest SINGLETON = new ReplayCommandTest(); @Override public Object createObject() throws Exception { ReplayCommand info = new ReplayCommand(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ReplayCommand info = (ReplayCommand) object; info.setFirstNakNumber(1); info.setLastNakNumber(2); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ResponseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ResponseTest.java index 8c26e212e9..7ca15e8ef1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ResponseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ResponseTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Response * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; info.setCorrelationId(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for Response * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ResponseTest extends BaseCommandTestSupport { public static ResponseTest SINGLETON = new ResponseTest(); @Override public Object createObject() throws Exception { Response info = new Response(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); Response info = (Response) object; info.setCorrelationId(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionIdTest.java index 7ee95b755e..6365ea49f9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionIdTest extends DataFileGeneratorTestSupport { public static SessionIdTest SINGLETON = new SessionIdTest(); @Override public Object createObject() throws Exception { SessionId info = new SessionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionId info = (SessionId) object; info.setConnectionId("ConnectionId:1"); info.setValue(1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionInfoTest.java index c7d7e3725c..495a5167eb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SessionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; info.setSessionId(createSessionId("SessionId:1")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SessionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SessionInfoTest extends BaseCommandTestSupport { public static SessionInfoTest SINGLETON = new SessionInfoTest(); @Override public Object createObject() throws Exception { SessionInfo info = new SessionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SessionInfo info = (SessionInfo) object; info.setSessionId(createSessionId("SessionId:1")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ShutdownInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ShutdownInfoTest.java index 23a1a53470..6c0c9206be 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ShutdownInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/ShutdownInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ShutdownInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for ShutdownInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class ShutdownInfoTest extends BaseCommandTestSupport { public static ShutdownInfoTest SINGLETON = new ShutdownInfoTest(); @Override public Object createObject() throws Exception { ShutdownInfo info = new ShutdownInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); ShutdownInfo info = (ShutdownInfo) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SubscriptionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SubscriptionInfoTest.java index e0240af6bf..bd7e90ee8e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SubscriptionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/SubscriptionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; info.setClientId("ClientId:1"); info.setDestination(createActiveMQDestination("Destination:2")); info.setSelector("Selector:3"); info.setSubcriptionName("SubcriptionName:4"); info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5")); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for SubscriptionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class SubscriptionInfoTest extends DataFileGeneratorTestSupport { public static SubscriptionInfoTest SINGLETON = new SubscriptionInfoTest(); @Override public Object createObject() throws Exception { SubscriptionInfo info = new SubscriptionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); SubscriptionInfo info = (SubscriptionInfo) object; info.setClientId("ClientId:1"); info.setDestination(createActiveMQDestination("Destination:2")); info.setSelector("Selector:3"); info.setSubcriptionName("SubcriptionName:4"); info.setSubscribedDestination(createActiveMQDestination("SubscribedDestination:5")); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionIdTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionIdTestSupport.java index 806a1a8871..98f335e21b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionIdTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionIdTestSupport.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public abstract class TransactionIdTestSupport extends DataFileGeneratorTestSupport { @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionId info = (TransactionId) object; } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionInfoTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionInfoTest.java index af1e466eae..0d43b65e9f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionInfoTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/TransactionInfoTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setType((byte) 1); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for TransactionInfo * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class TransactionInfoTest extends BaseCommandTestSupport { public static TransactionInfoTest SINGLETON = new TransactionInfoTest(); @Override public Object createObject() throws Exception { TransactionInfo info = new TransactionInfo(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); TransactionInfo info = (TransactionInfo) object; info.setConnectionId(createConnectionId("ConnectionId:1")); info.setTransactionId(createTransactionId("TransactionId:2")); info.setType((byte) 1); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java index 2464b6be5d..fe1a4554ee 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/openwire/v9/XATransactionIdTest.java @@ -1 +1 @@ -/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file +/** * * 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. * The ASF licenses this file to You under the Apache License, Version 2.0 * (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 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.openwire.v9; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Test case for the OpenWire marshalling for XATransactionId * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. */ public class XATransactionIdTest extends TransactionIdTestSupport { public static XATransactionIdTest SINGLETON = new XATransactionIdTest(); @Override public Object createObject() throws Exception { XATransactionId info = new XATransactionId(); populateObject(info); return info; } @Override protected void populateObject(Object object) throws Exception { super.populateObject(object); XATransactionId info = (XATransactionId) object; info.setFormatId(1); info.setGlobalTransactionId("GlobalTransactionId:1".getBytes()); info.setBranchQualifier("BranchQualifier:2".getBytes()); } } \ No newline at end of file diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java index e049233c1c..efc5500288 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/KahaQueueTest.java @@ -28,6 +28,7 @@ public class KahaQueueTest extends SimpleQueueTest { final static String config = "org/apache/activemq/perf/kahadbBroker.xml"; + @Override protected BrokerService createBroker(String uri) throws Exception { Resource resource = new ClassPathResource(config); BrokerFactoryBean brokerFactory = new BrokerFactoryBean(resource); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java index 157859f339..4137cf96cc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/LevelDBStoreQueueTest.java @@ -26,6 +26,7 @@ import org.apache.activemq.leveldb.LevelDBStore; */ public class LevelDBStoreQueueTest extends SimpleQueueTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/amq"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java index c8e8c8ed64..edbe4ef931 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfConsumer.java @@ -81,6 +81,7 @@ public class PerfConsumer implements MessageListener { return rate; } + @Override public void onMessage(Message msg) { if (firstMessage) { firstMessage = false; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java index 2d9cedd11f..dee2f83792 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/PerfProducer.java @@ -101,6 +101,7 @@ public class PerfProducer implements Runnable { return running; } + @Override public void run() { try { while (isRunning()) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java index f8da821543..f870d20fdf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleDurableTopicNetworkTest.java @@ -23,6 +23,7 @@ import javax.jms.JMSException; public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest { + @Override protected void setUp() throws Exception { numberofProducers = 1; numberOfConsumers = 1; @@ -31,6 +32,7 @@ public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest { super.setUp(); } + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, @@ -40,6 +42,7 @@ public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest { return pp; } + @Override protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException { return new PerfConsumer(fac, dest, "subs:" + number); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java index e4ee0ed5f6..531a9388c3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNetworkTest.java @@ -39,6 +39,7 @@ public class SimpleNetworkTest extends SimpleTopicTest { protected ActiveMQConnectionFactory consumerFactory; protected ActiveMQConnectionFactory producerFactory; + @Override protected void setUp() throws Exception { if (consumerBroker == null) { consumerBroker = createConsumerBroker(consumerBindAddress); @@ -78,6 +79,7 @@ public class SimpleNetworkTest extends SimpleTopicTest { con.close(); } + @Override protected void tearDown() throws Exception { for (int i = 0; i < numberOfConsumers; i++) { consumers[i].shutDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java index aa956a30a5..a24044823f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentQueueNetworkTest.java @@ -32,11 +32,13 @@ import org.apache.activemq.broker.region.policy.PolicyMap; public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest { + @Override protected void setUp() throws Exception { numberOfDestinations = 20; super.setUp(); } + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, @@ -48,6 +50,7 @@ public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest { return pp; } + @Override protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException { PerfConsumer consumer = new PerfConsumer(fac, dest); boolean enableAudit = numberOfConsumers <= 1; @@ -56,15 +59,18 @@ public class SimpleNonPersistentQueueNetworkTest extends SimpleNetworkTest { return consumer; } + @Override public void testPerformance() throws JMSException, InterruptedException { //Thread.sleep(5000); super.testPerformance(); } + @Override protected Destination createDestination(Session s, String destinationName) throws JMSException { return s.createQueue(destinationName); } + @Override protected void configureBroker(BrokerService answer) throws Exception { answer.setPersistent(false); answer.setMonitorConnectionSplits(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java index 9c033fe83a..e1ac924a11 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SimpleNonPersistentTopicTest.java @@ -26,6 +26,7 @@ import javax.jms.JMSException; */ public class SimpleNonPersistentTopicTest extends SimpleTopicTest { + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java index ab82167359..24eaad24b7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumer.java @@ -39,6 +39,7 @@ public class SlowConsumer extends PerfConsumer { super(fac, dest, null); } + @Override public void onMessage(Message msg) { super.onMessage(msg); LOG.debug("GOT A MSG " + msg); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java index 645e8ceddb..8a4dd22e1b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/SlowConsumerTopicTest.java @@ -35,17 +35,20 @@ public class SlowConsumerTopicTest extends SimpleTopicTest { protected PerfConsumer[] slowConsumers; + @Override protected void setUp() throws Exception { playloadSize = 10 * 1024; super.setUp(); } + @Override protected PerfConsumer createConsumer(ConnectionFactory fac, Destination dest, int number) throws JMSException { PerfConsumer result = new SlowConsumer(fac, dest); return result; } + @Override protected PerfProducer createProducer(ConnectionFactory fac, Destination dest, int number, @@ -56,6 +59,7 @@ public class SlowConsumerTopicTest extends SimpleTopicTest { return result; } + @Override protected BrokerService createBroker(String url) throws Exception { Resource resource = new ClassPathResource("org/apache/activemq/perf/slowConsumerBroker.xml"); System.err.println("CREATE BROKER FROM " + resource); @@ -67,6 +71,7 @@ public class SlowConsumerTopicTest extends SimpleTopicTest { return broker; } + @Override protected ActiveMQConnectionFactory createConnectionFactory(String uri) throws Exception { ActiveMQConnectionFactory result = super.createConnectionFactory(uri); ActiveMQPrefetchPolicy policy = new ActiveMQPrefetchPolicy(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java index 98464ca214..c7d307bbab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/perf/TemporaryTopicMemoryAllocationTest.java @@ -29,6 +29,7 @@ public class TemporaryTopicMemoryAllocationTest extends MemoryAllocationTest { super(); } + @Override protected Destination getDestination(Session session) throws JMSException { return session.createTemporaryTopic(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java index dc0a3a62d0..6d229c36d1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/pool/JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.java @@ -32,15 +32,18 @@ public class JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest extends JmsTopi protected static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTwoConnectionsWithSenderUsingPoolTest.class); protected PooledConnectionFactory senderConnectionFactory = new PooledConnectionFactory("vm://localhost?broker.persistent=false"); + @Override protected Connection createSendConnection() throws Exception { return senderConnectionFactory.createConnection(); } + @Override protected void setUp() throws Exception { verbose = true; super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); senderConnectionFactory.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java index acb7ee4cc3..74c971a94d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java @@ -42,6 +42,7 @@ public class ProxyConnectorTest extends ProxyTestSupport { junit.textui.TestRunner.run(suite()); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java index 7f0af125a6..97c66b6e30 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/proxy/ProxyTestSupport.java @@ -42,6 +42,7 @@ public class ProxyTestSupport extends BrokerTestSupport { private ProxyConnector proxyConnector; private ProxyConnector remoteProxyConnector; + @Override protected BrokerService createBroker() throws Exception { BrokerService service = new BrokerService(); service.setBrokerName("broker1"); @@ -74,12 +75,14 @@ public class ProxyTestSupport extends BrokerTestSupport { return service; } + @Override protected void setUp() throws Exception { super.setUp(); remoteBroker = createRemoteBroker(); remoteBroker.start(); } + @Override protected void tearDown() throws Exception { for (Iterator iter = connections.iterator(); iter.hasNext(); ) { StubConnection connection = iter.next(); @@ -106,6 +109,7 @@ public class ProxyTestSupport extends BrokerTestSupport { return "tcp://localhost:6172"; } + @Override protected StubConnection createConnection() throws Exception { Transport transport = TransportFactory.connect(connector.getServer().getConnectURI()); StubConnection connection = new StubConnection(transport); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java index a3086a5c8f..353a140c98 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/AbstractCachedLDAPAuthorizationModuleTest.java @@ -30,6 +30,7 @@ public abstract class AbstractCachedLDAPAuthorizationModuleTest extends Abstract static final UserPrincipal JDOE = new UserPrincipal("jdoe"); + @Override @Test public void testQuery() throws Exception { map.query(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java index d3a46e8a92..1fc07234c2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyOpenLDAPTest.java @@ -57,11 +57,13 @@ public class CachedLDAPAuthorizationModuleLegacyOpenLDAPTest extends AbstractCac cleanAndLoad("dc=apache,dc=org", "org/apache/activemq/security/activemq-openldap-legacy.ldif", LDAP_HOST, LDAP_PORT, LDAP_USER, LDAP_PASS, map.open()); } + @Override @Test public void testRenameDestination() throws Exception { // Subtree rename not implemented by OpenLDAP. } + @Override protected SimpleCachedLDAPAuthorizationMap createMap() { SimpleCachedLDAPAuthorizationMap newMap = super.createMap(); newMap.setConnectionURL("ldap://" + LDAP_HOST + ":" + String.valueOf(LDAP_PORT)); @@ -75,18 +77,22 @@ public class CachedLDAPAuthorizationModuleLegacyOpenLDAPTest extends AbstractCac return newMap; } + @Override protected InputStream getAddLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-openldap-legacy-add.ldif"); } + @Override protected InputStream getRemoveLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-openldap-legacy-delete.ldif"); } + @Override protected String getQueueBaseDn() { return "ou=Queue,ou=Destination,ou=ActiveMQ,dc=activemq,dc=apache,dc=org"; } + @Override protected LdapConnection getLdapConnection() throws LdapException, IOException { LdapConnection connection = new LdapNetworkConnection(LDAP_HOST, LDAP_PORT); connection.bind(new Dn(LDAP_USER), LDAP_PASS); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java index cd2e8f6f6c..91dff53de6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleLegacyTest.java @@ -42,18 +42,22 @@ public class CachedLDAPAuthorizationModuleLegacyTest extends AbstractCachedLDAPA return map; } + @Override protected InputStream getAddLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-apacheds-legacy-add.ldif"); } + @Override protected InputStream getRemoveLdif() { return getClass().getClassLoader().getResourceAsStream("org/apache/activemq/security/activemq-apacheds-legacy-delete.ldif"); } + @Override protected String getQueueBaseDn() { return "ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"; } + @Override protected LdapConnection getLdapConnection() throws LdapException, IOException { LdapConnection connection = new LdapNetworkConnection("localhost", getLdapServer().getPort()); connection.bind(new Dn("uid=admin,ou=system"), "secret"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java index 2394d61ccd..c8190291db 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleOpenLDAPTest.java @@ -57,6 +57,7 @@ public class CachedLDAPAuthorizationModuleOpenLDAPTest extends AbstractCachedLDA cleanAndLoad("dc=apache,dc=org", "org/apache/activemq/security/activemq-openldap.ldif", LDAP_HOST, LDAP_PORT, LDAP_USER, LDAP_PASS, map.open()); } + @Override @Test public void testRenameDestination() throws Exception { // Subtree rename not implemented by OpenLDAP. diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java index f1e43b1d17..523f902f6f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/CachedLDAPAuthorizationModuleTest.java @@ -55,6 +55,7 @@ public class CachedLDAPAuthorizationModuleTest extends AbstractCachedLDAPAuthori return "cn=users,ou=Group,ou=ActiveMQ,ou=system"; } + @Override protected String getQueueBaseDn() { return "ou=Queue,ou=Destination,ou=ActiveMQ,ou=system"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java index 135f3df342..90fc4faeea 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/DoSTest.java @@ -55,6 +55,7 @@ public class DoSTest extends JmsTestSupport { Thread thread = new Thread() { Connection connection = null; + @Override public void run() { for (int i = 0; i < 1000 && !done.get(); i++) { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(); @@ -90,6 +91,7 @@ public class DoSTest extends JmsTestSupport { done.set(true); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/dos-broker.xml"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java index 67f428d7ec..dd2eec3d9f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/JaasNetworkTest.java @@ -36,6 +36,7 @@ public class JaasNetworkTest extends TestCase { BrokerService broker1; BrokerService broker2; + @Override public void setUp() throws Exception { System.setProperty("java.security.auth.login.config", "src/test/resources/login.config"); broker1 = BrokerFactory.createBroker(new URI("xbean:org/apache/activemq/security/broker1.xml")); @@ -45,6 +46,7 @@ public class JaasNetworkTest extends TestCase { Thread.sleep(2000); } + @Override protected void tearDown() throws Exception { super.tearDown(); broker1.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java index 6819323476..6afe0aa141 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SecurityTestSupport.java @@ -41,6 +41,7 @@ public class SecurityTestSupport extends JmsTestSupport { /** * Overrides to set the JMSXUserID flag to true. */ + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPopulateJMSXUserID(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java index 298598b4f1..cfbada4633 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthenticationPluginSeparatorTest.java @@ -41,6 +41,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestUserReceiveFails() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -50,6 +51,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestInvalidAuthentication() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -58,6 +60,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestUserReceiveSucceeds() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -67,6 +70,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link CombinationTestSupport} */ + @Override public void initCombosForTestGuestReceiveSucceeds() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); @@ -76,6 +80,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestGuestReceiveFails() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); @@ -85,6 +90,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestUserSendSucceeds() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -94,6 +100,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestUserSendFails() { addCombinationValues("userName", new Object[]{"user"}); addCombinationValues("password", new Object[]{"password"}); @@ -103,6 +110,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestGuestSendFails() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); @@ -112,6 +120,7 @@ public class SimpleAuthenticationPluginSeparatorTest extends SimpleAuthenticatio /** * @see {@link org.apache.activemq.CombinationTestSupport} */ + @Override public void initCombosForTestGuestSendSucceeds() { addCombinationValues("userName", new Object[]{"guest"}); addCombinationValues("password", new Object[]{"password"}); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java index d6ad38bfd2..5a7da39a26 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleAuthorizationMapTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.security; */ public class SimpleAuthorizationMapTest extends AuthorizationMapTest { + @Override protected AuthorizationMap createAuthorizationMap() { return SimpleSecurityBrokerSystemTest.createAuthorizationMap(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java index ae647fe0ee..7036dd0afe 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/SimpleSecurityBrokerSystemTest.java @@ -148,6 +148,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { public static class SimpleAuthenticationFactory implements BrokerPlugin { + @Override public Broker installPlugin(Broker broker) { HashMap u = new HashMap(); @@ -163,6 +164,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { return new SimpleAuthenticationBroker(broker, u, groups); } + @Override public String toString() { return "SimpleAuthenticationBroker"; } @@ -176,6 +178,7 @@ public class SimpleSecurityBrokerSystemTest extends SecurityTestSupport { addCombinationValues("authenticationPlugin", new Object[]{new SimpleAuthenticationFactory(), new JaasAuthenticationPlugin()}); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPopulateJMSXUserID(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java index 03f38d9108..bb56430e2d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDoNothingCallbackHandler.java @@ -25,6 +25,7 @@ import javax.security.auth.callback.UnsupportedCallbackException; public class StubDoNothingCallbackHandler implements CallbackHandler { + @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java index dbb788a03d..b91f019ee1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubDualJaasConfiguration.java @@ -30,6 +30,7 @@ public class StubDualJaasConfiguration extends Configuration { this.sslConfigEntry = sslConfigEntry; } + @Override public AppConfigurationEntry[] getAppConfigurationEntry(String name) { if ("activemq-domain".equals(name)) { return new AppConfigurationEntry[]{nonSslConfigEntry}; @@ -39,6 +40,7 @@ public class StubDualJaasConfiguration extends Configuration { } } + @Override public void refresh() { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java index fe5ce1abbb..a30216e394 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubJaasConfiguration.java @@ -28,10 +28,12 @@ public class StubJaasConfiguration extends Configuration { this.configEntry = configEntry; } + @Override public AppConfigurationEntry[] getAppConfigurationEntry(String name) { return new AppConfigurationEntry[]{configEntry}; } + @Override public void refresh() { } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java index 38a0f5a5bd..8bcead7cca 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/StubSecurityContext.java @@ -26,6 +26,7 @@ public class StubSecurityContext extends SecurityContext { super(""); } + @Override public Set getPrincipals() { return null; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java index d98e70cf0c..81c360dbf1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityTest.java @@ -41,6 +41,7 @@ public class XBeanSecurityTest extends SecurityTestSupport { junit.textui.TestRunner.run(suite()); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/jaas-broker.xml"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java index 7c3fef83e7..e7fe6640fb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestNoCredentialsOnlyTest.java @@ -70,6 +70,7 @@ public class XBeanSecurityWithGuestNoCredentialsOnlyTest extends JmsTestSupport assertEquals("guest", m.getStringProperty("JMSXUserID")); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/jaas-broker-guest-no-creds-only.xml"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java index 11a6f3494d..004a5d1b5b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/security/XBeanSecurityWithGuestTest.java @@ -67,6 +67,7 @@ public class XBeanSecurityWithGuestTest extends JmsTestSupport { assertEquals("guest", m.getStringProperty("JMSXUserID")); } + @Override protected BrokerService createBroker() throws Exception { return createBroker("org/apache/activemq/security/jaas-broker-guest.xml"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java index dc676ae588..c96515c0d4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringConsumer.java @@ -78,6 +78,7 @@ public class SpringConsumer extends ConsumerBean implements MessageListener { } } + @Override public void onMessage(Message message) { super.onMessage(message); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java index c791480502..7049c2358d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/SpringProducer.java @@ -38,6 +38,7 @@ public class SpringProducer { for (int i = 0; i < messageCount; i++) { final String text = "Text for message: " + i; template.send(destination, new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { LOG.info("Sending message: " + text); TextMessage message = session.createTextMessage(text); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java index 8c1f3865f3..da18bebe82 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/AutoStorePerDestinationTest.java @@ -24,6 +24,7 @@ import org.apache.activemq.store.kahadb.MultiKahaDBPersistenceAdapter; public class AutoStorePerDestinationTest extends StorePerDestinationTest { // use perDestinationFlag to get multiple stores from one match all adapter + @Override public void prepareBrokerWithMultiStore(boolean deleteAllMessages) throws Exception { MultiKahaDBPersistenceAdapter multiKahaDBPersistenceAdapter = new MultiKahaDBPersistenceAdapter(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java index 0b3f6746ef..f7ab98d5a9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/StoreOrderTest.java @@ -75,6 +75,7 @@ public abstract class StoreOrderTest { producer = session.createProducer(destination); } + @Override public void run() { try { if (!first) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java index e21b54517a..5066100ce3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCIOExceptionHandlerTest.java @@ -124,6 +124,7 @@ public class JDBCIOExceptionHandlerTest extends TestCase { final AtomicReference slave = new AtomicReference(); Thread slaveThread = new Thread() { + @Override public void run() { try { BrokerService broker = new BrokerService(); @@ -321,6 +322,7 @@ public class JDBCIOExceptionHandlerTest extends TestCase { } } + @Override public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException { return null; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java index b3fe798bc7..e41cf13f8b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNegativeQueueTest.java @@ -31,6 +31,7 @@ public class JDBCNegativeQueueTest extends NegativeQueueTest { EmbeddedDataSource dataSource; + @Override protected void configureBroker(BrokerService answer) throws Exception { super.configureBroker(answer); JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); @@ -41,6 +42,7 @@ public class JDBCNegativeQueueTest extends NegativeQueueTest { answer.setPersistenceAdapter(jdbc); } + @Override protected void tearDown() throws Exception { if (DEBUG) { printQuery("Select * from ACTIVEMQ_MSGS", System.out); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java index 71ffb1b9f8..8e0c387aa4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCNetworkBrokerDetachTest.java @@ -22,6 +22,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCNetworkBrokerDetachTest extends NetworkBrokerDetachTest { + @Override protected void configureBroker(BrokerService broker) throws Exception { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); EmbeddedDataSource dataSource = new EmbeddedDataSource(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java index b3e299114a..59c447b185 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapterTest.java @@ -26,6 +26,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCPersistenceAdapterTest extends PersistenceAdapterTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws IOException { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java index 785137feab..0c862374b7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCStoreBrokerTest.java @@ -24,6 +24,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; public class JDBCStoreBrokerTest extends BrokerTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java index 543d78e2c6..a8ced99d76 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/jdbc/JDBCTestMemory.java @@ -38,12 +38,14 @@ public class JDBCTestMemory extends TestCase { BrokerService broker; + @Override protected void setUp() throws Exception { broker = createBroker(); broker.start(); broker.waitUntilStarted(); } + @Override protected void tearDown() throws Exception { broker.stop(); } @@ -105,6 +107,7 @@ public class JDBCTestMemory extends TestCase { for (int i = 0; i < 10; i++) { new Thread("Producer " + i) { + @Override public void run() { try { MessageProducer producer = sess.createProducer(dest); @@ -125,6 +128,7 @@ public class JDBCTestMemory extends TestCase { new Thread("Consumer " + i) { + @Override public void run() { try { MessageConsumer consumer = sess.createConsumer(dest); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java index 9a3114ea3a..cddbd717f7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBPersistenceAdapterTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.PersistenceAdapterTestSupport; */ public class KahaDBPersistenceAdapterTest extends PersistenceAdapterTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws IOException { KahaDBStore kaha = new KahaDBStore(); kaha.setDirectory(new File("target/activemq-data/kahadb")); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java index 4409d69e5e..b8fef9069c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreBrokerTest.java @@ -29,11 +29,13 @@ import org.apache.activemq.util.IOHelper; */ public class KahaDBStoreBrokerTest extends BrokerTest { + @Override protected void setUp() throws Exception { this.setAutoFail(true); super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); KahaDBStore kaha = new KahaDBStore(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java index f06d7f28e8..01271adeff 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/KahaDBStoreTest.java @@ -70,6 +70,7 @@ public class KahaDBStoreTest { for (int i = 0; i < MESSAGE_COUNT; i++) { final int id = ++i; executor.execute(new Runnable() { + @Override public void run() { try { Message msg = message.copy(); @@ -87,6 +88,7 @@ public class KahaDBStoreTest { for (int i = 0; i < MESSAGE_COUNT; i++) { final int id = ++i; executor2.execute(new Runnable() { + @Override public void run() { try { MessageAck ack = new MessageAck(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java index 865b27be0a..4316fc7a79 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/TempKahaDBStoreBrokerTest.java @@ -28,6 +28,7 @@ import org.apache.activemq.broker.BrokerTest; */ public class TempKahaDBStoreBrokerTest extends BrokerTest { + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); KahaDBStore kaha = new KahaDBStore(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java index 7e96d6a130..5d52adb89a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreDurableTopicTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.kahadb.KahaDBStore; */ public class KahaStoreDurableTopicTest extends SimpleDurableTopicTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/amqdb"); dataFileDir.mkdirs(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java index 75215b323c..a2898f9c4f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/KahaStoreQueueTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.kahadb.KahaDBStore; */ public class KahaStoreQueueTest extends SimpleQueueTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/amqdb"); dataFileDir.mkdirs(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java index 2c633cc29a..2575afd0c0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/kahadb/perf/TempKahaStoreQueueTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.kahadb.TempKahaDBStore; */ public class TempKahaStoreQueueTest extends SimpleQueueTest { + @Override protected void configureBroker(BrokerService answer, String uri) throws Exception { File dataFileDir = new File("target/test-amq-data/perfTest/temp-amqdb"); dataFileDir.mkdirs(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java index c1977dedd0..99583d50d0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/store/leveldb/LevelDBStoreBrokerTest.java @@ -31,11 +31,13 @@ import org.apache.activemq.leveldb.LevelDBStore; */ public class LevelDBStoreBrokerTest extends BrokerTest { + @Override protected void setUp() throws Exception { this.setAutoFail(true); super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); LevelDBStore levelDBStore = new LevelDBStore(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java index cd0433389a..26b3700b33 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java @@ -67,6 +67,7 @@ public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.Test /* * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); String temp = System.getProperty("messageCount"); @@ -229,6 +230,7 @@ public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.Test /** * @see javax.jms.MessageListener#onMessage(javax.jms.Message) */ + @Override public synchronized void onMessage(Message message) { consumeMessage(message, messages); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java index 37cd85f169..1cfea7ba3f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveTest.java @@ -35,6 +35,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { protected Connection connection; + @Override protected void setUp() throws Exception { super.setUp(); @@ -78,6 +79,7 @@ public class JmsTopicSendReceiveTest extends JmsSendReceiveTestSupport { connection.start(); } + @Override protected void tearDown() throws Exception { LOG.info("Dumping stats..."); // TODO diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java index 11b313a77a..adc7b55108 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest.java @@ -25,10 +25,12 @@ import javax.jms.MessageConsumer; */ public class JmsTopicSendReceiveWithTwoConnectionsAndByteSelectorTest extends JmsTopicSendReceiveWithTwoConnectionsTest { + @Override protected void configureMessage(Message message) throws JMSException { message.setByteProperty("dummy", (byte) 33); } + @Override protected MessageConsumer createConsumer() throws JMSException { return receiveSession.createConsumer(consumerDestination, "dummy = 33", false); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java index 4385242fed..4ad1aa4e63 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest.java @@ -32,6 +32,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -39,6 +40,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); @@ -63,6 +65,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsAndEmbeddedBrokerTest extends answer.addConnector(bindAddress); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(bindAddress); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java index 39c9a17984..00452d1f6d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/JmsTopicSendReceiveWithTwoConnectionsTest.java @@ -42,6 +42,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { super.setUp(); @@ -96,6 +97,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes /* * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { session.close(); receiveSession.close(); @@ -128,6 +130,7 @@ public class JmsTopicSendReceiveWithTwoConnectionsTest extends JmsSendReceiveTes * * @see org.apache.activemq.test.TestSupport#createConnectionFactory() */ + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java index 36fd73738a..ae841f988d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/DummyMessageQuery.java @@ -34,6 +34,7 @@ public class DummyMessageQuery implements MessageQuery { public static final int MESSAGE_COUNT = 10; private static final Logger LOG = LoggerFactory.getLogger(DummyMessageQuery.class); + @Override public void execute(ActiveMQDestination destination, MessageListener listener) throws Exception { LOG.info("Initial query is creating: " + MESSAGE_COUNT + " messages"); for (int i = 0; i < MESSAGE_COUNT; i++) { @@ -43,6 +44,7 @@ public class DummyMessageQuery implements MessageQuery { } } + @Override public boolean validateUpdate(Message message) { return true; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java index 4ca9af1349..467aa9ae5d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithDestinationBasedBufferTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.test.retroactive; */ public class RetroactiveConsumerTestWithDestinationBasedBufferTest extends RetroactiveConsumerTestWithSimpleMessageListTest { + @Override protected String getBrokerXml() { return "org/apache/activemq/test/retroactive/activemq-fixed-destination-buffer.xml"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java index 3ace7128b4..7640f9c183 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest.java @@ -30,19 +30,23 @@ public class RetroactiveConsumerTestWithLastImagePolicyWithWildcardTest extends private int counter = 1; + @Override protected void sendMessage(MessageProducer producer, TextMessage message) throws JMSException { ActiveMQTopic topic = new ActiveMQTopic(destination.getPhysicalName() + "." + (counter++)); producer.send(topic, message); } + @Override protected MessageProducer createProducer() throws JMSException { return session.createProducer(null); } + @Override protected MessageConsumer createConsumer() throws JMSException { return session.createConsumer(new ActiveMQTopic(destination.getPhysicalName() + ".>")); } + @Override protected String getBrokerXml() { return "org/apache/activemq/test/retroactive/activemq-lastimage-policy.xml"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java index 463d25e9b7..220ba99a8e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/retroactive/RetroactiveConsumerTestWithTimePolicyTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.test.retroactive; */ public class RetroactiveConsumerTestWithTimePolicyTest extends RetroactiveConsumerTestWithSimpleMessageListTest { + @Override protected String getBrokerXml() { return "org/apache/activemq/test/retroactive/activemq-timed-policy.xml"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java index ea80c08f36..41e12e20ee 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/CloseRollbackRedeliveryQueueTest.java @@ -97,6 +97,7 @@ public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport assertEquals(2, message.getLongProperty("JMSXDeliveryCount")); } + @Override protected void setUp() throws Exception { super.setUp(); @@ -110,11 +111,13 @@ public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { // failover: enables message audit - which could get in the way of redelivery return new ActiveMQConnectionFactory("failover:" + bindAddress); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -124,6 +127,7 @@ public class CloseRollbackRedeliveryQueueTest extends EmbeddedBrokerTestSupport protected MessageCreator createMessageCreator(final int i) { return new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage answer = session.createTextMessage("Message: " + i); answer.setIntProperty("Counter", i); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java index 5953d46a10..8288925dad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/DelegatingTransactionalMessageListener.java @@ -51,6 +51,7 @@ public class DelegatingTransactionalMessageListener implements MessageListener { } } + @Override public void onMessage(Message message) { try { underlyingListener.onMessage(message); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java index 4b9b060d62..d748fd2f44 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/rollback/RollbacksWhileConsumingLargeQueueTest.java @@ -104,6 +104,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup fail("Did not receive all the messages."); } + @Override protected ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory answer = (ActiveMQConnectionFactory) super.createConnectionFactory(); RedeliveryPolicy policy = new RedeliveryPolicy(); @@ -115,6 +116,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup return answer; } + @Override protected void setUp() throws Exception { super.setUp(); @@ -128,6 +130,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); @@ -137,6 +140,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup protected MessageCreator createMessageCreator(final int i) { return new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage answer = session.createTextMessage("Message: " + i); answer.setIntProperty("Counter", i); @@ -145,6 +149,7 @@ public class RollbacksWhileConsumingLargeQueueTest extends EmbeddedBrokerTestSup }; } + @Override public void onMessage(Message message) { String msgId = null; String msgText = null; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java index 901ea9a556..9902bd2dab 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/QueueClusterTest.java @@ -21,11 +21,13 @@ package org.apache.activemq.transport; */ public class QueueClusterTest extends TopicClusterTest { + @Override protected void setUp() throws Exception { topic = false; super.setUp(); } + @Override protected int expectedReceiveCount() { return MESSAGE_COUNT * NUMBER_IN_CLUSTER; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java index 91823e9785..1b95006e50 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutClientTest.java @@ -41,6 +41,7 @@ public class SoWriteTimeoutClientTest extends JmsTestSupport { private static final Logger LOG = LoggerFactory.getLogger(SoWriteTimeoutClientTest.class); + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = new BrokerService(); broker.setDeleteAllMessagesOnStartup(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java index a2532b838f..8cac437405 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/SoWriteTimeoutTest.java @@ -48,6 +48,7 @@ public class SoWriteTimeoutTest extends JmsTestSupport { final int receiveBufferSize = 16 * 1024; public String brokerTransportScheme = "nio"; + @Override protected BrokerService createBroker() throws Exception { BrokerService broker = super.createBroker(); broker.setPersistent(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java index bc15236fa0..57b7062154 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubCompositeTransport.java @@ -31,6 +31,7 @@ public class StubCompositeTransport extends StubTransport implements CompositeTr /** * @see org.apache.activemq.transport.CompositeTransport#add(java.net.URI[]) */ + @Override public void add(boolean rebalance, URI[] uris) { transportURIs.addAll(Arrays.asList(uris)); } @@ -38,6 +39,7 @@ public class StubCompositeTransport extends StubTransport implements CompositeTr /** * @see org.apache.activemq.transport.CompositeTransport#remove(java.net.URI[]) */ + @Override public void remove(boolean rebalance, URI[] uris) { transportURIs.removeAll(Arrays.asList(uris)); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubTransport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubTransport.java index 89294c195e..9375b6d483 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubTransport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/StubTransport.java @@ -32,12 +32,15 @@ public class StubTransport extends TransportSupport { private Queue queue = new ConcurrentLinkedQueue(); private AtomicInteger receiveCounter; + @Override protected void doStop(ServiceStopper stopper) throws Exception { } + @Override protected void doStart() throws Exception { } + @Override public void oneway(Object command) throws IOException { receiveCounter.incrementAndGet(); queue.add(command); @@ -47,10 +50,12 @@ public class StubTransport extends TransportSupport { return queue; } + @Override public String getRemoteAddress() { return null; } + @Override public int getReceiveCounter() { return receiveCounter.get(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java index a7b585860c..c8aadbcf50 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TopicClusterTest.java @@ -63,6 +63,7 @@ public class TopicClusterTest extends TestCase implements MessageListener { protected List services = new ArrayList(); protected String groupId; + @Override protected void setUp() throws Exception { groupId = "topic-cluster-test-" + System.currentTimeMillis(); connections = new Connection[NUMBER_IN_CLUSTER]; @@ -94,6 +95,7 @@ public class TopicClusterTest extends TestCase implements MessageListener { } } + @Override protected void tearDown() throws Exception { if (connections != null) { for (int i = 0; i < connections.length; i++) { @@ -147,6 +149,7 @@ public class TopicClusterTest extends TestCase implements MessageListener { /** * @param msg */ + @Override public void onMessage(Message msg) { // log.info("GOT: " + msg); receivedMessageCount.incrementAndGet(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java index a40e87331b..18e4cdce69 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/TransportBrokerTestSupport.java @@ -32,10 +32,12 @@ public abstract class TransportBrokerTestSupport extends BrokerTest { protected TransportConnector connector; private ArrayList connections = new ArrayList(); + @Override protected void setUp() throws Exception { super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService service = super.createBroker(); connector = service.addConnector(getBindLocation()); @@ -44,6 +46,7 @@ public abstract class TransportBrokerTestSupport extends BrokerTest { protected abstract String getBindLocation(); + @Override protected void tearDown() throws Exception { for (Iterator iter = connections.iterator(); iter.hasNext(); ) { StubConnection connection = iter.next(); @@ -60,6 +63,7 @@ public abstract class TransportBrokerTestSupport extends BrokerTest { return new URI(getBindLocation()); } + @Override protected StubConnection createConnection() throws Exception { URI bindURI = getBindURI(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java index d750243758..e9bca3b885 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/DiscoveryTransportBrokerTest.java @@ -45,6 +45,7 @@ public class DiscoveryTransportBrokerTest extends NetworkTestSupport { String groupName; + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); @@ -117,14 +118,17 @@ public class DiscoveryTransportBrokerTest extends NetworkTestSupport { } + @Override protected String getLocalURI() { return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true"; } + @Override protected String getRemoteURI() { return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true"; } + @Override protected TransportConnector createConnector() throws Exception, IOException, URISyntaxException { TransportConnector x = super.createConnector(); x.setDiscoveryUri(new URI(getDiscoveryUri())); @@ -138,6 +142,7 @@ public class DiscoveryTransportBrokerTest extends NetworkTestSupport { return "multicast://default?group=" + groupName; } + @Override protected TransportConnector createRemoteConnector() throws Exception, IOException, URISyntaxException { TransportConnector x = super.createRemoteConnector(); x.setDiscoveryUri(new URI(getDiscoveryUri())); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/ZeroconfDiscoverTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/ZeroconfDiscoverTransportTest.java index 0a3142f097..8656d07e9a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/ZeroconfDiscoverTransportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/discovery/ZeroconfDiscoverTransportTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.transport.discovery; */ public class ZeroconfDiscoverTransportTest extends DiscoveryTransportBrokerTest { + @Override protected String getDiscoveryUri() { return "zeroconf://cheese"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java index e1f976293e..4554a0ba98 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/AMQ1925Test.java @@ -74,6 +74,7 @@ public class AMQ1925Test extends TestCase implements ExceptionListener { final CountDownLatch starter = new CountDownLatch(1); final AtomicBoolean restarted = new AtomicBoolean(); new Thread(new Runnable() { + @Override public void run() { try { starter.await(); @@ -132,6 +133,7 @@ public class AMQ1925Test extends TestCase implements ExceptionListener { final CountDownLatch starter = new CountDownLatch(1); final AtomicBoolean restarted = new AtomicBoolean(); new Thread(new Runnable() { + @Override public void run() { try { starter.await(); @@ -347,6 +349,7 @@ public class AMQ1925Test extends TestCase implements ExceptionListener { assertQueueLength(MESSAGE_COUNT); } + @Override protected void setUp() throws Exception { exception = null; bs = new BrokerService(); @@ -362,10 +365,12 @@ public class AMQ1925Test extends TestCase implements ExceptionListener { sendMessagesToQueue(); } + @Override protected void tearDown() throws Exception { new ServiceStopper().stop(bs); } + @Override public void onException(JMSException exception) { this.exception = exception; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java index 54f3fe4134..8cac09ae53 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/BadConnectionTest.java @@ -51,25 +51,31 @@ public class BadConnectionTest extends TestCase { return TransportFactory.connect(new URI("failover://(tcp://doesNotExist:1234)?useExponentialBackOff=false&maxReconnectAttempts=3&initialReconnectDelay=100")); } + @Override protected void setUp() throws Exception { transport = createTransport(); transport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { } + @Override public void onException(IOException error) { } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); transport.start(); } + @Override protected void tearDown() throws Exception { if (transport != null) { transport.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java index 5d2d0f9353..ea0983293c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerOutstandingCommitTest.java @@ -113,6 +113,7 @@ public class FailoverConsumerOutstandingCommitTest { // so commit will hang as if reply is lost context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker before commit..."); try { @@ -145,6 +146,7 @@ public class FailoverConsumerOutstandingCommitTest { final MessageConsumer testConsumer = consumerSession.createConsumer(destination); testConsumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { LOG.info("consume one and commit"); @@ -164,6 +166,7 @@ public class FailoverConsumerOutstandingCommitTest { // may block if broker shutodwn happens quickly Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("producer started"); try { @@ -219,6 +222,7 @@ public class FailoverConsumerOutstandingCommitTest { // so commit will hang as if reply is lost context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker before commit..."); try { @@ -254,6 +258,7 @@ public class FailoverConsumerOutstandingCommitTest { final MessageConsumer testConsumer = consumerSession.createConsumer(destination); testConsumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { LOG.info("consume one and commit: " + message); assertNotNull("got message", message); @@ -274,6 +279,7 @@ public class FailoverConsumerOutstandingCommitTest { // may block if broker shutdown happens quickly Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("producer started"); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java index b757b020fd..310e239a87 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerUnconsumedTest.java @@ -113,6 +113,7 @@ public class FailoverConsumerUnconsumedTest { if (++consumerCount == maxConsumers) { context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker on consumer: " + info.getConsumerId()); try { @@ -156,6 +157,7 @@ public class FailoverConsumerUnconsumedTest { produceMessage(consumerSession, destination, maxConsumers * prefetch); assertTrue("add messages are delivered", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int totalDelivered = 0; for (TestConsumer testConsumer : testConsumers) { @@ -170,6 +172,7 @@ public class FailoverConsumerUnconsumedTest { final CountDownLatch shutdownConsumerAdded = new CountDownLatch(1); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { try { LOG.info("add last consumer..."); @@ -205,6 +208,7 @@ public class FailoverConsumerUnconsumedTest { // each should again get prefetch messages - all unacked deliveries should be rolledback assertTrue("after restart all messages are re dispatched", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int totalDelivered = 0; for (TestConsumer testConsumer : testConsumers) { @@ -217,6 +221,7 @@ public class FailoverConsumerUnconsumedTest { })); assertTrue("after restart each got prefetch amount", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { for (TestConsumer testConsumer : testConsumers) { long delivered = testConsumer.deliveredSize(); @@ -247,6 +252,7 @@ public class FailoverConsumerUnconsumedTest { if (++consumerCount == maxConsumers + (watchTopicAdvisories ? 1 : 0)) { context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker on consumer: " + info.getConsumerId()); try { @@ -280,6 +286,7 @@ public class FailoverConsumerUnconsumedTest { produceMessage(consumerSession, destination, maxConsumers * prefetch); assertTrue("add messages are dispatched", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int totalUnconsumed = 0; for (TestConsumer testConsumer : testConsumers) { @@ -294,6 +301,7 @@ public class FailoverConsumerUnconsumedTest { final CountDownLatch shutdownConsumerAdded = new CountDownLatch(1); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { try { LOG.info("add last consumer..."); @@ -312,6 +320,7 @@ public class FailoverConsumerUnconsumedTest { // verify interrupt assertTrue("add messages dispatched and unconsumed are cleaned up", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int totalUnconsumed = 0; for (TestConsumer testConsumer : testConsumers) { @@ -330,6 +339,7 @@ public class FailoverConsumerUnconsumedTest { // each should again get prefetch messages - all unconsumed deliveries should be rolledback assertTrue("after start all messages are re dispatched", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int totalUnconsumed = 0; for (TestConsumer testConsumer : testConsumers) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java index 365379b0c4..e48a699ce7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverPrefetchZeroTest.java @@ -91,6 +91,7 @@ public class FailoverPrefetchZeroTest { context.setDontSendReponse(true); pullDone.countDown(); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker on pull: " + pull); try { @@ -121,6 +122,7 @@ public class FailoverPrefetchZeroTest { final CountDownLatch receiveDone = new CountDownLatch(1); final Vector received = new Vector(); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { try { LOG.info("receive one..."); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java index b4c25c24fe..54dd3e37b8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverRandomTest.java @@ -27,11 +27,13 @@ public class FailoverRandomTest extends TestCase { BrokerService brokerA, brokerB; + @Override public void setUp() throws Exception { brokerA = createBroker("A"); brokerB = createBroker("B"); } + @Override public void tearDown() throws Exception { brokerA.stop(); brokerB.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java index d50c77f3d2..4ee219e3b1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransactionTest.java @@ -81,12 +81,14 @@ public class FailoverTransactionTest extends TestSupport { return suite(FailoverTransactionTest.class); } + @Override public void setUp() throws Exception { super.setMaxTestTime(2 * 60 * 1000); // some boxes can be real slow super.setAutoFail(true); super.setUp(); } + @Override public void tearDown() throws Exception { super.tearDown(); stopBroker(); @@ -181,6 +183,7 @@ public class FailoverTransactionTest extends TestSupport { // so commit will hang as if reply is lost context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker post commit..."); try { @@ -208,6 +211,7 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch commitDoneLatch = new CountDownLatch(1); // broker will die on commit reply so this will hang till restart Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async commit..."); try { @@ -279,6 +283,7 @@ public class FailoverTransactionTest extends TestSupport { // so commit will hang as if reply is lost context.setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker post commit..."); try { @@ -306,6 +311,7 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch commitDoneLatch = new CountDownLatch(1); // broker will die on commit reply so this will hang till restart Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async commit..."); try { @@ -390,6 +396,7 @@ public class FailoverTransactionTest extends TestSupport { super.send(producerExchange, messageSend); producerExchange.getConnectionContext().setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker post send..."); try { @@ -415,6 +422,7 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch sendDoneLatch = new CountDownLatch(1); // broker will die on send reply so this will hang till restart Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async send..."); try { @@ -512,6 +520,7 @@ public class FailoverTransactionTest extends TestSupport { producerExchange.getConnectionContext().setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping connection post send..."); try { @@ -541,6 +550,7 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch sendDoneLatch = new CountDownLatch(1); // proxy connection will die on send reply so this will hang on failover reconnect till open Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async send..."); try { @@ -667,12 +677,15 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch connectionConsumerGotOne = new CountDownLatch(1); final Session poolSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); connection.createConnectionConsumer(destination, null, new ServerSessionPool() { + @Override public ServerSession getServerSession() throws JMSException { return new ServerSession() { + @Override public Session getSession() throws JMSException { return poolSession; } + @Override public void start() throws JMSException { connectionConsumerGotOne.countDown(); poolSession.run(); @@ -732,6 +745,7 @@ public class FailoverTransactionTest extends TestSupport { consumerExchange.getConnectionContext().setDontSendReponse(true); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker on ack: " + ack); try { @@ -775,6 +789,7 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch commitDoneLatch = new CountDownLatch(1); final AtomicBoolean gotTransactionRolledBackException = new AtomicBoolean(false); Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async commit after consume..."); try { @@ -893,6 +908,7 @@ public class FailoverTransactionTest extends TestSupport { public void removeConsumer(ConnectionContext context, final ConsumerInfo info) throws Exception { if (count++ == 1) { Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("Stopping broker on removeConsumer: " + info); try { @@ -957,6 +973,7 @@ public class FailoverTransactionTest extends TestSupport { for (int i = 0; i < consumerCount && !consumers.isEmpty(); i++) { executorService.execute(new Runnable() { + @Override public void run() { MessageConsumer localConsumer = null; try { @@ -1082,6 +1099,7 @@ public class FailoverTransactionTest extends TestSupport { final CountDownLatch commitDone = new CountDownLatch(1); // will block pending re-deliveries Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async commit..."); try { @@ -1136,6 +1154,7 @@ public class FailoverTransactionTest extends TestSupport { // commit may fail if other consumer gets the message on restart Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override public void run() { LOG.info("doing async commit..."); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java index 1cb5daad5a..982306383e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java @@ -62,15 +62,19 @@ public class FailoverTransportTest { transport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { } + @Override public void onException(IOException error) { } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -134,15 +138,19 @@ public class FailoverTransportTest { transport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { } + @Override public void onException(IOException error) { } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -157,15 +165,19 @@ public class FailoverTransportTest { Transport transport = TransportFactory.connect(new URI("failover://(tcp://localhost:1234?transport.connectTimeout=10000)")); transport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { } + @Override public void onException(IOException error) { } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java index 4f413604db..4ba5516b7b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/ReconnectTest.java @@ -72,18 +72,22 @@ public class ReconnectTest extends TestCase { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(uri); connection = (ActiveMQConnection) factory.createConnection(); connection.addTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { } + @Override public void onException(IOException error) { setError(error); } + @Override public void transportInterupted() { LOG.info("Worker " + name + " was interrupted..."); interruptedCount.incrementAndGet(); } + @Override public void transportResumed() { LOG.info("Worker " + name + " was resummed..."); resumedCount.incrementAndGet(); @@ -117,6 +121,7 @@ public class ReconnectTest extends TestCase { } } + @Override public void run() { try { ActiveMQQueue queue = new ActiveMQQueue("FOO_" + name); @@ -188,6 +193,7 @@ public class ReconnectTest extends TestCase { } assertTrue("Timed out waiting for all connections to be interrupted.", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { LOG.debug("Test run waiting for connections to get interrupted.. at: " + interruptedCount.get()); return interruptedCount.get() == WORKER_COUNT; @@ -196,6 +202,7 @@ public class ReconnectTest extends TestCase { // Wait for the connections to re-establish... assertTrue("Timed out waiting for all connections to be resumed.", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { LOG.debug("Test run waiting for connections to get resumed.. at: " + resumedCount.get()); return resumedCount.get() >= WORKER_COUNT; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java index 10e3ce2a3e..2826595ead 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/failover/SlowConnectionTest.java @@ -46,6 +46,7 @@ public class SlowConnectionTest extends TestCase { final Connection connection = cf.createConnection(); new Thread(new Runnable() { + @Override public void run() { try { connection.start(); @@ -57,6 +58,7 @@ public class SlowConnectionTest extends TestCase { int count = 0; assertTrue("Transport count: " + count + ", expected <= 1", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { int count = 0; for (Thread thread : Thread.getAllStackTraces().keySet()) { @@ -80,6 +82,7 @@ public class SlowConnectionTest extends TestCase { super("MockBroker"); } + @Override public void run() { List inProgress = new ArrayList(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java index c97c9f4867..dc369be8ed 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTest.java @@ -40,6 +40,7 @@ public class FanoutTest extends TestCase { Session producerSession; int messageCount = 100; + @Override public void setUp() throws Exception { broker1 = BrokerFactory.createBroker("broker:(tcp://localhost:61616)/brokerA?persistent=false&useJmx=false"); broker2 = BrokerFactory.createBroker("broker:(tcp://localhost:61617)/brokerB?persistent=false&useJmx=false"); @@ -55,6 +56,7 @@ public class FanoutTest extends TestCase { producerSession = producerConnection.createSession(false, Session.AUTO_ACKNOWLEDGE); } + @Override public void tearDown() throws Exception { producerSession.close(); producerConnection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java index bf770e385e..a60325a93e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/fanout/FanoutTransportBrokerTest.java @@ -152,6 +152,7 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport { // Slip in a new transport filter after the MockTransport MockTransport mt = (MockTransport) connection3.getTransport().narrow(MockTransport.class); mt.install(new TransportFilter(mt.getNext()) { + @Override public void oneway(Object command) throws IOException { LOG.info("Dropping: " + command); // just eat it! to simulate a recent failure. @@ -160,6 +161,7 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport { // Send a message (async) as this will block new Thread() { + @Override public void run() { // Send the message using the fail over publisher. try { @@ -186,10 +188,12 @@ public class FanoutTransportBrokerTest extends NetworkTestSupport { } + @Override protected String getLocalURI() { return "tcp://localhost:61616"; } + @Override protected String getRemoteURI() { return "tcp://localhost:61617"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java index 0d897f9bb6..e76542bd6c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/multicast/MulticastTransportTest.java @@ -36,6 +36,7 @@ public class MulticastTransportTest extends UdpTransportTest { private String multicastURI = "multicast://224.1.2.3:6255"; + @Override protected Transport createProducer() throws Exception { LOG.info("Producer using URI: " + multicastURI); @@ -50,6 +51,7 @@ public class MulticastTransportTest extends UdpTransportTest { return new CommandJoiner(transport, wireFormat); } + @Override protected Transport createConsumer() throws Exception { OpenWireFormat wireFormat = createWireFormat(); MulticastTransport transport = new MulticastTransport(wireFormat, new URI(multicastURI)); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java index aeca0de6eb..24f69ea80f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsDurableTopicSendReceiveTest.java @@ -24,6 +24,7 @@ public class NIOJmsDurableTopicSendReceiveTest extends JmsDurableTopicSendReceiv protected BrokerService broker; + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -32,6 +33,7 @@ public class NIOJmsDurableTopicSendReceiveTest extends JmsDurableTopicSendReceiv super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { @@ -39,6 +41,7 @@ public class NIOJmsDurableTopicSendReceiveTest extends JmsDurableTopicSendReceiv } } + @Override protected ActiveMQConnectionFactory createConnectionFactory() { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(getBrokerURL()); return connectionFactory; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java index ea229334fa..1c81ab0538 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOJmsSendAndReceiveTest.java @@ -27,6 +27,7 @@ public class NIOJmsSendAndReceiveTest extends JmsTopicSendReceiveWithTwoConnecti protected BrokerService broker; + @Override protected void setUp() throws Exception { if (broker == null) { broker = createBroker(); @@ -35,6 +36,7 @@ public class NIOJmsSendAndReceiveTest extends JmsTopicSendReceiveWithTwoConnecti super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { @@ -42,6 +44,7 @@ public class NIOJmsSendAndReceiveTest extends JmsTopicSendReceiveWithTwoConnecti } } + @Override protected ActiveMQConnectionFactory createConnectionFactory() { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(getBrokerURL()); return connectionFactory; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java index cca6b6dcae..1cb6c39fb4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOPersistentSendAndReceiveTest.java @@ -24,12 +24,14 @@ public class NIOPersistentSendAndReceiveTest extends NIOJmsSendAndReceiveTest { protected BrokerService broker; + @Override protected void setUp() throws Exception { this.topic = false; this.deliveryMode = DeliveryMode.PERSISTENT; super.setUp(); } + @Override protected BrokerService createBroker() throws Exception { BrokerService answer = new BrokerService(); answer.setPersistent(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLLoadTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLLoadTest.java index a3ce6e26f7..05f26f0164 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLLoadTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLLoadTest.java @@ -96,6 +96,7 @@ public class NIOSSLLoadTest extends TestCase { } Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return getReceived() == PRODUCER_COUNT * MESSAGE_COUNT; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLTransportBrokerTest.java index 605dd06663..34c7dbcff7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOSSLTransportBrokerTest.java @@ -31,6 +31,7 @@ public class NIOSSLTransportBrokerTest extends TransportBrokerTestSupport { public static final String SERVER_KEYSTORE = "src/test/resources/server.keystore"; public static final String TRUST_KEYSTORE = "src/test/resources/client.keystore"; + @Override protected String getBindLocation() { return "nio+ssl://localhost:0?transport.soWriteTimeout=20000"; } @@ -40,6 +41,7 @@ public class NIOSSLTransportBrokerTest extends TransportBrokerTestSupport { return new URI("nio+ssl://localhost:0?soWriteTimeout=20000"); } + @Override protected void setUp() throws Exception { System.setProperty("javax.net.ssl.trustStore", TRUST_KEYSTORE); System.setProperty("javax.net.ssl.trustStorePassword", PASSWORD); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java index e49562ac28..a8422d31c0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/nio/NIOTransportBrokerTest.java @@ -23,6 +23,7 @@ import org.apache.activemq.transport.TransportBrokerTestSupport; public class NIOTransportBrokerTest extends TransportBrokerTestSupport { + @Override protected String getBindLocation() { return "nio://localhost:61616"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java index 1037bf5615..44bcfbf333 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java @@ -123,6 +123,7 @@ public class ReliableTransportTest extends TestCase { } } + @Override protected void setUp() throws Exception { if (replayStrategy == null) { replayStrategy = new ExceptionIfDroppedReplayStrategy(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java index 3bb69ed58f..c9e7cb0e99 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramChannel.java @@ -51,6 +51,7 @@ public class UnreliableCommandDatagramChannel extends CommandDatagramChannel { this.dropCommandStrategy = strategy; } + @Override protected void sendWriteBuffer(int commandId, SocketAddress address, ByteBuffer writeBuffer, diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java index 048facd336..f315b0b688 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java @@ -47,6 +47,7 @@ public class UnreliableCommandDatagramSocket extends CommandDatagramSocket { this.dropCommandStrategy = strategy; } + @Override protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java index f0606a7140..0148595eca 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/reliable/UnreliableUdpTransport.java @@ -58,6 +58,7 @@ public class UnreliableUdpTransport extends UdpTransport { this.dropCommandStrategy = dropCommandStrategy; } + @Override protected CommandChannel createCommandDatagramChannel() { return new UnreliableCommandDatagramChannel(this, getWireFormat(), getDatagramSize(), getTargetAddress(), createDatagramHeaderMarshaller(), getReplayBuffer(), getChannel(), getBufferPool(), dropCommandStrategy); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java index 8ab802a915..619190ff4c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/InactivityMonitorTest.java @@ -55,6 +55,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra private final AtomicBoolean ignoreClientError = new AtomicBoolean(false); private final AtomicBoolean ignoreServerError = new AtomicBoolean(false); + @Override protected void setUp() throws Exception { super.setUp(); startTransportServer(); @@ -67,6 +68,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra private void startClient() throws Exception, URISyntaxException { clientTransport = TransportFactory.connect(new URI("tcp://localhost:" + serverPort + "?trace=true&wireFormat.maxInactivityDuration=1000")); clientTransport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { clientReceiveCount.incrementAndGet(); if (clientRunOnCommand != null) { @@ -74,6 +76,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void onException(IOException error) { if (!ignoreClientError.get()) { LOG.info("Client transport error:"); @@ -82,9 +85,11 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -104,6 +109,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra serverPort = server.getSocketAddress().getPort(); } + @Override protected void tearDown() throws Exception { ignoreClientError.set(true); ignoreServerError.set(true); @@ -124,11 +130,13 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra super.tearDown(); } + @Override public void onAccept(Transport transport) { try { LOG.info("[" + getName() + "] Server Accepted a Connection"); serverTransport = transport; serverTransport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { serverReceiveCount.incrementAndGet(); if (serverRunOnCommand != null) { @@ -136,6 +144,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void onException(IOException error) { if (!ignoreClientError.get()) { LOG.info("Server transport error:", error); @@ -143,9 +152,11 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -156,6 +167,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void onAcceptError(Exception error) { LOG.trace(error.toString()); } @@ -168,6 +180,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra // this should simulate a client hang. clientTransport = new TcpTransport(new OpenWireFormat(), SocketFactory.getDefault(), new URI("tcp://localhost:" + serverPort), null); clientTransport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { clientReceiveCount.incrementAndGet(); if (clientRunOnCommand != null) { @@ -175,6 +188,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void onException(IOException error) { if (!ignoreClientError.get()) { LOG.info("Client transport error:"); @@ -183,9 +197,11 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra } } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -232,6 +248,7 @@ public class InactivityMonitorTest extends CombinationTestSupport implements Tra addCombinationValues("clientInactivityLimit", new Object[]{Long.valueOf(1000)}); addCombinationValues("serverInactivityLimit", new Object[]{Long.valueOf(1000)}); addCombinationValues("serverRunOnCommand", new Object[]{new Runnable() { + @Override public void run() { try { LOG.info("Sleeping"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java index 291ebb1c6e..af3dbb71b8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/ServerSocketTstFactory.java @@ -62,16 +62,19 @@ public class ServerSocketTstFactory extends ServerSocketFactory { this.rnd = new Random(); } + @Override public ServerSocket createServerSocket(int port) throws IOException { ServerSocketTst sSock = new ServerSocketTst(port, this.rnd); return sSock.getSocket(); } + @Override public ServerSocket createServerSocket(int port, int backlog) throws IOException { ServerSocketTst sSock = new ServerSocketTst(port, backlog, this.rnd); return sSock.getSocket(); } + @Override public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException { ServerSocketTst sSock = new ServerSocketTst(port, backlog, ifAddress, this.rnd); return sSock.getSocket(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java index dc59997840..3a1c9a428d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslBrokerServiceTest.java @@ -53,6 +53,7 @@ public class SslBrokerServiceTest extends TransportBrokerTestSupport { TransportConnector needClientAuthConnector; TransportConnector limitedCipherSuites; + @Override protected String getBindLocation() { return "ssl://localhost:0"; } @@ -181,6 +182,7 @@ public class SslBrokerServiceTest extends TransportBrokerTestSupport { return out.toByteArray(); } + @Override protected void setUp() throws Exception { maxWait = 10000; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java index dae1249481..d1f15ecb65 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportBrokerTest.java @@ -31,6 +31,7 @@ public class SslTransportBrokerTest extends TransportBrokerTestSupport { public static final String SERVER_KEYSTORE = "src/test/resources/server.keystore"; public static final String TRUST_KEYSTORE = "src/test/resources/client.keystore"; + @Override protected String getBindLocation() { return "ssl://localhost:0?transport.soWriteTimeout=20000"; } @@ -40,6 +41,7 @@ public class SslTransportBrokerTest extends TransportBrokerTestSupport { return new URI("ssl://localhost:0?soWriteTimeout=20000"); } + @Override protected void setUp() throws Exception { System.setProperty("javax.net.ssl.trustStore", TRUST_KEYSTORE); System.setProperty("javax.net.ssl.trustStorePassword", PASSWORD); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java index b69c468ab0..32e26a3174 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java @@ -35,10 +35,12 @@ public class SslTransportFactoryTest extends TestCase { private SslTransportFactory factory; private boolean verbose; + @Override protected void setUp() throws Exception { factory = new SslTransportFactory(); } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java index 9ee01292ba..31acb07f1f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportServerTest.java @@ -27,9 +27,11 @@ public class SslTransportServerTest extends TestCase { private SslTransportServer sslTransportServer; private StubSSLServerSocket sslServerSocket; + @Override protected void setUp() throws Exception { } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java index 2c7a3449ff..0afb981e78 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/SslTransportTest.java @@ -41,12 +41,14 @@ public class SslTransportTest extends TestCase { String password; String certDistinguishedName; + @Override protected void setUp() throws Exception { certDistinguishedName = "ThisNameIsDistinguished"; username = "SomeUserName"; password = "SomePassword"; } + @Override protected void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java index 668a7eb7d2..1a5145c7a4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLServerSocket.java @@ -42,57 +42,71 @@ public class StubSSLServerSocket extends SSLServerSocket { return needClientAuthStatus; } + @Override public void setWantClientAuth(boolean want) { wantClientAuthStatus = want ? TRUE : FALSE; } + @Override public void setNeedClientAuth(boolean need) { needClientAuthStatus = need ? TRUE : FALSE; } // --- Stubbed methods --- + @Override public boolean getEnableSessionCreation() { return false; } + @Override public String[] getEnabledCipherSuites() { return null; } + @Override public String[] getEnabledProtocols() { return null; } + @Override public boolean getNeedClientAuth() { return false; } + @Override public String[] getSupportedCipherSuites() { return null; } + @Override public String[] getSupportedProtocols() { return null; } + @Override public boolean getUseClientMode() { return false; } + @Override public boolean getWantClientAuth() { return false; } + @Override public void setEnableSessionCreation(boolean flag) { } + @Override public void setEnabledCipherSuites(String[] suites) { } + @Override public void setEnabledProtocols(String[] protocols) { } + @Override public void setUseClientMode(boolean mode) { } } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java index 76a5d07b3d..df3a0b9709 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSession.java @@ -45,6 +45,7 @@ class StubSSLSession implements SSLSession { this.isVerified = verified; } + @Override public Certificate[] getPeerCertificates() throws SSLPeerUnverifiedException { if (this.isVerified) { return new X509Certificate[]{this.cert}; @@ -56,79 +57,99 @@ class StubSSLSession implements SSLSession { // --- Stubbed methods --- + @Override public byte[] getId() { return null; } + @Override public SSLSessionContext getSessionContext() { return null; } + @Override public long getCreationTime() { return 0; } + @Override public long getLastAccessedTime() { return 0; } + @Override public void invalidate() { } + @Override public boolean isValid() { return false; } + @Override public void putValue(String arg0, Object arg1) { } + @Override public Object getValue(String arg0) { return null; } + @Override public void removeValue(String arg0) { } + @Override public String[] getValueNames() { return null; } + @Override public Certificate[] getLocalCertificates() { return null; } + @Override public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws SSLPeerUnverifiedException { return null; } + @Override public Principal getPeerPrincipal() throws SSLPeerUnverifiedException { return null; } + @Override public Principal getLocalPrincipal() { return null; } + @Override public String getCipherSuite() { return null; } + @Override public String getProtocol() { return null; } + @Override public String getPeerHost() { return null; } + @Override public int getPeerPort() { return 0; } + @Override public int getPacketBufferSize() { return 0; } + @Override public int getApplicationBufferSize() { return 0; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java index 988a85947f..c50a0c27f1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocket.java @@ -38,10 +38,12 @@ public class StubSSLSocket extends SSLSocket { this.session = ses; } + @Override public void setWantClientAuth(boolean arg0) { this.wantClientAuthStatus = arg0 ? TRUE : FALSE; } + @Override public void setNeedClientAuth(boolean arg0) { this.needClientAuthStatus = arg0 ? TRUE : FALSE; if (session != null) { @@ -49,18 +51,22 @@ public class StubSSLSocket extends SSLSocket { } } + @Override public void setUseClientMode(boolean arg0) { useClientModeStatus = arg0 ? TRUE : FALSE; } + @Override public boolean getWantClientAuth() { return wantClientAuthStatus == TRUE; } + @Override public boolean getNeedClientAuth() { return needClientAuthStatus == TRUE; } + @Override public boolean getUseClientMode() { return useClientModeStatus == TRUE; } @@ -77,46 +83,58 @@ public class StubSSLSocket extends SSLSocket { return useClientModeStatus; } + @Override public SSLSession getSession() { return this.session; } // --- Stubbed methods --- + @Override public String[] getSupportedCipherSuites() { return null; } + @Override public String[] getEnabledCipherSuites() { return null; } + @Override public void setEnabledCipherSuites(String[] arg0) { } + @Override public String[] getSupportedProtocols() { return null; } + @Override public String[] getEnabledProtocols() { return null; } + @Override public void setEnabledProtocols(String[] arg0) { } + @Override public void addHandshakeCompletedListener(HandshakeCompletedListener arg0) { } + @Override public void removeHandshakeCompletedListener(HandshakeCompletedListener arg0) { } + @Override public void startHandshake() throws IOException { } + @Override public void setEnableSessionCreation(boolean arg0) { } + @Override public boolean getEnableSessionCreation() { return false; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java index 54e04b5e87..8e7b461e68 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java @@ -31,24 +31,29 @@ public class StubSSLSocketFactory extends SSLServerSocketFactory { retServerSocket = returnServerSocket; } + @Override public ServerSocket createServerSocket(int arg0) throws IOException { return retServerSocket; } + @Override public ServerSocket createServerSocket(int arg0, int arg1) throws IOException { return retServerSocket; } + @Override public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException { return retServerSocket; } // --- Stubbed Methods --- + @Override public String[] getDefaultCipherSuites() { return null; } + @Override public String[] getSupportedCipherSuites() { return null; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java index 462f6c76bf..dc75cc30af 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/StubX509Certificate.java @@ -32,105 +32,131 @@ public class StubX509Certificate extends X509Certificate { this.id = id; } + @Override public Principal getSubjectDN() { return this.id; } // --- Stubbed Methods --- + @Override public void checkValidity() { } + @Override public void checkValidity(Date arg0) { } + @Override public int getVersion() { return 0; } + @Override public BigInteger getSerialNumber() { return null; } + @Override public Principal getIssuerDN() { return null; } + @Override public Date getNotBefore() { return null; } + @Override public Date getNotAfter() { return null; } + @Override public byte[] getTBSCertificate() { return null; } + @Override public byte[] getSignature() { return null; } + @Override public String getSigAlgName() { return null; } + @Override public String getSigAlgOID() { return null; } + @Override public byte[] getSigAlgParams() { return null; } + @Override public boolean[] getIssuerUniqueID() { return null; } + @Override public boolean[] getSubjectUniqueID() { return null; } + @Override public boolean[] getKeyUsage() { return null; } + @Override public int getBasicConstraints() { return 0; } + @Override public byte[] getEncoded() { return null; } + @Override public void verify(PublicKey arg0) { } + @Override public void verify(PublicKey arg0, String arg1) { } + @Override public String toString() { return null; } + @Override public PublicKey getPublicKey() { return null; } + @Override public boolean hasUnsupportedCriticalExtension() { return false; } + @Override @SuppressWarnings({"unchecked", "rawtypes"}) public Set getCriticalExtensionOIDs() { return null; } + @Override @SuppressWarnings({"unchecked", "rawtypes"}) public Set getNonCriticalExtensionOIDs() { return null; } + @Override public byte[] getExtensionValue(String arg0) { return null; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java index bb6f834db9..0f0e6492e4 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransport.java @@ -44,6 +44,7 @@ public class TcpFaultyTransport extends TcpTransport implements Transport, Servi /** * @return pretty print of 'this' */ + @Override public String toString() { return "tcpfaulty://" + socket.getInetAddress() + ":" + socket.getPort(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java index 77e7b6a3e9..9640169f48 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportFactory.java @@ -49,6 +49,7 @@ public class TcpFaultyTransportFactory extends TcpTransportFactory { return new TcpFaultyTransport(wf, socketFactory, location, localLocation); } + @Override protected Transport createTransport(URI location, WireFormat wf) throws UnknownHostException, IOException { URI localLocation = null; String path = location.getPath(); @@ -73,6 +74,7 @@ public class TcpFaultyTransportFactory extends TcpTransportFactory { return new TcpFaultyTransportServer(this, location, serverSocketFactory); } + @Override public TransportServer doBind(final URI location) throws IOException { try { Map options = new HashMap(URISupport.parseParameters(location)); @@ -92,10 +94,12 @@ public class TcpFaultyTransportFactory extends TcpTransportFactory { } } + @Override protected SocketFactory createSocketFactory() throws IOException { return SocketTstFactory.getDefault(); } + @Override protected ServerSocketFactory createServerSocketFactory() throws IOException { return ServerSocketTstFactory.getDefault(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java index f0061d2edf..029fffdd33 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpFaultyTransportServer.java @@ -41,6 +41,7 @@ public class TcpFaultyTransportServer extends TcpTransportServer implements Serv /** * @return pretty print of this */ + @Override public String toString() { return "" + getBindLocation(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java index 49c4839526..1a1be93ea0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TcpTransportBrokerTest.java @@ -22,10 +22,12 @@ import org.apache.activemq.transport.TransportBrokerTestSupport; public class TcpTransportBrokerTest extends TransportBrokerTestSupport { + @Override protected String getBindLocation() { return "tcp://localhost:0"; } + @Override protected void setUp() throws Exception { maxWait = 2000; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java index 3537794ca0..fb9c7ba1b5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/tcp/WireformatNegociationTest.java @@ -50,6 +50,7 @@ public class WireformatNegociationTest extends CombinationTestSupport { private final CountDownLatch negotiationCounter = new CountDownLatch(2); + @Override protected void setUp() throws Exception { super.setUp(); } @@ -61,6 +62,7 @@ public class WireformatNegociationTest extends CombinationTestSupport { private void startClient(String uri) throws Exception, URISyntaxException { clientTransport = TransportFactory.connect(new URI(uri)); clientTransport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { if (command instanceof WireFormatInfo) { clientWF.set((WireFormatInfo) command); @@ -68,6 +70,7 @@ public class WireformatNegociationTest extends CombinationTestSupport { } } + @Override public void onException(IOException error) { if (!ignoreAsycError.get()) { LOG.info("Client transport error: ", error); @@ -76,9 +79,11 @@ public class WireformatNegociationTest extends CombinationTestSupport { } } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -93,11 +98,13 @@ public class WireformatNegociationTest extends CombinationTestSupport { private void startServer(String uri) throws IOException, URISyntaxException, Exception { server = TransportFactory.bind(new URI(uri)); server.setAcceptListener(new TransportAcceptListener() { + @Override public void onAccept(Transport transport) { try { LOG.info("[" + getName() + "] Server Accepted a Connection"); serverTransport = transport; serverTransport.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { if (command instanceof WireFormatInfo) { serverWF.set((WireFormatInfo) command); @@ -105,6 +112,7 @@ public class WireformatNegociationTest extends CombinationTestSupport { } } + @Override public void onException(IOException error) { if (!ignoreAsycError.get()) { LOG.info("Server transport error: ", error); @@ -113,9 +121,11 @@ public class WireformatNegociationTest extends CombinationTestSupport { } } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -126,6 +136,7 @@ public class WireformatNegociationTest extends CombinationTestSupport { } } + @Override public void onAcceptError(Exception error) { error.printStackTrace(); } @@ -133,6 +144,7 @@ public class WireformatNegociationTest extends CombinationTestSupport { server.start(); } + @Override protected void tearDown() throws Exception { ignoreAsycError.set(true); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java index 6c39af1212..c476652005 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.transport.udp; */ public class UdpSendReceiveWithTwoConnectionsAndLargeMessagesTest extends UdpSendReceiveWithTwoConnectionsTest { + @Override protected void setUp() throws Exception { largeMessages = true; messageCount = 2; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java index 4b65872065..d3a342ca1d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpSendReceiveWithTwoConnectionsTest.java @@ -28,6 +28,7 @@ public class UdpSendReceiveWithTwoConnectionsTest extends JmsTopicSendReceiveWit protected String brokerURI = "udp://localhost:8891"; protected BrokerService broker; + @Override protected void setUp() throws Exception { broker = createBroker(); broker.start(); @@ -35,6 +36,7 @@ public class UdpSendReceiveWithTwoConnectionsTest extends JmsTopicSendReceiveWit super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (broker != null) { @@ -50,6 +52,7 @@ public class UdpSendReceiveWithTwoConnectionsTest extends JmsTopicSendReceiveWit return answer; } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(brokerURI); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java index 1d27f67826..55cee08aaa 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTestSupport.java @@ -136,11 +136,13 @@ public abstract class UdpTestSupport extends TestCase implements TransportListen return buffer.toString(); } + @Override protected void setUp() throws Exception { server = createServer(); if (server != null) { server.setAcceptListener(new TransportAcceptListener() { + @Override public void onAccept(Transport transport) { consumer = transport; consumer.setTransportListener(UdpTestSupport.this); @@ -152,6 +154,7 @@ public abstract class UdpTestSupport extends TestCase implements TransportListen } } + @Override public void onAcceptError(Exception error) { } }); @@ -166,18 +169,22 @@ public abstract class UdpTestSupport extends TestCase implements TransportListen producer = createProducer(); producer.setTransportListener(new TransportListener() { + @Override public void onCommand(Object command) { LOG.info("Producer received: " + command); } + @Override public void onException(IOException error) { LOG.info("Producer exception: " + error); error.printStackTrace(); } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } }); @@ -185,6 +192,7 @@ public abstract class UdpTestSupport extends TestCase implements TransportListen producer.start(); } + @Override protected void tearDown() throws Exception { if (producer != null) { try { @@ -201,6 +209,7 @@ public abstract class UdpTestSupport extends TestCase implements TransportListen } } + @Override public void onCommand(Object o) { final Command command = (Command) o; if (command instanceof WireFormatInfo) { @@ -244,15 +253,18 @@ public abstract class UdpTestSupport extends TestCase implements TransportListen } } + @Override public void onException(IOException error) { LOG.info("### Received error: " + error); error.printStackTrace(); } + @Override public void transportInterupted() { LOG.info("### Transport interrupted"); } + @Override public void transportResumed() { LOG.info("### Transport resumed"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java index 5904e217d8..d8d139d2ad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportTest.java @@ -36,6 +36,7 @@ public class UdpTransportTest extends UdpTestSupport { protected int consumerPort = 9123; protected String producerURI = "udp://localhost:" + consumerPort; + @Override protected Transport createProducer() throws Exception { LOG.info("Producer using URI: " + producerURI); @@ -49,6 +50,7 @@ public class UdpTransportTest extends UdpTestSupport { return new CommandJoiner(transport, wireFormat); } + @Override protected Transport createConsumer() throws Exception { LOG.info("Consumer on port: " + consumerPort); OpenWireFormat wireFormat = createWireFormat(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java index d3e58fad4b..348b9867a8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UdpTransportUsingServerTest.java @@ -51,16 +51,19 @@ public class UdpTransportUsingServerTest extends UdpTestSupport { assertTrue("Should not be an exception", !response.isException()); } + @Override protected Transport createProducer() throws Exception { LOG.info("Producer using URI: " + producerURI); URI uri = new URI(producerURI); return TransportFactory.connect(uri); } + @Override protected TransportServer createServer() throws Exception { return TransportFactory.bind(new URI(serverURI)); } + @Override protected Transport createConsumer() throws Exception { return null; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UpdTransportBindTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UpdTransportBindTest.java index c15e32e183..96436388dc 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UpdTransportBindTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/udp/UpdTransportBindTest.java @@ -26,6 +26,7 @@ public class UpdTransportBindTest extends EmbeddedBrokerTestSupport { final String addr = "udp://localhost:61625"; + @Override protected void setUp() throws Exception { bindAddress = addr + "?soTimeout=1000"; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java index b43038b8d4..52e4b88b61 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportBrokerTest.java @@ -22,6 +22,7 @@ import org.apache.activemq.transport.TransportBrokerTestSupport; public class VMTransportBrokerTest extends TransportBrokerTestSupport { + @Override protected String getBindLocation() { return "vm://localhost"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java index 528059ccb4..dbc7f29311 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/transport/vm/VMTransportEmbeddedBrokerTest.java @@ -79,14 +79,17 @@ public class VMTransportEmbeddedBrokerTest extends BrokerTestSupport { assertNull(BrokerRegistry.getInstance().lookup("localhost")); } + @Override protected void setUp() throws Exception { // Don't call super since it manually starts up a broker. } + @Override protected void tearDown() throws Exception { // Don't call super since it manually tears down a broker. } + @Override protected StubConnection createConnection() throws Exception { try { Transport transport = TransportFactory.connect(new URI("vm://localhost?broker.persistent=false")); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java index 79fbbdf415..ff8d933a3c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/CompositeMessageCursorUsageTest.java @@ -35,12 +35,14 @@ public class CompositeMessageCursorUsageTest extends TestCase { BrokerService broker; + @Override public void setUp() throws Exception { broker = new BrokerService(); broker.setPersistent(false); broker.start(); } + @Override protected void tearDown() throws Exception { broker.stop(); } @@ -53,6 +55,7 @@ public class CompositeMessageCursorUsageTest extends TestCase { JmsTemplate jt = new JmsTemplate(cf); jt.send(compositeQueue, new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage tm = session.createTextMessage(); tm.setText("test"); @@ -61,6 +64,7 @@ public class CompositeMessageCursorUsageTest extends TestCase { }); jt.send("noCompositeA", new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage tm = session.createTextMessage(); tm.setText("test"); @@ -69,6 +73,7 @@ public class CompositeMessageCursorUsageTest extends TestCase { }); jt.send("noCompositeB", new MessageCreator() { + @Override public Message createMessage(Session session) throws JMSException { TextMessage tm = session.createTextMessage(); tm.setText("test"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/StoreUsageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/StoreUsageTest.java index a29e2a125e..a133001d4f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/StoreUsageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usage/StoreUsageTest.java @@ -39,6 +39,7 @@ public class StoreUsageTest extends EmbeddedBrokerTestSupport { return broker; } + @Override protected boolean isPersistent() { return true; } @@ -60,6 +61,7 @@ public class StoreUsageTest extends EmbeddedBrokerTestSupport { Thread.sleep(WAIT_TIME_MILLS); Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return producer.getSentCount() == producer.getMessageCount(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java index a9cd448686..e972226f01 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/AuthorizationFromAdminViewTest.java @@ -27,15 +27,18 @@ public class AuthorizationFromAdminViewTest extends org.apache.activemq.TestSupp private BrokerService broker; + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://" + getName()); } + @Override protected void setUp() throws Exception { createBroker(); super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); destroyBroker(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java index 6ae2acddd7..9bfb5ee9bf 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/BacklogNetworkCrossTalkTest.java @@ -31,6 +31,7 @@ public class BacklogNetworkCrossTalkTest extends JmsMultipleBrokersTestSupport { private static final Logger LOG = LoggerFactory.getLogger(BacklogNetworkCrossTalkTest.class); + @Override protected BrokerService createBroker(String brokerName) throws Exception { BrokerService broker = new BrokerService(); broker.setDeleteAllMessagesOnStartup(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java index 8fa255cdc5..95242ca6a9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ClientRebalanceTest.java @@ -33,6 +33,7 @@ public class ClientRebalanceTest extends JmsMultipleBrokersTestSupport { private static final Logger LOG = Logger.getLogger(ClientRebalanceTest.class); private static final String QUEUE_NAME = "Test.ClientRebalanceTest"; + @Override protected void setUp() throws Exception { setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java index c73d7ad40d..922bf70578 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CompositeConsumeTest.java @@ -32,6 +32,7 @@ public class CompositeConsumeTest extends JmsTopicSendReceiveWithTwoConnectionsT private static final Logger LOG = LoggerFactory.getLogger(CompositeConsumeTest.class); + @Override public void testSendReceive() throws Exception { messages.clear(); @@ -58,6 +59,7 @@ public class CompositeConsumeTest extends JmsTopicSendReceiveWithTwoConnectionsT /** * Returns the subscription subject */ + @Override protected String getSubject() { return getPrefix() + "FOO.BAR," + getPrefix() + "FOO.X.Y," + getPrefix() + "BAR.>"; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentDestinationCreationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentDestinationCreationTest.java index 9e44bb4c77..d1e8a4228a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentDestinationCreationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentDestinationCreationTest.java @@ -52,6 +52,7 @@ public class ConcurrentDestinationCreationTest extends org.apache.activemq.TestS broker.stop(); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString() + "?jms.watchTopicAdvisories=false&jms.closeTimeout=35000"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java index ab319f5bc8..bbd8e5d5d2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerQueueConsumerTest.java @@ -184,6 +184,7 @@ public class ConcurrentProducerQueueConsumerTest extends TestSupport { final int toReceive = toSend * numIterations * consumerCount * 2; Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { LOG.info("count: " + allMessagesList.getMessageCount()); return toReceive == allMessagesList.getMessageCount(); @@ -325,6 +326,7 @@ public class ConcurrentProducerQueueConsumerTest extends TestSupport { return brokerService; } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString()); ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java index 4bec5afa87..fbb24c711e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeQueuePrefetchTest.java @@ -26,6 +26,7 @@ public class ConsumeQueuePrefetchTest extends ConsumeTopicPrefetchTest { private static final Logger LOG = LoggerFactory.getLogger(ConsumeQueuePrefetchTest.class); + @Override protected void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java index a6af6b097e..91103cd547 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ConsumeTopicPrefetchTest.java @@ -87,6 +87,7 @@ public class ConsumeTopicPrefetchTest extends ProducerConsumerTestSupport { validateConsumerPrefetch(this.getSubject(), 0); } + @Override protected Connection createConnection() throws Exception { ActiveMQConnection connection = (ActiveMQConnection) super.createConnection(); connection.getPrefetchPolicy().setQueuePrefetch(prefetchSize); @@ -127,6 +128,7 @@ public class ConsumeTopicPrefetchTest extends ProducerConsumerTestSupport { if (dest.getName().equals(destination)) { try { Wait.waitFor(new Condition() { + @Override public boolean isSatisified() throws Exception { DestinationStatistics stats = target.getDestinationStatistics(); LOG.info("inflight for : " + target.getName() + ": " + stats.getInflight().getCount()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java index 23e67c778d..ff53ef84b3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/CreateTemporaryQueueBeforeStartTest.java @@ -67,6 +67,7 @@ public class CreateTemporaryQueueBeforeStartTest extends TestCase { final AtomicInteger count = new AtomicInteger(0); for (int i = 0; i < number; i++) { Thread thread = new Thread(new Runnable() { + @Override public void run() { try { QueueConnection connection = createConnection(); @@ -114,6 +115,7 @@ public class CreateTemporaryQueueBeforeStartTest extends TestCase { return new ActiveMQConnectionFactory(connectionUri); } + @Override protected void setUp() throws Exception { broker.setUseJmx(false); broker.setPersistent(false); @@ -124,6 +126,7 @@ public class CreateTemporaryQueueBeforeStartTest extends TestCase { super.setUp(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java index bccd3673c6..c759dcf84d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTcpTest.java @@ -53,6 +53,7 @@ public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerClos private boolean reconnectInTransportListener; + @Override public void setUp() throws Exception { broker = new BrokerService(); // let the client initiate the inactivity timeout @@ -140,11 +141,13 @@ public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerClos } + @Override public void tearDown() throws Exception { broker.stop(); broker.waitUntilStopped(); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(URISupport.removeQuery(connector.getConnectUri()) + "?useKeepAlive=false&wireFormat.maxInactivityDuration=2000"); } @@ -168,6 +171,7 @@ public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerClos assertNull("No exception: " + reconnectException, reconnectException); } + @Override public void onException(JMSException exception) { LOG.info("Exception listener exception:" + exception); if (reconnectInExceptionListener) { @@ -182,9 +186,11 @@ public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerClos } } + @Override public void onCommand(Object command) { } + @Override public void onException(IOException error) { LOG.info("Transport listener exception:" + error); if (reconnectInTransportListener) { @@ -200,9 +206,11 @@ public class DurableConsumerCloseAndReconnectTcpTest extends DurableConsumerClos } } + @Override public void transportInterupted() { } + @Override public void transportResumed() { } } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java index 7ad8a2e26d..060ce200b6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableConsumerCloseAndReconnectTest.java @@ -68,6 +68,7 @@ public class DurableConsumerCloseAndReconnectTest extends TestSupport { super.tearDown(); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(vmConnectorURI); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubDelayedUnsubscribeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubDelayedUnsubscribeTest.java index d04cad6603..a8f85f31ad 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubDelayedUnsubscribeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubDelayedUnsubscribeTest.java @@ -102,6 +102,7 @@ public class DurableSubDelayedUnsubscribeTest { // Wait for all clients to stop Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return clientManager.getClientCount() == 0; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubInBrokerNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubInBrokerNetworkTest.java index 67e836a5cb..5bc73901f9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubInBrokerNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubInBrokerNetworkTest.java @@ -46,6 +46,7 @@ public class DurableSubInBrokerNetworkTest extends NetworkTestSupport { private final String subName2 = "Subscriber2"; private final String topicName = "TEST.FOO"; + @Override protected void setUp() throws Exception { useJmx = true; super.setUp(); @@ -57,6 +58,7 @@ public class DurableSubInBrokerNetworkTest extends NetworkTestSupport { nc.start(); } + @Override protected void tearDown() throws Exception { if (remoteBroker.isStarted()) { remoteBroker.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java index f298767cf5..cadd730020 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubProcessTest.java @@ -625,6 +625,7 @@ public class DurableSubProcessTest extends org.apache.activemq.TestSupport { fail(message); } + @Override protected void setUp() throws Exception { topic = (ActiveMQTopic) createDestination(); startBroker(); @@ -636,6 +637,7 @@ public class DurableSubProcessTest extends org.apache.activemq.TestSupport { super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubsOfflineSelectorIndexUseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubsOfflineSelectorIndexUseTest.java index 8aac35ab72..bc291bca4f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubsOfflineSelectorIndexUseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubsOfflineSelectorIndexUseTest.java @@ -47,6 +47,7 @@ public class DurableSubsOfflineSelectorIndexUseTest extends org.apache.activemq. private ActiveMQTopic topic; private List exceptions = new ArrayList(); + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://" + getName(true)); connectionFactory.setWatchTopicAdvisories(false); @@ -69,6 +70,7 @@ public class DurableSubsOfflineSelectorIndexUseTest extends org.apache.activemq. return suite(DurableSubsOfflineSelectorIndexUseTest.class); } + @Override protected void setUp() throws Exception { exceptions.clear(); topic = (ActiveMQTopic) createDestination(); @@ -76,6 +78,7 @@ public class DurableSubsOfflineSelectorIndexUseTest extends org.apache.activemq. super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); destroyBroker(); @@ -124,6 +127,7 @@ public class DurableSubsOfflineSelectorIndexUseTest extends org.apache.activemq. final MessageProducer producer = sendSession.createProducer(null); Thread sendThread = new Thread() { + @Override public void run() { try { @@ -215,6 +219,7 @@ public class DurableSubsOfflineSelectorIndexUseTest extends org.apache.activemq. Listener() { } + @Override public void onMessage(Message message) { count++; if (id != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkDisconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkDisconnectTest.java index 62ddc8c933..39a8e7492b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkDisconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkDisconnectTest.java @@ -91,6 +91,7 @@ public class DurableSubscriberWithNetworkDisconnectTest extends JmsMultipleBroke // Setup consumers MessageConsumer remoteConsumer = sesSpoke.createDurableSubscriber(topic, consumerName); remoteConsumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message msg) { try { TextMessage textMsg = (TextMessage) msg; @@ -167,6 +168,7 @@ public class DurableSubscriberWithNetworkDisconnectTest extends JmsMultipleBroke sleep(600); } + @Override public void setUp() throws Exception { networkDownTimeStart = 0; inactiveDuration = 1000; @@ -179,6 +181,7 @@ public class DurableSubscriberWithNetworkDisconnectTest extends JmsMultipleBroke createBroker(new URI("broker:(tcp://localhost:61616)/" + SPOKE + options)); } + @Override public void tearDown() throws Exception { super.tearDown(); if (socketProxy != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkRestartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkRestartTest.java index eaf05355b1..5d863283d8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkRestartTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriberWithNetworkRestartTest.java @@ -192,6 +192,7 @@ public class DurableSubscriberWithNetworkRestartTest extends JmsMultipleBrokersT sleep(600); } + @Override public void setUp() throws Exception { super.setAutoFail(false); super.setUp(); @@ -204,6 +205,7 @@ public class DurableSubscriberWithNetworkRestartTest extends JmsMultipleBrokersT createBroker(new URI("broker:(tcp://localhost:61616)/" + SPOKE + options)); } + @Override protected void configureBroker(BrokerService broker) { broker.setKeepDurableSubsActive(false); broker.getManagementContext().setCreateConnector(false); @@ -219,6 +221,7 @@ public class DurableSubscriberWithNetworkRestartTest extends JmsMultipleBrokersT broker.getSystemUsage().getMemoryUsage().setLimit(100 * 1024 * 1024); } + @Override public void tearDown() throws Exception { super.tearDown(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java index 969211f18f..1c7e2ca625 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionActivationTest.java @@ -35,22 +35,26 @@ public class DurableSubscriptionActivationTest extends org.apache.activemq.TestS private Connection connection; private ActiveMQTopic topic; + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://" + getName()); } + @Override protected Connection createConnection() throws Exception { Connection rc = super.createConnection(); rc.setClientID(getName()); return rc; } + @Override protected void setUp() throws Exception { topic = (ActiveMQTopic) createDestination(); createBroker(true); super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); destroyBroker(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java index bad361019e..3270ff4638 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionReactivationTest.java @@ -67,11 +67,13 @@ public class DurableSubscriptionReactivationTest extends EmbeddedBrokerTestSuppo assertNotNull("Message not received.", message); } + @Override protected void setUp() throws Exception { useTopic = true; super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); } @@ -85,6 +87,7 @@ public class DurableSubscriptionReactivationTest extends EmbeddedBrokerTestSuppo return answer; } + @Override protected boolean isPersistent() { return true; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionRemoveOfflineTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionRemoveOfflineTest.java index e0c6aa27fc..c08c4046d6 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionRemoveOfflineTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableSubscriptionRemoveOfflineTest.java @@ -33,11 +33,13 @@ public class DurableSubscriptionRemoveOfflineTest extends EmbeddedBrokerTestSupp private static final Logger LOG = LoggerFactory.getLogger(DurableSubscriptionRemoveOfflineTest.class); + @Override protected void setUp() throws Exception { useTopic = true; super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); } @@ -108,6 +110,7 @@ public class DurableSubscriptionRemoveOfflineTest extends EmbeddedBrokerTestSupp }, 20000)); } + @Override protected boolean isPersistent() { return true; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java index 8a8839c510..e9bbc0a611 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/DurableUnsubscribeTest.java @@ -77,22 +77,26 @@ public class DurableUnsubscribeTest extends org.apache.activemq.TestSupport { assertEquals("Subscription exists.", 0, d.getConsumers().size()); } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://" + getName()); } + @Override protected Connection createConnection() throws Exception { Connection rc = super.createConnection(); rc.setClientID(getName()); return rc; } + @Override protected void setUp() throws Exception { topic = (ActiveMQTopic) createDestination(); createBroker(); super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); destroyBroker(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java index a7c91deed2..f542ecb03f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ExceptionListenerTest.java @@ -114,6 +114,7 @@ public class ExceptionListenerTest implements ExceptionListener { } } + @Override public void onException(JMSException e) { LOG.info("onException:" + e, new Throwable("FromHere")); exceptionsViaListener.add(e); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java index 5a5e4bf258..ed659719fb 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JDBCDurableSubscriptionTest.java @@ -27,6 +27,7 @@ import org.apache.derby.jdbc.EmbeddedDataSource; */ public class JDBCDurableSubscriptionTest extends DurableSubscriptionTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter() throws IOException { JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter(); EmbeddedDataSource dataSource = new EmbeddedDataSource(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java index b8358eda22..f2b1e1575d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/JournalDurableSubscriptionTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.journal.JournalPersistenceAdapterFactory; */ public class JournalDurableSubscriptionTest extends DurableSubscriptionTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter() throws IOException { File dataDir = new File("target/test-data/durableJournal"); JournalPersistenceAdapterFactory factory = new JournalPersistenceAdapterFactory(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java index cb22e712d8..23781c9c8e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/KahaDBDurableSubscriptionTest.java @@ -22,6 +22,7 @@ import org.apache.activemq.store.PersistenceAdapter; public class KahaDBDurableSubscriptionTest extends DurableSubscriptionTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter() throws IOException { return null; // use default } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/LevelDBDurableSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/LevelDBDurableSubscriptionTest.java index 3bd45038e2..3f58d6aa8c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/LevelDBDurableSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/LevelDBDurableSubscriptionTest.java @@ -27,6 +27,7 @@ import org.apache.activemq.store.PersistenceAdapter; */ public class LevelDBDurableSubscriptionTest extends DurableSubscriptionTestSupport { + @Override protected PersistenceAdapter createPersistenceAdapter() throws IOException { File dataDir = new File("target/test-data/durableLevelDB"); LevelDBStore adaptor = new LevelDBStore(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java index 75800e32c0..99fbb1ebb0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ManagedDurableSubscriptionTest.java @@ -91,6 +91,7 @@ public class ManagedDurableSubscriptionTest extends org.apache.activemq.TestSupp broker = null; } + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("vm://" + getName() + "?waitForStart=5000&create=false"); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java index 5be065d7ea..5a67c46587 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupCloseTest.java @@ -57,6 +57,7 @@ public class MessageGroupCloseTest extends TestCase { connection.start(); final String queueName = this.getClass().getSimpleName(); final Thread producerThread = new Thread() { + @Override public void run() { try { Session session = connection.createSession(true, Session.SESSION_TRANSACTED); @@ -91,6 +92,7 @@ public class MessageGroupCloseTest extends TestCase { } }; final Thread consumerThread1 = new Thread() { + @Override public void run() { try { latchMessagesCreated.await(); @@ -122,6 +124,7 @@ public class MessageGroupCloseTest extends TestCase { } }; final Thread consumerThread2 = new Thread() { + @Override public void run() { try { latchMessagesCreated.await(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java index cb88ea922a..364264965b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageGroupNewConsumerTest.java @@ -62,6 +62,7 @@ public class MessageGroupNewConsumerTest extends TestCase { connection.start(); final String queueName = this.getClass().getSimpleName(); final Thread producerThread = new Thread() { + @Override public void run() { try { Session session = connection.createSession(true, Session.SESSION_TRANSACTED); @@ -94,6 +95,7 @@ public class MessageGroupNewConsumerTest extends TestCase { } }; final Thread consumerThread1 = new Thread() { + @Override public void run() { try { Session session = connection.createSession(true, Session.SESSION_TRANSACTED); @@ -126,6 +128,7 @@ public class MessageGroupNewConsumerTest extends TestCase { } }; final Thread consumerThread2 = new Thread() { + @Override public void run() { try { latchGroupsAcquired.await(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java index 86a3c11b64..3231ec1488 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MessageReroutingTest.java @@ -36,6 +36,7 @@ public class MessageReroutingTest extends JmsMultipleBrokersTestSupport { public Destination dest; public static final int MESSAGE_COUNT = 50; + @Override protected void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java index 77cea3a9aa..5a7a42700f 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsTest.java @@ -143,6 +143,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport assertNoUnhandeledExceptions(); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); @@ -158,6 +159,7 @@ public class MultiBrokersMultiClientsTest extends JmsMultipleBrokersTestSupport consumerMap = new HashMap(); } + @Override public void uncaughtException(Thread t, Throwable e) { synchronized (unhandeledExceptions) { unhandeledExceptions.put(t, e); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java index 846e1b0ef5..816589daf8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MultiBrokersMultiClientsUsingTcpTest.java @@ -75,6 +75,7 @@ public class MultiBrokersMultiClientsUsingTcpTest extends MultiBrokersMultiClien } } + @Override public void setUp() throws Exception { super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java index 0ba292eb61..72c854a579 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/MulticastDiscoveryOnFaultyNetworkTest.java @@ -79,6 +79,7 @@ public class MulticastDiscoveryOnFaultyNetworkTest extends JmsMultipleBrokersTes brokerItem.broker.start(); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java index c348549519..d551b015d8 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkAsyncStartTest.java @@ -83,6 +83,7 @@ public class NetworkAsyncStartTest extends JmsMultipleBrokersTestSupport { Executor e = Executors.newCachedThreadPool(); e.execute(new Runnable() { + @Override public void run() { LOG.info("starting A"); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java index 5cbc11f597..2213171f42 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NetworkOfTwentyBrokersTest.java @@ -37,14 +37,17 @@ public class NetworkOfTwentyBrokersTest extends JmsMultipleBrokersTestSupport { private static final Logger LOG = LoggerFactory.getLogger(NetworkOfTwentyBrokersTest.class); // This will interconnect all brokers using multicast + @Override protected void bridgeAllBrokers() throws Exception { bridgeAllBrokers("TwentyBrokersTest", 1, false, false); } + @Override protected void bridgeAllBrokers(String groupName, int ttl, boolean suppressduplicateQueueSubs) throws Exception { bridgeAllBrokers(groupName, ttl, suppressduplicateQueueSubs, false); } + @Override protected void bridgeAllBrokers(String groupName, int ttl, boolean suppressduplicateQueueSubs, @@ -80,6 +83,7 @@ public class NetworkOfTwentyBrokersTest extends JmsMultipleBrokersTestSupport { maxSetupTime = 8000; } + @Override protected BrokerService createBroker(String brokerName) throws Exception { BrokerService broker = new BrokerService(); broker.setPersistent(false); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java index c3394fd5af..1b8617e9b5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/NoDuplicateOnTopicNetworkTest.java @@ -102,18 +102,21 @@ public class NoDuplicateOnTopicNetworkTest extends CombinationTestSupport { protected void waitForBridgeFormation() throws Exception { Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return !broker3.getNetworkConnectors().get(0).activeBridges().isEmpty(); } }); Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return !broker2.getNetworkConnectors().get(0).activeBridges().isEmpty(); } }); Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return !broker1.getNetworkConnectors().get(0).activeBridges().isEmpty(); } @@ -167,6 +170,7 @@ public class NoDuplicateOnTopicNetworkTest extends CombinationTestSupport { final CountDownLatch consumerStarted = new CountDownLatch(1); Thread producerThread = new Thread(new Runnable() { + @Override public void run() { TopicWithDuplicateMessages producer = new TopicWithDuplicateMessages(); producer.setBrokerURL(BROKER_1); @@ -182,6 +186,7 @@ public class NoDuplicateOnTopicNetworkTest extends CombinationTestSupport { final TopicWithDuplicateMessages consumer = new TopicWithDuplicateMessages(); Thread consumerThread = new Thread(new Runnable() { + @Override public void run() { consumer.setBrokerURL(BROKER_2); consumer.setTopicName(TOPIC_NAME); @@ -319,6 +324,7 @@ public class NoDuplicateOnTopicNetworkTest extends CombinationTestSupport { } consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message arg0) { TextMessage msg = (TextMessage) arg0; try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java index 8313c985aa..d47c48e452 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ObjectMessageNotSerializableTest.java @@ -54,6 +54,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { junit.textui.TestRunner.run(suite()); } + @Override protected void setUp() throws Exception { exceptions.clear(); broker = createBroker(); @@ -67,6 +68,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { final CountDownLatch consumerStarted = new CountDownLatch(1); Thread vmConsumerThread = new Thread("Consumer Thread") { + @Override public void run() { try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); @@ -95,6 +97,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { vmConsumerThread.start(); Thread producingThread = new Thread("Producing Thread") { + @Override public void run() { try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); @@ -137,6 +140,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { final CountDownLatch consumerStarted = new CountDownLatch(3); final Vector exceptions = new Vector(); Thread vmConsumerThread = new Thread("Consumer Thread") { + @Override public void run() { try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); @@ -165,6 +169,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { vmConsumerThread.start(); Thread tcpConsumerThread = new Thread("Consumer Thread") { + @Override public void run() { try { @@ -193,6 +198,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { tcpConsumerThread.start(); Thread notherVmConsumerThread = new Thread("Consumer Thread") { + @Override public void run() { try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); @@ -221,6 +227,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { notherVmConsumerThread.start(); Thread producingThread = new Thread("Producing Thread") { + @Override public void run() { try { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost"); @@ -269,6 +276,7 @@ public class ObjectMessageNotSerializableTest extends CombinationTestSupport { return broker; } + @Override protected void tearDown() throws Exception { broker.stop(); broker.waitUntilStopped(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java index fdc54c0d13..2a522379b3 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ProducerConsumerTestSupport.java @@ -34,6 +34,7 @@ public class ProducerConsumerTestSupport extends TestSupport { protected MessageConsumer consumer; protected Destination destination; + @Override protected void setUp() throws Exception { super.setUp(); connection = createConnection(); @@ -44,6 +45,7 @@ public class ProducerConsumerTestSupport extends TestSupport { connection.start(); } + @Override protected void tearDown() throws Exception { consumer.close(); producer.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java index 9481410fa8..28a1f7bf3b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnDurableTopicConsumedMessageTest.java @@ -21,6 +21,7 @@ package org.apache.activemq.usecases; */ public class PublishOnDurableTopicConsumedMessageTest extends PublishOnTopicConsumedMessageTest { + @Override protected void setUp() throws Exception { this.durable = true; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java index afa1c95e5d..c014936e1e 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageInTransactionTest.java @@ -63,6 +63,7 @@ public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCa // The warning message is not thrown back to the client // private String url = "tcp://localhost:61616"; + @Override protected void setUp() throws Exception { File dataFile = new File(dataFileRoot); recursiveDelete(dataFile); @@ -116,6 +117,7 @@ public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCa } } + @Override public synchronized void onMessage(Message m) { try { objectMessage = (ObjectMessage) m; @@ -182,6 +184,7 @@ public final class PublishOnQueueConsumedMessageInTransactionTest extends TestCa file.delete(); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java index 67128669bf..60a4d69be7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageTest.java @@ -21,6 +21,7 @@ package org.apache.activemq.usecases; */ public class PublishOnQueueConsumedMessageTest extends PublishOnTopicConsumedMessageTest { + @Override protected void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java index f9b15b2e04..e028440629 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java @@ -41,6 +41,7 @@ public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOn * @return ActiveMQConnectionFactory * @throws Exception */ + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("tcp://localhost:61616"); } @@ -50,6 +51,7 @@ public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOn * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { File journalFile = new File(JOURNAL_ROOT); recursiveDelete(journalFile); @@ -64,6 +66,7 @@ public class PublishOnQueueConsumedMessageUsingActivemqXMLTest extends PublishOn * Stops the Broker * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { LOG.info("Closing Broker"); if (broker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java index 4773dfc80c..0364c52dc5 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTemporaryQueueConsumedMessageTest.java @@ -23,6 +23,7 @@ import javax.jms.DeliveryMode; */ public class PublishOnTemporaryQueueConsumedMessageTest extends PublishOnTopicConsumedMessageTest { + @Override protected void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.NON_PERSISTENT; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java index 6a891b1193..d0ae37923a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumedMessageTest.java @@ -34,6 +34,7 @@ public class PublishOnTopicConsumedMessageTest extends JmsTopicSendReceiveWithTw private MessageProducer replyProducer; + @Override public synchronized void onMessage(Message message) { // lets resend the message somewhere else @@ -50,6 +51,7 @@ public class PublishOnTopicConsumedMessageTest extends JmsTopicSendReceiveWithTw } } + @Override protected void setUp() throws Exception { super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java index e1b3518b1f..2182143922 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java @@ -42,6 +42,7 @@ public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOn * @return ActiveMQConnectionFactory * @throws Exception */ + @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { return new ActiveMQConnectionFactory("tcp://localhost:61616"); } @@ -51,6 +52,7 @@ public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOn * * @see junit.framework.TestCase#setUp() */ + @Override protected void setUp() throws Exception { File journalFile = new File(JOURNAL_ROOT); recursiveDelete(journalFile); @@ -65,6 +67,7 @@ public class PublishOnTopicConsumerMessageUsingActivemqXMLTest extends PublishOn * Stops the Broker * @see junit.framework.TestCase#tearDown() */ + @Override protected void tearDown() throws Exception { LOG.info("Closing Broker"); if (broker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java index 3ba0bd2591..63740c3494 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueConsumerCloseAndReconnectTest.java @@ -21,6 +21,7 @@ package org.apache.activemq.usecases; */ public class QueueConsumerCloseAndReconnectTest extends DurableConsumerCloseAndReconnectTest { + @Override protected boolean isTopic() { return false; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java index 6fcd8ff145..1c8f7af805 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueDuplicatesTest.java @@ -53,6 +53,7 @@ public class QueueDuplicatesTest extends TestCase { super(name); } + @Override protected void setUp() throws Exception { String peerUrl = "peer://localhost:6099"; @@ -63,6 +64,7 @@ public class QueueDuplicatesTest extends TestCase { brokerConnection.start(); } + @Override protected void tearDown() throws Exception { if (brokerConnection != null) { brokerConnection.close(); @@ -123,6 +125,7 @@ public class QueueDuplicatesTest extends TestCase { setDaemon(false); } + @Override public void run() { try { Session session = createSession(brokerConnection); @@ -148,6 +151,7 @@ public class QueueDuplicatesTest extends TestCase { private Map msgs = new HashMap(); + @Override public void onMessage(Message message) { LOG.info(formatter.format(new Date()) + " SimpleConsumer Message Received: " + message); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java index 0293121754..316f4f6e9b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueMemoryFullMultiBrokersTest.java @@ -68,6 +68,7 @@ public class QueueMemoryFullMultiBrokersTest extends JmsMultipleBrokersTestSuppo assertEquals("inflight source:" + internalQueue, 0, internalQueue.getDestinationStatistics().getInflight().getCount()); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java index b594515e22..66f747f6c1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRedeliverTest.java @@ -21,6 +21,7 @@ package org.apache.activemq.usecases; */ public class QueueRedeliverTest extends TopicRedeliverTest { + @Override protected void setUp() throws Exception { super.setUp(); topic = false; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java index 190baa20ad..088c872757 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/QueueRepeaterTest.java @@ -69,6 +69,7 @@ public final class QueueRepeaterTest extends TestCase { consumer = consumerSession.createConsumer(queue); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message m) { try { TextMessage tm = (TextMessage) m; @@ -113,6 +114,7 @@ public final class QueueRepeaterTest extends TestCase { LOG.info("test completed, destination=" + receivedText); } + @Override protected void tearDown() throws Exception { if (connection != null) { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java index 6c83cde156..ff6c90e7e1 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ReliableReconnectTest.java @@ -56,6 +56,7 @@ public class ReliableReconnectTest extends org.apache.activemq.TestSupport { public ReliableReconnectTest() { } + @Override protected void setUp() throws Exception { this.setAutoFail(true); consumerClientId = idGen.generateId(); @@ -64,12 +65,14 @@ public class ReliableReconnectTest extends org.apache.activemq.TestSupport { destination = createDestination(getClass().getName()); } + @Override protected void tearDown() throws Exception { if (broker != null) { broker.stop(); } } + @Override public ActiveMQConnectionFactory getConnectionFactory() throws Exception { return new ActiveMQConnectionFactory(); } @@ -103,6 +106,7 @@ public class ReliableReconnectTest extends org.apache.activemq.TestSupport { protected void spawnConsumer() { Thread thread = new Thread(new Runnable() { + @Override public void run() { try { Connection consumerConnection = createConsumerConnection(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java index b3c0d9a317..b0da957ba9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest.java @@ -40,12 +40,14 @@ public class StartAndStopClientAndBrokerDoesNotLeaveThreadsRunningTest extends T void execute() throws Exception; } + @Override public void setUp() throws Exception { } public void testStartAndStopClientAndBrokerAndCheckNoThreadsAreLeft() throws Exception { runTest(new Task() { + @Override public void execute() throws Exception { BrokerService broker = new BrokerService(); broker.setPersistent(false); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java index 8fa590d3da..a7b020ae27 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerQueueNetworkTest.java @@ -294,6 +294,7 @@ public class ThreeBrokerQueueNetworkTest extends JmsMultipleBrokersTestSupport { MessageIdList msgsC = getConsumerMessages("BrokerC", clientC); waitFor(new Condition() { + @Override public boolean isSatisified() { return msgsA.getMessageCount() == MESSAGE_COUNT; } @@ -522,6 +523,7 @@ public class ThreeBrokerQueueNetworkTest extends JmsMultipleBrokersTestSupport { BrokerItem brokerB = brokers.get("BrokerA"); brokerB.broker.setPlugins(new BrokerPlugin[]{new BrokerPlugin() { + @Override public Broker installPlugin(Broker broker) throws Exception { return new BrokerFilter(broker) { @@ -621,6 +623,7 @@ public class ThreeBrokerQueueNetworkTest extends JmsMultipleBrokersTestSupport { private void verifyConsumerCount(BrokerService broker, int count, final Destination dest) throws Exception { final RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker(); waitFor(new Condition() { + @Override public boolean isSatisified() throws Exception { return !regionBroker.getDestinations(ActiveMQDestination.transform(dest)).isEmpty(); } @@ -633,6 +636,7 @@ public class ThreeBrokerQueueNetworkTest extends JmsMultipleBrokersTestSupport { private void logConsumerCount(BrokerService broker, int count, final Destination dest) throws Exception { final RegionBroker regionBroker = (RegionBroker) broker.getRegionBroker(); waitFor(new Condition() { + @Override public boolean isSatisified() throws Exception { return !regionBroker.getDestinations(ActiveMQDestination.transform(dest)).isEmpty(); } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkLevelDBTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkLevelDBTest.java index 0a2de634f1..0277c14442 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkLevelDBTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkLevelDBTest.java @@ -24,6 +24,7 @@ import org.apache.activemq.leveldb.LevelDBStore; public class ThreeBrokerVirtualTopicNetworkLevelDBTest extends ThreeBrokerVirtualTopicNetworkTest { + @Override protected void configurePersistenceAdapter(BrokerService broker) throws IOException { File dataFileDir = new File("target/test-data/leveldb/" + broker.getBrokerName()); LevelDBStore adapter = new LevelDBStore(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java index 9427bd4193..4f6122eafe 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/ThreeBrokerVirtualTopicNetworkTest.java @@ -156,6 +156,7 @@ public class ThreeBrokerVirtualTopicNetworkTest extends JmsMultipleBrokersTestSu bridge.setDecreaseNetworkConsumerPriority(true); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java index 2af86b9efc..31c4a8b754 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicProducerFlowControlTest.java @@ -52,6 +52,7 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis private BrokerService broker; + @Override protected void setUp() throws Exception { // Setup and start the broker broker = new BrokerService(); @@ -93,6 +94,7 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis broker.setDestinationPolicy(pm); } + @Override protected void tearDown() throws Exception { broker.stop(); broker.waitUntilStopped(); @@ -129,6 +131,7 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis final MessageProducer producer = session.createProducer(destination); Thread producingThread = new Thread("Producing Thread") { + @Override public void run() { try { for (long i = 0; i < numMessagesToSend; i++) { @@ -157,6 +160,7 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis producingThread.start(); Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return consumed.get() == numMessagesToSend; } @@ -166,6 +170,7 @@ public class TopicProducerFlowControlTest extends TestCase implements MessageLis assertEquals("Didn't consume all messages", numMessagesToSend, consumed.get()); assertTrue("Producer got blocked", Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return blockedCounter.get() > 0; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java index 41c3553928..0d86bbfce0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicRedeliverTest.java @@ -52,6 +52,7 @@ public class TopicRedeliverTest extends TestSupport { super(n); } + @Override protected void setUp() throws Exception { super.setUp(); topic = true; @@ -153,6 +154,7 @@ public class TopicRedeliverTest extends TestSupport { Connection connection = createConnection(); final AtomicBoolean gotException = new AtomicBoolean(); connection.setExceptionListener(new ExceptionListener() { + @Override public void onException(JMSException exception) { LOG.error("unexpected ex:" + exception); gotException.set(true); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicSubscriptionSlowConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicSubscriptionSlowConsumerTest.java index 6c2fcf8169..9bc8fe6eea 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicSubscriptionSlowConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TopicSubscriptionSlowConsumerTest.java @@ -48,6 +48,7 @@ public class TopicSubscriptionSlowConsumerTest extends TestCase { private MessageConsumer consumer; private BrokerService brokerService; + @Override public void setUp() throws Exception { brokerService = createBroker(); @@ -90,6 +91,7 @@ public class TopicSubscriptionSlowConsumerTest extends TestCase { } + @Override public void tearDown() throws Exception { consumer.close(); producer.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java index b910593c62..242110719b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransactionRollbackOrderTest.java @@ -80,6 +80,7 @@ public final class TransactionRollbackOrderTest extends TestCase { int msgCount; int msgCommittedCount; + @Override public void onMessage(Message m) { try { msgCount++; @@ -154,6 +155,7 @@ public final class TransactionRollbackOrderTest extends TestCase { } + @Override protected void tearDown() throws Exception { if (connection != null) { LOG.info("Closing the connection"); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java index 58958427ef..e16b892f4c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TransientQueueRedeliverTest.java @@ -23,6 +23,7 @@ import javax.jms.DeliveryMode; */ public class TransientQueueRedeliverTest extends TopicRedeliverTest { + @Override protected void setUp() throws Exception { super.setUp(); topic = false; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java index 708d0aa521..5524832b67 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest.java @@ -121,6 +121,7 @@ public class TwoBrokerMessageNotSentToRemoteWhenNoConsumerTest extends JmsMultip } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java index 38f682a7e9..e5d20f54d0 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerMulticastQueueTest.java @@ -56,6 +56,7 @@ public class TwoBrokerMulticastQueueTest extends CombinationTestSupport { junit.textui.TestRunner.run(suite()); } + @Override public void setUp() throws Exception { groupId = getClass().getName() + "-" + System.currentTimeMillis(); System.setProperty("groupId", groupId); @@ -63,6 +64,7 @@ public class TwoBrokerMulticastQueueTest extends CombinationTestSupport { super.setUp(); } + @Override public void tearDown() throws Exception { if (brokers != null) { for (int i = 0; i < BROKER_COUNT; i++) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java index ef39719e92..6af11455fd 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest.java @@ -21,6 +21,7 @@ import org.apache.activemq.network.NetworkConnector; public class TwoBrokerNetworkConnectorWildcardDynamicallyIncludedDestinationTest extends AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport { + @Override protected void addIncludedDestination(NetworkConnector nc) { nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.QUEUE_TYPE)); nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.TOPIC_TYPE)); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java index 9d1c4efd9f..42439ec6d2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest.java @@ -21,6 +21,7 @@ import org.apache.activemq.network.NetworkConnector; public class TwoBrokerNetworkConnectorWildcardStaticallyIncludedDestinationTest extends AbstractTwoBrokerNetworkConnectorWildcardIncludedDestinationTestSupport { + @Override protected void addIncludedDestination(NetworkConnector nc) { nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.QUEUE_TYPE)); nc.addExcludedDestination(ActiveMQDestination.createDestination("local.>", ActiveMQDestination.TOPIC_TYPE)); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java index 24212ce2a2..e779c4f424 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerNetworkLoadBalanceTest.java @@ -58,6 +58,7 @@ public class TwoBrokerNetworkLoadBalanceTest extends JmsMultipleBrokersTestSuppo final MessageIdList msgsB = getConsumerMessages("BrokerB", clientB); Wait.waitFor(new Wait.Condition() { + @Override public boolean isSatisified() throws Exception { return msgsA.getMessageCount() + msgsB.getMessageCount() == 6000; } @@ -69,6 +70,7 @@ public class TwoBrokerNetworkLoadBalanceTest extends JmsMultipleBrokersTestSuppo assertTrue("B got is fair share: " + msgsB.getMessageCount(), msgsB.getMessageCount() > 2000); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java index 90d3e0d08d..c8bf46d5e2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerQueueSendReceiveTest.java @@ -29,6 +29,7 @@ public class TwoBrokerQueueSendReceiveTest extends TwoBrokerTopicSendReceiveTest private static final Logger LOG = LoggerFactory.getLogger(TwoBrokerQueueSendReceiveTest.class); + @Override protected void setUp() throws Exception { topic = false; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java index 041c7b9a42..7091ab3c35 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest.java @@ -21,6 +21,7 @@ package org.apache.activemq.usecases; */ public class TwoBrokerTopicSendReceiveLotsOfMessagesUsingTcpTest extends TwoBrokerTopicSendReceiveUsingTcpTest { + @Override protected void setUp() throws Exception { this.messageCount = 5000; super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java index 365f5c8f0d..eae48d684b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingJavaConfigurationTest.java @@ -29,6 +29,7 @@ public class TwoBrokerTopicSendReceiveUsingJavaConfigurationTest extends TwoBrok BrokerService receiveBroker; BrokerService sendBroker; + @Override protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException { try { receiveBroker = new BrokerService(); @@ -48,6 +49,7 @@ public class TwoBrokerTopicSendReceiveUsingJavaConfigurationTest extends TwoBrok } } + @Override protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException { try { sendBroker = new BrokerService(); @@ -67,6 +69,7 @@ public class TwoBrokerTopicSendReceiveUsingJavaConfigurationTest extends TwoBrok } } + @Override protected void tearDown() throws Exception { super.tearDown(); if (sendBroker != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java index 6ea557782f..987a534a37 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerTopicSendReceiveUsingTcpTest.java @@ -32,6 +32,7 @@ public class TwoBrokerTopicSendReceiveUsingTcpTest extends TwoBrokerTopicSendRec private BrokerService receiverBroker; private BrokerService senderBroker; + @Override protected void setUp() throws Exception { BrokerFactoryBean brokerFactory; @@ -46,6 +47,7 @@ public class TwoBrokerTopicSendReceiveUsingTcpTest extends TwoBrokerTopicSendRec super.setUp(); } + @Override protected void tearDown() throws Exception { super.tearDown(); @@ -57,6 +59,7 @@ public class TwoBrokerTopicSendReceiveUsingTcpTest extends TwoBrokerTopicSendRec } } + @Override protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException { try { ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(((TransportConnector) receiverBroker.getTransportConnectors().get(0)).getConnectUri()); @@ -68,6 +71,7 @@ public class TwoBrokerTopicSendReceiveUsingTcpTest extends TwoBrokerTopicSendRec } } + @Override protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException { try { ActiveMQConnectionFactory fac = new ActiveMQConnectionFactory(((TransportConnector) senderBroker.getTransportConnectors().get(0)).getConnectUri()); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java index b4d3df9ce8..3852df7de7 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualDestDinamicallyIncludedDestTest.java @@ -178,6 +178,7 @@ public class TwoBrokerVirtualDestDinamicallyIncludedDestTest extends JmsMultiple return bi.broker.getDestination(destination).getDestinationStatistics().getMessages().getCount(); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicForwardingTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicForwardingTest.java index 369cf3c8db..4abe6872de 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicForwardingTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoBrokerVirtualTopicForwardingTest.java @@ -177,6 +177,7 @@ public class TwoBrokerVirtualTopicForwardingTest extends JmsMultipleBrokersTestS } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java index 6270fb17ca..18c44772f2 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoMulticastDiscoveryBrokerTopicSendReceiveTest.java @@ -25,14 +25,17 @@ import org.apache.activemq.ActiveMQConnectionFactory; */ public class TwoMulticastDiscoveryBrokerTopicSendReceiveTest extends TwoBrokerTopicSendReceiveTest { + @Override protected ActiveMQConnectionFactory createReceiverConnectionFactory() throws JMSException { return createConnectionFactory("org/apache/activemq/usecases/receiver-discovery.xml", "receiver", "vm://receiver"); } + @Override protected ActiveMQConnectionFactory createSenderConnectionFactory() throws JMSException { return createConnectionFactory("org/apache/activemq/usecases/sender-discovery.xml", "sender", "vm://sender"); } + @Override protected void setUp() throws Exception { System.setProperty("groupId", getClass().getName() + "-" + System.currentTimeMillis()); messageCount = 100000; diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoSecureBrokerRequestReplyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoSecureBrokerRequestReplyTest.java index 63525cddd7..3b1c6b3201 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoSecureBrokerRequestReplyTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/TwoSecureBrokerRequestReplyTest.java @@ -33,6 +33,7 @@ public class TwoSecureBrokerRequestReplyTest extends JmsMultipleBrokersTestSuppo private static final Logger LOG = LoggerFactory.getLogger(TwoSecureBrokerRequestReplyTest.class); + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java index e5c287f22a..876da5c900 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/UnlimitedEnqueueTest.java @@ -109,6 +109,7 @@ public class UnlimitedEnqueueTest { this.numberOfMessages = n; } + @Override public void run() { ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerService.getVmConnectorURI()); try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/VerifyNetworkConsumersDisconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/VerifyNetworkConsumersDisconnectTest.java index 3d5aa85fd5..5ba78d0f63 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/VerifyNetworkConsumersDisconnectTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/usecases/VerifyNetworkConsumersDisconnectTest.java @@ -241,6 +241,7 @@ public class VerifyNetworkConsumersDisconnectTest extends JmsMultipleBrokersTest }, timeout)); } + @Override public void setUp() throws Exception { super.setAutoFail(true); super.setUp(); @@ -265,6 +266,7 @@ public class VerifyNetworkConsumersDisconnectTest extends JmsMultipleBrokersTest brokerService.setDestinationPolicy(policyMap); } + @Override public void uncaughtException(Thread t, Throwable e) { synchronized (unhandledExceptions) { unhandledExceptions.put(t, e); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ProducerThread.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ProducerThread.java index 8fe00baf08..b6dde36f08 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ProducerThread.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ProducerThread.java @@ -36,6 +36,7 @@ public class ProducerThread extends Thread { this.sess = sess; } + @Override public void run() { MessageProducer producer = null; try { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java index aa8da347e2..43a585fb4a 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/util/ReflectionSupportTest.java @@ -36,6 +36,7 @@ public class ReflectionSupportTest extends TestCase { List nonFavorites = new ArrayList(); String nonFavoritesString = "[topic://test1]"; + @Override public void setUp() { favorites.add(new ActiveMQQueue("test")); favorites.add(new ActiveMQTopic("test")); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceAdapterXBeanConfigTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceAdapterXBeanConfigTest.java index 886cc0422f..b02f71a5a9 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceAdapterXBeanConfigTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceAdapterXBeanConfigTest.java @@ -43,11 +43,13 @@ public class JDBCPersistenceAdapterXBeanConfigTest extends TestCase { } + @Override protected void setUp() throws Exception { brokerService = createBroker(); brokerService.start(); } + @Override protected void tearDown() throws Exception { if (brokerService != null) { brokerService.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java index 460dc850d9..9b22634c6d 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/JDBCPersistenceXBeanConfigTest.java @@ -43,11 +43,13 @@ public class JDBCPersistenceXBeanConfigTest extends TestCase { } + @Override protected void setUp() throws Exception { brokerService = createBroker(); brokerService.start(); } + @Override protected void tearDown() throws Exception { if (brokerService != null) { brokerService.stop(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java index 516dd16731..6a6c31a18b 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithEmbeddedBrokerAndPersistenceTest.java @@ -22,6 +22,7 @@ package org.apache.activemq.xbean; */ public class MultipleTestsWithEmbeddedBrokerAndPersistenceTest extends MultipleTestsWithEmbeddedBrokerTest { + @Override protected boolean isPersistent() { return true; } diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java index 724a4c3f5f..5c08e61144 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringFactoryBeanTest.java @@ -45,6 +45,7 @@ public class MultipleTestsWithSpringFactoryBeanTest extends TestCase { public void test2() throws Exception { } + @Override protected void setUp() throws Exception { LOG.info("### starting up the test case: " + getName()); @@ -60,6 +61,7 @@ public class MultipleTestsWithSpringFactoryBeanTest extends TestCase { LOG.info("### started up the test case: " + getName()); } + @Override protected void tearDown() throws Exception { connection.close(); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java index 6ed4ce6c75..287b68308c 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithSpringXBeanFactoryBeanTest.java @@ -26,11 +26,13 @@ public class MultipleTestsWithSpringXBeanFactoryBeanTest extends MultipleTestsWi private ClassPathXmlApplicationContext context; + @Override protected BrokerService createBroker() throws Exception { context = new ClassPathXmlApplicationContext("org/apache/activemq/xbean/spring2.xml"); return (BrokerService) context.getBean("broker"); } + @Override protected void tearDown() throws Exception { super.tearDown(); if (context != null) { diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java index 8236902ce5..057cd1c4ac 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/MultipleTestsWithXBeanFactoryBeanTest.java @@ -24,6 +24,7 @@ import org.springframework.core.io.ClassPathResource; */ public class MultipleTestsWithXBeanFactoryBeanTest extends MultipleTestsWithEmbeddedBrokerTest { + @Override protected BrokerService createBroker() throws Exception { BrokerFactoryBean factory = new BrokerFactoryBean(); factory.setConfig(new ClassPathResource("org/apache/activemq/xbean/activemq2.xml")); diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java index f596d35b37..f4ae587963 100644 --- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java +++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/xbean/XBeanXmlTest.java @@ -20,6 +20,7 @@ import org.apache.activemq.broker.SpringTest; public class XBeanXmlTest extends SpringTest { + @Override public void testSenderWithSpringXml() throws Exception { assertSenderConfig("org/apache/activemq/xbean/spring.xml"); } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ActiveMQMessageHandlerTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ActiveMQMessageHandlerTest.java index 2a48be49b6..a60c251969 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ActiveMQMessageHandlerTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ActiveMQMessageHandlerTest.java @@ -53,6 +53,7 @@ import org.junit.runner.RunWith; @RunWith(BMUnitRunner.class) public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { + @Override protected boolean usePersistence() { return true; } @@ -248,6 +249,7 @@ public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { } } + @Override public void onMessage(Message message) { super.onMessage(message); // try @@ -279,6 +281,7 @@ public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { } } + @Override @Before public void setUp() throws Exception { resourceAdapter = null; @@ -287,6 +290,7 @@ public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { DummyTMLocator.startTM(); } + @Override @After public void tearDown() throws Exception { DummyTMLocator.stopTM(); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java index 4629be3309..946be53b51 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ConcurrentDeliveryCancelTest.java @@ -153,6 +153,7 @@ public class ConcurrentDeliveryCancelTest extends JMSTestBase { List threads = new LinkedList(); threads.add(new Thread("ConsumerCloser") { + @Override public void run() { try { System.out.println(Thread.currentThread().getName() + " closing consumer"); @@ -166,6 +167,7 @@ public class ConcurrentDeliveryCancelTest extends JMSTestBase { }); threads.add(new Thread("SessionCloser") { + @Override public void run() { for (ServerSession sess : serverSessions) { System.out.println("Thread " + Thread.currentThread().getName() + " starting"); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/InterruptedMessageHandlerTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/InterruptedMessageHandlerTest.java index 5858c45747..4f44f0d0da 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/InterruptedMessageHandlerTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/InterruptedMessageHandlerTest.java @@ -51,6 +51,7 @@ import org.junit.runner.RunWith; @RunWith(BMUnitRunner.class) public class InterruptedMessageHandlerTest extends ActiveMQRATestBase { + @Override protected boolean usePersistence() { return true; } @@ -189,6 +190,7 @@ public class InterruptedMessageHandlerTest extends ActiveMQRATestBase { } } + @Override public void onMessage(Message message) { super.onMessage(message); } @@ -209,6 +211,7 @@ public class InterruptedMessageHandlerTest extends ActiveMQRATestBase { } } + @Override @Before public void setUp() throws Exception { resourceAdapter = null; @@ -217,6 +220,7 @@ public class InterruptedMessageHandlerTest extends ActiveMQRATestBase { DummyTMLocator.startTM(); } + @Override @After public void tearDown() throws Exception { DummyTMLocator.stopTM(); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingLeakTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingLeakTest.java index 518bcd91be..0372878eac 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingLeakTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/PagingLeakTest.java @@ -138,6 +138,7 @@ public class PagingLeakTest extends ActiveMQTestBase { this.maxConsumed = maxConsumed; } + @Override public void run() { try { session.start(); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailoverTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailoverTest.java index d7521cbb80..060fcf0ced 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailoverTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailoverTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.extras.byteman; public class ScaleDownGroupedFailoverTest extends ScaleDownFailoverTest { + @Override protected boolean isGrouped() { return true; } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailureTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailureTest.java index a136eaced7..e5fac03f59 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailureTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/ScaleDownGroupedFailureTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.extras.byteman; public class ScaleDownGroupedFailureTest extends ScaleDownFailureTest { + @Override protected boolean isGrouped() { return true; } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/TimeoutXATest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/TimeoutXATest.java index ef8a6fa09a..462e9be8bd 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/TimeoutXATest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/byteman/TimeoutXATest.java @@ -124,6 +124,7 @@ public class TimeoutXATest extends ActiveMQTestBase { final CountDownLatch latchStore = new CountDownLatch(1000); Thread storingThread = new Thread() { + @Override public void run() { try { for (int i = 0; i < 100000; i++) { @@ -140,6 +141,7 @@ public class TimeoutXATest extends ActiveMQTestBase { removingTXEntered0.await(); Thread t = new Thread() { + @Override public void run() { try { xaSession.getXAResource().rollback(xid); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java index dead469218..e4317fba5c 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/BridgeTestBase.java @@ -208,6 +208,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { protected void setUpAdministeredObjects() throws Exception { cff0LowProducerWindow = new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); @@ -224,6 +225,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { }; cff0 = new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); @@ -239,6 +241,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { }; cff0xa = new ConnectionFactoryFactory() { + @Override public Object createConnectionFactory() throws Exception { ActiveMQXAConnectionFactory cf = (ActiveMQXAConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY)); @@ -258,6 +261,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { cff1 = new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { ActiveMQJMSConnectionFactory cf = (ActiveMQJMSConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY, params1)); @@ -273,6 +277,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { cff1xa = new ConnectionFactoryFactory() { + @Override public XAConnectionFactory createConnectionFactory() throws Exception { ActiveMQXAConnectionFactory cf = (ActiveMQXAConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.XA_CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY, params1)); @@ -290,6 +295,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { cf1xa = (XAConnectionFactory) cff1xa.createConnectionFactory(); sourceQueueFactory = new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return (Destination) context0.lookup("/queue/sourceQueue"); } @@ -298,6 +304,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { sourceQueue = (Queue) sourceQueueFactory.createDestination(); targetQueueFactory = new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return (Destination) context1.lookup("/queue/targetQueue"); } @@ -306,6 +313,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { targetQueue = (Queue) targetQueueFactory.createDestination(); sourceTopicFactory = new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return (Destination) context0.lookup("/topic/sourceTopic"); } @@ -314,6 +322,7 @@ public abstract class BridgeTestBase extends ActiveMQTestBase { sourceTopic = (Topic) sourceTopicFactory.createDestination(); localTargetQueueFactory = new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return (Destination) context0.lookup("/queue/localTargetQueue"); } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/ClusteredBridgeTestBase.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/ClusteredBridgeTestBase.java index 75c0979109..b1565d863f 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/ClusteredBridgeTestBase.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/ClusteredBridgeTestBase.java @@ -188,6 +188,7 @@ public abstract class ClusteredBridgeTestBase extends ActiveMQTestBase { public ConnectionFactoryFactory getConnectionFactoryFactory() { ConnectionFactoryFactory cff = new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { ActiveMQConnectionFactory cf = ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, liveConnector); cf.getServerLocator().setReconnectAttempts(-1); @@ -201,6 +202,7 @@ public abstract class ClusteredBridgeTestBase extends ActiveMQTestBase { public DestinationFactory getDestinationFactory(final String queueName) { DestinationFactory destFactory = new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return (Destination) liveContext.lookup("/queue/" + queueName); } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java index 6821a16868..470584614f 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeReconnectionTest.java @@ -275,6 +275,7 @@ public class JMSBridgeReconnectionTest extends BridgeTestBase { private void performCrashAndReconnect(boolean restart) throws Exception { cff1xa = new ConnectionFactoryFactory() { + @Override public Object createConnectionFactory() throws Exception { ActiveMQXAConnectionFactory cf = (ActiveMQXAConnectionFactory) ActiveMQJMSClient.createConnectionFactoryWithHA(JMSFactoryType.XA_CF, new TransportConfiguration(INVM_CONNECTOR_FACTORY, params1)); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java index f7f439d1b1..9d13e299a8 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/bridge/JMSBridgeTest.java @@ -1772,6 +1772,7 @@ public class JMSBridgeTest extends BridgeTestBase { Exception ex; + @Override public void run() { try { for (int i = 0; i < numMessages; i++) { diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java index d500f6b572..a240c12517 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/ra/MDBMultipleHandlersServerDisconnectTest.java @@ -74,6 +74,7 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase private volatile boolean playServerClosingSession = true; private volatile boolean playServerClosingConsumer = true; + @Override @Before public void setUp() throws Exception { nettyLocator = createNettyNonHALocator(); @@ -86,12 +87,14 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase DummyTMLocator.startTM(); } + @Override @After public void tearDown() throws Exception { DummyTMLocator.stopTM(); super.tearDown(); } + @Override protected boolean usePersistence() { return true; } @@ -143,6 +146,7 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase final int NUMBER_OF_MESSAGES = 1000; Thread producer = new Thread() { + @Override public void run() { try { ServerLocator locator = createInVMLocator(0); @@ -182,6 +186,7 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase final AtomicBoolean running = new AtomicBoolean(true); Thread buggerThread = new Thread() { + @Override public void run() { while (running.get()) { try { @@ -342,6 +347,7 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase isDeliveryTransacted = deliveryTransacted; } + @Override public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException { TestEndpoint retEnd = new TestEndpoint(); if (xaResource != null) { @@ -350,6 +356,7 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase return retEnd; } + @Override public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException { return isDeliveryTransacted; } @@ -390,6 +397,7 @@ public class MDBMultipleHandlersServerDisconnectTest extends ActiveMQRATestBase } + @Override public void onMessage(Message message) { Integer value = 0; diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/JMSXDeliveryCountTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/JMSXDeliveryCountTest.java index ee2c67d305..1d71598cec 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/JMSXDeliveryCountTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/JMSXDeliveryCountTest.java @@ -658,6 +658,7 @@ public class JMSXDeliveryCountTest extends JMSTestBase { this.name = name; } + @Override public void run() { try { Message lastMessage = null; @@ -705,38 +706,48 @@ public class JMSXDeliveryCountTest extends JMSTestBase { DummyXAResource() { } + @Override public void commit(final Xid arg0, final boolean arg1) throws XAException { } + @Override public void end(final Xid arg0, final int arg1) throws XAException { } + @Override public void forget(final Xid arg0) throws XAException { } + @Override public int getTransactionTimeout() throws XAException { return 0; } + @Override public boolean isSameRM(final XAResource arg0) throws XAException { return false; } + @Override public int prepare(final Xid arg0) throws XAException { return XAResource.XA_OK; } + @Override public Xid[] recover(final int arg0) throws XAException { return null; } + @Override public void rollback(final Xid arg0) throws XAException { } + @Override public boolean setTransactionTimeout(final int arg0) throws XAException { return false; } + @Override public void start(final Xid arg0, final int arg1) throws XAException { } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java index fbc975de51..a594b15f39 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/jms/xa/XATest.java @@ -1935,23 +1935,29 @@ public class XATest extends JMSTestBase { this.failOnPrepare = failOnPrepare; } + @Override public void commit(final Xid arg0, final boolean arg1) throws XAException { } + @Override public void end(final Xid arg0, final int arg1) throws XAException { } + @Override public void forget(final Xid arg0) throws XAException { } + @Override public int getTransactionTimeout() throws XAException { return 0; } + @Override public boolean isSameRM(final XAResource arg0) throws XAException { return false; } + @Override public int prepare(final Xid arg0) throws XAException { if (failOnPrepare) { throw new XAException(XAException.XAER_RMFAIL); @@ -1959,17 +1965,21 @@ public class XATest extends JMSTestBase { return XAResource.XA_OK; } + @Override public Xid[] recover(final int arg0) throws XAException { return null; } + @Override public void rollback(final Xid arg0) throws XAException { } + @Override public boolean setTransactionTimeout(final int arg0) throws XAException { return false; } + @Override public void start(final Xid arg0, final int arg1) throws XAException { } diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java index 3768f8b822..f00b6e6bd3 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolManagerTest.java @@ -50,6 +50,7 @@ public class HornetQProtocolManagerTest extends ActiveMQTestBase { ActiveMQServer server; EmbeddedJMS embeddedJMS; + @Override @Before public void setUp() throws Exception { super.setUp(); @@ -69,6 +70,7 @@ public class HornetQProtocolManagerTest extends ActiveMQTestBase { embeddedJMS.start(); } + @Override public void tearDown() throws Exception { embeddedJMS.stop(); super.tearDown(); diff --git a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolTest.java b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolTest.java index c4b17f67ac..7a33df13a3 100644 --- a/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolTest.java +++ b/tests/extra-tests/src/test/java/org/apache/activemq/artemis/tests/extras/protocols/hornetq/HornetQProtocolTest.java @@ -46,6 +46,7 @@ public class HornetQProtocolTest extends ActiveMQTestBase { private static final Logger LOG = LoggerFactory.getLogger(HornetQProtocolTest.class); + @Override @Before public void setUp() throws Exception { HashMap params = new HashMap(); @@ -62,6 +63,7 @@ public class HornetQProtocolTest extends ActiveMQTestBase { } + @Override @After public void tearDown() throws Exception { org.hornetq.core.client.impl.ServerLocatorImpl.clearThreadPools(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/SimpleNotificationService.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/SimpleNotificationService.java index 0b74c368fb..626918af1f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/SimpleNotificationService.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/SimpleNotificationService.java @@ -37,17 +37,21 @@ public class SimpleNotificationService implements NotificationService { // NotificationService implementation ---------------------------- + @Override public void addNotificationListener(final NotificationListener listener) { listeners.add(listener); } + @Override public void enableNotifications(final boolean enable) { } + @Override public void removeNotificationListener(final NotificationListener listener) { listeners.remove(listener); } + @Override public void sendNotification(final Notification notification) throws Exception { for (NotificationListener listener : listeners) { listener.onNotification(notification); @@ -68,6 +72,7 @@ public class SimpleNotificationService implements NotificationService { private final List notifications = new ArrayList(); + @Override public void onNotification(final Notification notification) { System.out.println(">>>>>>>>" + notification); notifications.add(notification); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AcknowledgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AcknowledgeTest.java index 79bf5b3fde..f6f68bf495 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AcknowledgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AcknowledgeTest.java @@ -110,6 +110,7 @@ public class AcknowledgeTest extends ActiveMQTestBase { cc.setMessageHandler(new MessageHandler() { int c = 0; + @Override public void onMessage(final ClientMessage message) { log.info("Got message " + c++); latch.countDown(); @@ -140,6 +141,7 @@ public class AcknowledgeTest extends ActiveMQTestBase { final CountDownLatch latch = new CountDownLatch(numMessages); session.start(); cc.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { try { message.acknowledge(); @@ -257,6 +259,7 @@ public class AcknowledgeTest extends ActiveMQTestBase { final CountDownLatch latch = new CountDownLatch(numMessages); session.start(); cc.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { if (latch.getCount() == 1) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ActiveMQCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ActiveMQCrashTest.java index 701bc714db..30d9e8617b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ActiveMQCrashTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ActiveMQCrashTest.java @@ -67,6 +67,7 @@ public class ActiveMQCrashTest extends ActiveMQTestBase { ClientSession session = clientSessionFactory.createSession(); session.setSendAcknowledgementHandler(new SendAcknowledgementHandler() { + @Override public void sendAcknowledged(final Message message) { ackReceived = true; } @@ -95,6 +96,7 @@ public class ActiveMQCrashTest extends ActiveMQTestBase { this.server = server; } + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { ActiveMQCrashTest.log.info("AckInterceptor.intercept " + packet); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java index 124200266f..11b8da53c7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java @@ -192,6 +192,7 @@ public class AutoCreateJmsQueueTest extends JMSTestBase { server.getSecurityRepository().addMatch("#", roles); } + @Override protected boolean useSecurity() { return true; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutogroupIdTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutogroupIdTest.java index 0866312071..97e0a8739a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutogroupIdTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutogroupIdTest.java @@ -207,6 +207,7 @@ public class AutogroupIdTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void onMessage(final ClientMessage message) { messagesReceived++; try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CommitRollbackTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CommitRollbackTest.java index 5ff6b0fed8..def7fec7a0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CommitRollbackTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/CommitRollbackTest.java @@ -172,6 +172,7 @@ public class CommitRollbackTest extends ActiveMQTestBase { final CountDownLatch latch = new CountDownLatch(numMessages); session.start(); cc.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { try { message.acknowledge(); @@ -246,6 +247,7 @@ public class CommitRollbackTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void onMessage(final ClientMessage message) { try { message.acknowledge(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConcurrentCreateDeleteProduceTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConcurrentCreateDeleteProduceTest.java index 2f34455b94..14f8826c20 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConcurrentCreateDeleteProduceTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConcurrentCreateDeleteProduceTest.java @@ -54,6 +54,7 @@ public class ConcurrentCreateDeleteProduceTest extends ActiveMQTestBase { private static final int PAGE_SIZE = 10 * 1024; + @Override @Before public void setUp() throws Exception { super.setUp(); @@ -104,6 +105,7 @@ public class ConcurrentCreateDeleteProduceTest extends ActiveMQTestBase { volatile Throwable ex; + @Override public void run() { ClientSessionFactory factory; ClientSession session; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java index 704445d378..5ac324bf83 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerCloseTest.java @@ -67,20 +67,24 @@ public class ConsumerCloseTest extends ActiveMQTestBase { Assert.assertTrue(consumer.isClosed()); expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { consumer.receive(); } }); expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { consumer.receiveImmediate(); } }); expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { } }); @@ -107,6 +111,7 @@ public class ConsumerCloseTest extends ActiveMQTestBase { final CountDownLatch waitingToProceed = new CountDownLatch(1); class MyHandler implements MessageHandler { + @Override public void onMessage(final ClientMessage message) { try { received.countDown(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerStuckTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerStuckTest.java index 8d173ae09c..2b706c0e5b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerStuckTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerStuckTest.java @@ -78,6 +78,7 @@ public class ConsumerStuckTest extends ActiveMQTestBase { final NettyConnection nettyConnection = (NettyConnection) remotingConnection.getTransportConnection(); Thread tReceive = new Thread() { + @Override public void run() { boolean first = true; try { @@ -162,6 +163,7 @@ public class ConsumerStuckTest extends ActiveMQTestBase { final NettyConnection nettyConnection = (NettyConnection) remotingConnection.getTransportConnection(); Thread tReceive = new Thread() { + @Override public void run() { boolean first = true; try { @@ -187,6 +189,7 @@ public class ConsumerStuckTest extends ActiveMQTestBase { tReceive.start(); Thread sender = new Thread() { + @Override public void run() { try ( ServerLocator locator = createNettyNonHALocator(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java index bb976f30ef..cf404c89a5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerTest.java @@ -250,6 +250,7 @@ public class ConsumerTest extends ActiveMQTestBase { sf.close(); final CountDownLatch latch = new CountDownLatch(numMessages); server.getRemotingService().addIncomingInterceptor(new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_ACKNOWLEDGE) { latch.countDown(); @@ -262,6 +263,7 @@ public class ConsumerTest extends ActiveMQTestBase { ClientSession sessionRec = sfReceive.createSession(false, true, true); ClientConsumer consumer = sessionRec.createConsumer(QUEUE); consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { try { message.acknowledge(); @@ -327,6 +329,7 @@ public class ConsumerTest extends ActiveMQTestBase { ClientConsumer consumer = session.createConsumer(QUEUE); consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage msg) { } }); @@ -348,6 +351,7 @@ public class ConsumerTest extends ActiveMQTestBase { ClientConsumer consumer = session.createConsumer(QUEUE); consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage msg) { } }); @@ -398,6 +402,7 @@ public class ConsumerTest extends ActiveMQTestBase { { consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage msg) { try { ServerLocator locatorSendx = createFactory(isNetty()).setReconnectAttempts(-1); @@ -440,6 +445,7 @@ public class ConsumerTest extends ActiveMQTestBase { } Thread tCons = new Thread() { + @Override public void run() { try { final ServerLocator locatorSend = createFactory(isNetty()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java index 4166d47ffd..f68f5a6476 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ConsumerWindowSizeTest.java @@ -318,6 +318,7 @@ public class ConsumerWindowSizeTest extends ActiveMQTestBase { for (int i = 0; i < threads.length; i++) { threads[i] = new Thread() { + @Override public void run() { try { ClientSession session = sf.createSession(false, false); @@ -1050,6 +1051,7 @@ public class ConsumerWindowSizeTest extends ActiveMQTestBase { /* (non-Javadoc) * @see MessageHandler#onMessage(ClientMessage) */ + @Override public synchronized void onMessage(final ClientMessage message) { try { String str = getTextMessage(message); @@ -1192,6 +1194,7 @@ public class ConsumerWindowSizeTest extends ActiveMQTestBase { /* (non-Javadoc) * @see MessageHandler#onMessage(ClientMessage) */ + @Override public synchronized void onMessage(final ClientMessage message) { try { log.info("received msg " + message); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java index 1a76ff4726..89764ba9cb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeadLetterAddressTest.java @@ -180,6 +180,7 @@ public class DeadLetterAddressTest extends ActiveMQTestBase { this.clientSession = clientSession; } + @Override public void onMessage(ClientMessage message) { count++; latch.countDown(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeliveryOrderTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeliveryOrderTest.java index 5cbe1c8a21..9fb960b9b2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeliveryOrderTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/DeliveryOrderTest.java @@ -158,6 +158,7 @@ public class DeliveryOrderTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void onMessage(final ClientMessage message) { int i = message.getBodyBuffer().readInt(); try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FailureDeadlockTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FailureDeadlockTest.java index aafb79e0ff..d74186f887 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FailureDeadlockTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/FailureDeadlockTest.java @@ -81,6 +81,7 @@ public class FailureDeadlockTest extends ActiveMQTestBase { RemotingConnection rc2 = ((ClientSessionInternal) ((ActiveMQSession) sess2).getCoreSession()).getConnection(); ExceptionListener listener1 = new ExceptionListener() { + @Override public void onException(final JMSException exception) { try { conn2.close(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java index 3ecee46c75..c38f8a60b3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java @@ -483,6 +483,7 @@ public class HangConsumerTest extends ActiveMQTestBase { targetCallback.sendProducerCreditsMessage(credits, address); } + @Override public void sendProducerCreditsFailMessage(int credits, SimpleString address) { targetCallback.sendProducerCreditsFailMessage(credits, address); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InterruptedLargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InterruptedLargeMessageTest.java index 1b80ec65ea..509429d4d8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InterruptedLargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/InterruptedLargeMessageTest.java @@ -496,6 +496,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase { this.execFactory = execFactory; } + @Override public Queue createQueue(long persistenceID, SimpleString address, SimpleString name, @@ -512,6 +513,7 @@ public class InterruptedLargeMessageTest extends LargeMessageTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.server.QueueFactory#setPostOffice(org.apache.activemq.artemis.core.postoffice.PostOffice) */ + @Override public void setPostOffice(PostOffice postOffice) { } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java index 28f6f14150..00841fed26 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/LargeMessageTest.java @@ -141,6 +141,7 @@ public class LargeMessageTest extends LargeMessageTestBase { consumer.setMessageHandler(new MessageHandler() { int counter = 0; + @Override public void onMessage(ClientMessage message) { message.getBodyBuffer().readByte(); // System.out.println("message:" + message); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java index 5cd6f58d5e..362f409b8e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConcurrencyTest.java @@ -154,6 +154,7 @@ public class MessageConcurrencyTest extends ActiveMQTestBase { } consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(ClientMessage message) { for (Sender sender : senders) { sender.queue.add(message); @@ -206,6 +207,7 @@ public class MessageConcurrencyTest extends ActiveMQTestBase { volatile boolean failed; + @Override public void run() { try { for (int i = 0; i < numMessages; i++) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java index fb07dc8318..7de970d80b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageConsumerRollbackTest.java @@ -47,6 +47,7 @@ public class MessageConsumerRollbackTest extends ActiveMQTestBase { private static final String outQueue = "outQueue"; + @Override @Before public void setUp() throws Exception { super.setUp(); @@ -199,6 +200,7 @@ public class MessageConsumerRollbackTest extends ActiveMQTestBase { session.start(); } + @Override public void onMessage(ClientMessage message) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java index 101383d38d..37a1fe90ae 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageDurabilityTest.java @@ -142,6 +142,7 @@ public class MessageDurabilityTest extends ActiveMQTestBase { session.start(); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createConsumer(queue); } @@ -167,6 +168,7 @@ public class MessageDurabilityTest extends ActiveMQTestBase { session.start(); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.QUEUE_DOES_NOT_EXIST, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createConsumer(queue); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingConnectionFactoryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingConnectionFactoryTest.java index b468c981b1..c4356c79c0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingConnectionFactoryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingConnectionFactoryTest.java @@ -129,6 +129,7 @@ public class MessageGroupingConnectionFactoryTest extends ActiveMQTestBase { this.acknowledge = acknowledge; } + @Override public void onMessage(final ClientMessage message) { list.add(message); if (acknowledge) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingTest.java index ab12ff2622..4aaaa0b7c0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageGroupingTest.java @@ -560,6 +560,7 @@ public class MessageGroupingTest extends ActiveMQTestBase { this.acknowledge = acknowledge; } + @Override public void onMessage(final ClientMessage message) { list.add(message); if (acknowledge) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageHandlerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageHandlerTest.java index 66aad72550..f73403a4db 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageHandlerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageHandlerTest.java @@ -88,6 +88,7 @@ public class MessageHandlerTest extends ActiveMQTestBase { class MyHandler implements MessageHandler { + @Override public void onMessage(final ClientMessage message) { try { Thread.sleep(10); @@ -156,6 +157,7 @@ public class MessageHandlerTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void onMessage(final ClientMessage message) { try { @@ -248,6 +250,7 @@ public class MessageHandlerTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void onMessage(final ClientMessage message) { try { @@ -327,6 +330,7 @@ public class MessageHandlerTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void onMessage(final ClientMessage message) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageRateTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageRateTest.java index f40f6edcd0..c581f1ab65 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageRateTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MessageRateTest.java @@ -172,6 +172,7 @@ public class MessageRateTest extends ActiveMQTestBase { consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { try { message.acknowledge(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleThreadFilterOneTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleThreadFilterOneTest.java index 41dde1043c..e8015be34a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleThreadFilterOneTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/MultipleThreadFilterOneTest.java @@ -79,6 +79,7 @@ public class MultipleThreadFilterOneTest extends ActiveMQTestBase { sendMessages(numberOfMessages / 2); } + @Override public void run() { try { sendMessages(numberOfMessages / 2); @@ -144,6 +145,7 @@ public class MultipleThreadFilterOneTest extends ActiveMQTestBase { this.nr = nr; } + @Override public void run() { try { consumerSession.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/NIOvsOIOTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/NIOvsOIOTest.java index 1848e4369d..460b581ae6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/NIOvsOIOTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/NIOvsOIOTest.java @@ -268,6 +268,7 @@ public class NIOvsOIOTest extends ActiveMQTestBase { private int count; + @Override public void onMessage(ClientMessage msg) { try { msg.acknowledge(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java index 6204973d8c..f97546a0d0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java @@ -3268,6 +3268,7 @@ public class PagingTest extends ActiveMQTestBase { int count; + @Override public void onMessage(ClientMessage message1) { try { Thread.sleep(1); @@ -4835,6 +4836,7 @@ public class PagingTest extends ActiveMQTestBase { consumerQ3.setMessageHandler(new MessageHandler() { + @Override public void onMessage(ClientMessage message) { System.out.println("Received an unexpected message"); consumerQ3Msgs.incrementAndGet(); @@ -5463,39 +5465,49 @@ public class PagingTest extends ActiveMQTestBase { this.pageUp = pageUp; } + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { } + @Override public void storeLineUp() { } + @Override public boolean waitCompletion(long timeout) throws Exception { return false; } + @Override public void waitCompletion() throws Exception { } + @Override public void replicationLineUp() { } + @Override public void replicationDone() { } + @Override public void pageSyncLineUp() { pageUp.countDown(); } + @Override public void pageSyncDone() { pageDone.countDown(); } + @Override public void executeOnCompletion(IOCallback runnable) { } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java index 9f1e9b277c..324ab17686 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerCloseTest.java @@ -48,6 +48,7 @@ public class ProducerCloseTest extends ActiveMQTestBase { Assert.assertTrue(producer.isClosed()); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { producer.send(session.createMessage(false)); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java index 2567d68ab0..093206d50a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerFlowControlTest.java @@ -226,6 +226,7 @@ public class ProducerFlowControlTest extends ActiveMQTestBase { volatile Exception exception; + @Override public void onMessage(final ClientMessage message) { try { byte[] bytesRead = new byte[messageSize]; @@ -341,6 +342,7 @@ public class ProducerFlowControlTest extends ActiveMQTestBase { final AtomicBoolean closed = new AtomicBoolean(false); Thread t = new Thread(new Runnable() { + @Override public void run() { try { Thread.sleep(500); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java index d5eea12425..69285a42b3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ProducerTest.java @@ -59,6 +59,7 @@ public class ProducerTest extends ActiveMQTestBase { public void testProducerWithSmallWindowSizeAndLargeMessage() throws Exception { final CountDownLatch latch = new CountDownLatch(1); server.getRemotingService().addIncomingInterceptor(new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { latch.countDown(); @@ -97,6 +98,7 @@ public class ProducerTest extends ActiveMQTestBase { final ClientSession session = cf.createSession(false, true, true); Thread t = new Thread() { + @Override public void run() { try { ClientProducer producer = session.createProducer(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveImmediateTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveImmediateTest.java index 6a310c6c17..c025174701 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveImmediateTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveImmediateTest.java @@ -170,6 +170,7 @@ public class ReceiveImmediateTest extends ActiveMQTestBase { final AtomicBoolean receivedAsync = new AtomicBoolean(false); consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(ClientMessage message) { receivedAsync.set(true); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveTest.java index 6ebc41f164..08fd1b82ba 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ReceiveTest.java @@ -113,6 +113,7 @@ public class ReceiveTest extends ActiveMQTestBase { ClientConsumer cc = session.createConsumer(queueA); session.start(); cc.setMessageHandler(new MessageHandler() { + @Override public void onMessage(final ClientMessage message) { } }); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java index aeb07649d6..e5a52bd00b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java @@ -273,21 +273,26 @@ public class RedeliveryConsumerTest extends ActiveMQTestBase { journal.start(); journal.load(new LoaderCallback() { + @Override public void failedTransaction(long transactionID, List records, List recordsToDelete) { } + @Override public void updateRecord(RecordInfo info) { if (info.userRecordType == JournalRecordIds.UPDATE_DELIVERY_COUNT) { updates.incrementAndGet(); } } + @Override public void deleteRecord(long id) { } + @Override public void addRecord(RecordInfo info) { } + @Override public void addPreparedTransaction(PreparedTransactionInfo preparedTransaction) { } }); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java index e087fa8c47..4c72f418fc 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RequestorTest.java @@ -166,6 +166,7 @@ public class RequestorTest extends ActiveMQTestBase { ClientConsumer requestConsumer = session.createConsumer(requestQueue); requestConsumer.setMessageHandler(new MessageHandler() { // return a message with the negative request's value + @Override public void onMessage(final ClientMessage request) { // do nothing -> no reply } @@ -190,6 +191,7 @@ public class RequestorTest extends ActiveMQTestBase { session.close(); ActiveMQAction activeMQAction = new ActiveMQAction() { + @Override public void run() throws Exception { new ClientRequestor(session, requestAddress); } @@ -229,6 +231,7 @@ public class RequestorTest extends ActiveMQTestBase { requestor.close(); ActiveMQAction activeMQAction = new ActiveMQAction() { + @Override public void run() throws Exception { requestor.request(session.createMessage(false), 500); } @@ -258,6 +261,7 @@ public class RequestorTest extends ActiveMQTestBase { this.session = session; } + @Override public void onMessage(final ClientMessage request) { try { ClientMessage reply = session.createMessage(false); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ServerLocatorConnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ServerLocatorConnectTest.java index 21711c74c8..ea91ccd00d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ServerLocatorConnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/ServerLocatorConnectTest.java @@ -161,6 +161,7 @@ public class ServerLocatorConnectTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void run() { try { csf = locator.connect(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java index 90d9cdd298..db73b84aca 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionCloseTest.java @@ -61,60 +61,70 @@ public class SessionCloseTest extends ActiveMQTestBase { Assert.assertTrue(session.isClosed()); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createProducer(); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createConsumer(RandomUtil.randomSimpleString()); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createQueue(RandomUtil.randomSimpleString(), RandomUtil.randomSimpleString(), RandomUtil.randomBoolean()); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createTemporaryQueue(RandomUtil.randomSimpleString(), RandomUtil.randomSimpleString()); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.start(); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.stop(); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.commit(); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.rollback(); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.queueQuery(RandomUtil.randomSimpleString()); } }); ActiveMQTestBase.expectActiveMQException(ActiveMQExceptionType.OBJECT_CLOSED, new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.addressQuery(RandomUtil.randomSimpleString()); } @@ -133,42 +143,49 @@ public class SessionCloseTest extends ActiveMQTestBase { Assert.assertTrue(session.isClosed()); ActiveMQTestBase.expectXAException(XAException.XA_RETRY, new ActiveMQAction() { + @Override public void run() throws XAException { session.commit(RandomUtil.randomXid(), RandomUtil.randomBoolean()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override public void run() throws XAException { session.end(RandomUtil.randomXid(), XAResource.TMSUCCESS); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override public void run() throws XAException { session.forget(RandomUtil.randomXid()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override public void run() throws XAException { session.prepare(RandomUtil.randomXid()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override public void run() throws XAException { session.recover(XAResource.TMSTARTRSCAN); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override public void run() throws XAException { session.rollback(RandomUtil.randomXid()); } }); ActiveMQTestBase.expectXAException(XAException.XAER_RMFAIL, new ActiveMQAction() { + @Override public void run() throws XAException { session.start(RandomUtil.randomXid(), XAResource.TMNOFLAGS); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionSendAcknowledgementHandlerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionSendAcknowledgementHandlerTest.java index 09be52ea48..689446ea33 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionSendAcknowledgementHandlerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionSendAcknowledgementHandlerTest.java @@ -62,6 +62,7 @@ public class SessionSendAcknowledgementHandlerTest extends ActiveMQTestBase { boolean failed = false; try { session.setSendAcknowledgementHandler(new SendAcknowledgementHandler() { + @Override public void sendAcknowledged(Message message) { } }); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionStopStartTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionStopStartTest.java index 9b6fffaf46..3d8eff66e6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionStopStartTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionStopStartTest.java @@ -176,6 +176,7 @@ public class SessionStopStartTest extends ActiveMQTestBase { int count = 0; + @Override public void onMessage(final ClientMessage message) { try { @@ -256,6 +257,7 @@ public class SessionStopStartTest extends ActiveMQTestBase { boolean started = true; + @Override public void onMessage(final ClientMessage message) { try { @@ -359,6 +361,7 @@ public class SessionStopStartTest extends ActiveMQTestBase { this.stop = stop; } + @Override public void onMessage(final ClientMessage message) { try { @@ -453,6 +456,7 @@ public class SessionStopStartTest extends ActiveMQTestBase { this.stop = stop; } + @Override public void onMessage(final ClientMessage message) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionTest.java index f4645df619..f85fe84109 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/SessionTest.java @@ -94,6 +94,7 @@ public class SessionTest extends ActiveMQTestBase { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException me) { } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java index 380b6649fd..ea2df2b134 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java @@ -174,6 +174,7 @@ public class TemporaryQueueTest extends SingleServerTestBase { final CountDownLatch latch = new CountDownLatch(1); conn.addCloseListener(new CloseListener() { + @Override public void connectionClosed() { latch.countDown(); } @@ -367,6 +368,7 @@ public class TemporaryQueueTest extends SingleServerTestBase { return latch.await(10, TimeUnit.SECONDS); } + @Override public void onMessage(ClientMessage message) { try { message.acknowledge(); @@ -458,6 +460,7 @@ public class TemporaryQueueTest extends SingleServerTestBase { final CountDownLatch pingOnServerLatch = new CountDownLatch(1); server.getRemotingService().addIncomingInterceptor(new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.PING) { pingOnServerLatch.countDown(); @@ -478,6 +481,7 @@ public class TemporaryQueueTest extends SingleServerTestBase { RemotingConnection remotingConnection = server.getRemotingService().getConnections().iterator().next(); final CountDownLatch serverCloseLatch = new CountDownLatch(1); remotingConnection.addCloseListener(new CloseListener() { + @Override public void connectionClosed() { serverCloseLatch.countDown(); } @@ -505,6 +509,7 @@ public class TemporaryQueueTest extends SingleServerTestBase { session.start(); ActiveMQAction activeMQAction = new ActiveMQAction() { + @Override public void run() throws ActiveMQException { session.createConsumer(queue); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java index beea77efda..f75539a4a8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TransientQueueTest.java @@ -200,6 +200,7 @@ public class TransientQueueTest extends SingleServerTestBase { assertTrue(exHappened); } + @Override protected ServerLocator createLocator() { return super.createLocator().setConsumerWindowSize(0).setBlockOnAcknowledge(true).setBlockOnDurableSend(false).setBlockOnNonDurableSend(false); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptor.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptor.java index 79d2de570b..cb2102384b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptor.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptor.java @@ -45,6 +45,7 @@ public class DummyInterceptor implements Interceptor { syncCounter.set(0); } + @Override public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { log.debug("DummyFilter packet = " + packet.getClass().getName()); syncCounter.addAndGet(1); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptorB.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptorB.java index 4640c38c57..998e3b4e80 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptorB.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/clientcrash/DummyInterceptorB.java @@ -38,6 +38,7 @@ public class DummyInterceptorB implements Interceptor { DummyInterceptorB.syncCounter.set(0); } + @Override public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { DummyInterceptorB.syncCounter.addAndGet(1); log.debug("DummyFilter packet = " + packet); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerTest.java index e9be8bd513..c5f091737b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerTest.java @@ -167,6 +167,7 @@ public class NodeManagerTest extends ActiveMQTestBase { this.action = action; } + @Override public void run() { try { action.performWork(manager); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java index 54d967e5e9..f0da131eda 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/BridgeTest.java @@ -378,6 +378,7 @@ public class BridgeTest extends ActiveMQTestBase { latch = new CountDownLatch(numberOfIgnores); } + @Override public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { if (ignoreSends && packet instanceof SessionSendMessage || ignoreSends && packet instanceof SessionSendLargeMessage || @@ -1460,6 +1461,7 @@ public class BridgeTest extends ActiveMQTestBase { thread = new Thread("***Server Restarter***") { + @Override public void run() { try { System.out.println("Stopping server"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/SimpleTransformer.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/SimpleTransformer.java index 5399e528c3..d9a817e551 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/SimpleTransformer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/bridge/SimpleTransformer.java @@ -23,6 +23,7 @@ import org.apache.activemq.artemis.core.server.cluster.Transformer; public class SimpleTransformer implements Transformer { + @Override public ServerMessage transform(final ServerMessage message) { SimpleString oldProp = (SimpleString) message.getObjectProperty(new SimpleString("wibble")); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java index 0f8fe5cc09..d6b836b069 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusterTestBase.java @@ -1079,6 +1079,7 @@ public abstract class ClusterTestBase extends ActiveMQTestBase { int order; + @Override public int compareTo(final OrderedConsumerHolder o) { int thisOrder = order; int otherOrder = o.order; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java index 7408ab6dec..9472202aa6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/ClusteredGroupingTest.java @@ -948,6 +948,7 @@ public class ClusteredGroupingTest extends ClusterTestBase { } + @Override public SimpleString getName() { return null; } @@ -972,31 +973,38 @@ public class ClusteredGroupingTest extends ClusterTestBase { return false; } + @Override public Response propose(final Proposal proposal) throws Exception { return null; } + @Override public void proposed(final Response response) throws Exception { System.out.println("ClusteredGroupingTest.proposed"); } + @Override public void sendProposalResponse(final Response response, final int distance) throws Exception { System.out.println("ClusteredGroupingTest.send"); } + @Override public Response receive(final Proposal proposal, final int distance) throws Exception { latch.countDown(); return null; } + @Override public void onNotification(final Notification notification) { System.out.println("ClusteredGroupingTest.onNotification " + notification); } + @Override public void addGroupBinding(final GroupBinding groupBinding) { System.out.println("ClusteredGroupingTest.addGroupBinding"); } + @Override public Response getProposal(final SimpleString fullID, boolean touchTime) { return null; } @@ -1655,6 +1663,7 @@ public class ClusteredGroupingTest extends ClusterTestBase { this.wait = wait; } + @Override public void run() { if (wait) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java index e7824a7897..7e444a01c2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/LargeMessageRedistributionTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.integration.cluster.distribution; public class LargeMessageRedistributionTest extends MessageRedistributionTest { + @Override public boolean isLargeMessage() { return true; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterTest.java index da7c40ddb2..e74e7eca94 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterTest.java @@ -27,6 +27,7 @@ public class NettyFileStorageSymmetricClusterTest extends SymmetricClusterTest { return true; } + @Override protected boolean isFileStorage() { return true; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java index 377bdacd69..90833169d3 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithBackupTest.java @@ -23,6 +23,7 @@ public class NettyFileStorageSymmetricClusterWithBackupTest extends SymmetricClu return true; } + @Override protected boolean isFileStorage() { return true; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithDiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithDiscoveryTest.java index 8b0903571b..df0dc9f496 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithDiscoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/NettyFileStorageSymmetricClusterWithDiscoveryTest.java @@ -27,6 +27,7 @@ public class NettyFileStorageSymmetricClusterWithDiscoveryTest extends Symmetric return true; } + @Override protected boolean isFileStorage() { return true; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java index 6ae436e0fb..b09377d80a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/distribution/SymmetricClusterWithDiscoveryTest.java @@ -28,6 +28,7 @@ public class SymmetricClusterWithDiscoveryTest extends SymmetricClusterTest { protected final int groupPort = ActiveMQTestBase.getUDPDiscoveryPort(); + @Override protected boolean isNetty() { return false; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java index 8ff44078df..770c538406 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/AsynchronousFailoverTest.java @@ -60,6 +60,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase { @Test public void testNonTransactional() throws Throwable { runTest(new TestRunner() { + @Override public void run() { try { doTestNonTransactional(this); @@ -77,6 +78,7 @@ public class AsynchronousFailoverTest extends FailoverTestBase { runTest(new TestRunner() { volatile boolean running = false; + @Override public void run() { try { assertFalse(running); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor.java index 4f1468aa85..9a4f3a9385 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor.java @@ -24,6 +24,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; public class DelayInterceptor implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { // Lose the send diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor2.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor2.java index 0edf2a7890..c7ce876320 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor2.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor2.java @@ -31,6 +31,7 @@ public class DelayInterceptor2 implements Interceptor { private final CountDownLatch latch = new CountDownLatch(1); + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.NULL_RESPONSE && loseResponse) { // Lose the response from the commit - only lose the first one diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor3.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor3.java index 0f1365e1c7..38be634ad9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor3.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/DelayInterceptor3.java @@ -24,6 +24,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; public class DelayInterceptor3 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_COMMIT) { // lose the commit diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java index 82456d5c5f..0a53f61033 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailBackManualTest.java @@ -181,6 +181,7 @@ public class FailBackManualTest extends FailoverTestBase { this.server = server; } + @Override public void run() { try { server.start(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java index 3ed22f1a74..a83f5a01df 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverOnFlowControlTest.java @@ -48,6 +48,7 @@ public class FailoverOnFlowControlTest extends FailoverTestBase { Interceptor interceptorClient = new Interceptor() { AtomicInteger count = new AtomicInteger(0); + @Override public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { log.debug("Intercept..." + packet.getClass().getName()); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java index 42d5211a09..305432195d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/FailoverTest.java @@ -122,6 +122,7 @@ public class FailoverTest extends FailoverTestBase { final CountDownLatch latchFailed = new CountDownLatch(1); Runnable r = new Runnable() { + @Override public void run() { for (int i = 0; i < 500; i++) { ClientMessage message = session.createMessage(true); @@ -200,6 +201,7 @@ public class FailoverTest extends FailoverTestBase { consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(ClientMessage message) { Integer counter = message.getIntProperty("counter"); received.put(counter, message); @@ -453,6 +455,7 @@ public class FailoverTest extends FailoverTestBase { consumer.setMessageHandler(new MessageHandler() { + @Override public void onMessage(ClientMessage message) { latch.countDown(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java index 430e0ecf0b..d0876b3aab 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/LiveToLiveFailoverTest.java @@ -97,6 +97,7 @@ public class LiveToLiveFailoverTest extends FailoverTest { waitForRemoteBackupSynchronization(backupServers1.values().iterator().next()); } + @Override protected final ClientSessionFactoryInternal createSessionFactoryAndWaitForTopology(ServerLocator locator, int topologyMembers) throws Exception { CountDownLatch countDownLatch = new CountDownLatch(topologyMembers * 2); @@ -151,6 +152,7 @@ public class LiveToLiveFailoverTest extends FailoverTest { return sf; } + @Override protected void createClientSessionFactory() throws Exception { if (liveServer.getServer().isStarted()) { sf = (ClientSessionFactoryInternal) createSessionFactory(locator); @@ -161,6 +163,7 @@ public class LiveToLiveFailoverTest extends FailoverTest { } } + @Override protected void createSessionFactory() throws Exception { locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setReconnectAttempts(-1); @@ -213,6 +216,7 @@ public class LiveToLiveFailoverTest extends FailoverTest { } // https://jira.jboss.org/jira/browse/HORNETQ-285 + @Override @Test public void testFailoverOnInitialConnection() throws Exception { locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setFailoverOnInitialConnection(true).setReconnectAttempts(-1); @@ -239,6 +243,7 @@ public class LiveToLiveFailoverTest extends FailoverTest { session.close(); } + @Override @Test public void testCreateNewFactoryAfterFailover() throws Exception { this.disableCheckThread(); @@ -270,9 +275,11 @@ public class LiveToLiveFailoverTest extends FailoverTest { //invalid tests for Live to Live failover //all the timeout ones aren't as we don't migrate timeouts, any failback or server restart //or replicating tests aren't either + @Override public void testLiveAndBackupBackupComesBackNewFactory() throws Exception { } + @Override public void testLiveAndBackupLiveComesBackNewFactory() { } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java index 365bd6039a..ce2e7b1fcd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/MultiThreadRandomReattachTestBase.java @@ -1232,6 +1232,7 @@ public abstract class MultiThreadRandomReattachTestBase extends MultiThreadReatt this.numMessages = numMessages; } + @Override public synchronized void onMessage(final ClientMessage message) { try { message.acknowledge(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java index 8878e58fd0..f38b7031b1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/OrderReattachTest.java @@ -203,6 +203,7 @@ public class OrderReattachTest extends ActiveMQTestBase { Exception failure; + @Override public void onMessage(final ClientMessage message) { if (count >= numMessages) { failure = new Exception("too many messages"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java index 8dc0f62257..4332a80b37 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/RandomReattachTest.java @@ -1309,6 +1309,7 @@ public class RandomReattachTest extends ActiveMQTestBase { /* (non-Javadoc) * @see MessageHandler#onMessage(ClientMessage) */ + @Override public void onMessage(ClientMessage message) { try { onMessageAssert(message); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/ReattachTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/ReattachTest.java index 12123ce47b..134377533d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/ReattachTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/reattach/ReattachTest.java @@ -140,6 +140,7 @@ public class ReattachTest extends ActiveMQTestBase { Interceptor intercept = new Interceptor() { + @Override public boolean intercept(Packet packet, RemotingConnection connection) throws ActiveMQException { System.out.println("Intercept..." + packet.getClass().getName()); @@ -293,6 +294,7 @@ public class ReattachTest extends ActiveMQTestBase { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException exception) { } } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/BackupSyncDelay.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/BackupSyncDelay.java index 6d1403525c..7e04b91419 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/BackupSyncDelay.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/BackupSyncDelay.java @@ -234,6 +234,7 @@ public class BackupSyncDelay implements Interceptor { throw new UnsupportedOperationException(); } + @Override public ChannelHandler getHandler() { throw new UnsupportedOperationException(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/MultiServerTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/MultiServerTestBase.java index a22d23eb9a..536b0ca1fc 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/MultiServerTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/MultiServerTestBase.java @@ -78,6 +78,7 @@ public class MultiServerTestBase extends ActiveMQTestBase { } } + @Override @Before public void setUp() throws Exception { super.setUp(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/SameProcessActiveMQServer.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/SameProcessActiveMQServer.java index c7854beaef..162dda426f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/SameProcessActiveMQServer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/SameProcessActiveMQServer.java @@ -39,34 +39,42 @@ public class SameProcessActiveMQServer implements TestableServer { return server.isActive(); } + @Override public void setIdentity(String identity) { server.setIdentity(identity); } + @Override public boolean isStarted() { return server.isStarted(); } + @Override public void addInterceptor(Interceptor interceptor) { server.getRemotingService().addIncomingInterceptor(interceptor); } + @Override public void removeInterceptor(Interceptor interceptor) { server.getRemotingService().removeIncomingInterceptor(interceptor); } + @Override public void start() throws Exception { server.start(); } + @Override public void stop() throws Exception { server.stop(); } + @Override public CountDownLatch crash(ClientSession... sessions) throws Exception { return crash(true, sessions); } + @Override public CountDownLatch crash(boolean waitFailure, ClientSession... sessions) throws Exception { CountDownLatch latch = new CountDownLatch(sessions.length); CountDownSessionFailureListener[] listeners = new CountDownSessionFailureListener[sessions.length]; @@ -91,6 +99,7 @@ public class SameProcessActiveMQServer implements TestableServer { return latch; } + @Override public ActiveMQServer getServer() { return server; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/TestableServer.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/TestableServer.java index b6738e0c4a..3c5b52afa1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/TestableServer.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/util/TestableServer.java @@ -27,6 +27,7 @@ public interface TestableServer extends ActiveMQComponent { ActiveMQServer getServer(); + @Override void stop() throws Exception; void setIdentity(String identity); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java index cbdc050fb2..137d252bf9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryBaseTest.java @@ -89,6 +89,7 @@ public class DiscoveryBaseTest extends ActiveMQTestBase { volatile boolean called; + @Override public void connectorsChanged(List newConnectors) { called = true; } @@ -101,12 +102,14 @@ public class DiscoveryBaseTest extends ActiveMQTestBase { List sortedExpected = new ArrayList(expected); Collections.sort(sortedExpected, new Comparator() { + @Override public int compare(TransportConfiguration o1, TransportConfiguration o2) { return o2.toString().compareTo(o1.toString()); } }); List sortedActual = new ArrayList(actual); Collections.sort(sortedActual, new Comparator() { + @Override public int compare(DiscoveryEntry o1, DiscoveryEntry o2) { return o2.getConnector().toString().compareTo(o1.getConnector().toString()); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java index 8e51dbe546..9ac3c6e2f9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/discovery/DiscoveryStayAliveTest.java @@ -48,6 +48,7 @@ public class DiscoveryStayAliveTest extends DiscoveryBaseTest { } + @Override public void tearDown() throws Exception { scheduledExecutorService.shutdown(); super.tearDown(); @@ -63,6 +64,7 @@ public class DiscoveryStayAliveTest extends DiscoveryBaseTest { final AtomicInteger errors = new AtomicInteger(0); Thread t = new Thread() { + @Override public void run() { try { dg.internalRunning(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Incoming.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Incoming.java index a517764501..6cf1ef3999 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Incoming.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Incoming.java @@ -26,6 +26,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; public class Incoming implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { System.out.println("Incoming:Packet : " + packet); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java index c915586622..79d6c72e43 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java @@ -83,6 +83,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyInterceptor1 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { SessionSendMessage p = (SessionSendMessage) packet; @@ -99,6 +100,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class InterceptUserOnCreateQueue implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.CREATE_QUEUE) { String userName = getUsername(packet, connection); @@ -129,6 +131,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class InterceptUserOnCreateConsumer implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_CREATECONSUMER) { String userName = getUsername(packet, connection); @@ -159,6 +162,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyOutgoingInterceptor1 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG) { SessionReceiveMessage p = (SessionReceiveMessage) packet; @@ -175,6 +179,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyInterceptor2 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { return false; @@ -187,6 +192,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyOutgoingInterceptor2 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { return true; @@ -202,6 +208,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyInterceptor3 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_RECEIVE_MSG) { SessionReceiveMessage p = (SessionReceiveMessage) packet; @@ -218,6 +225,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyOutgoingInterceptor3 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { SessionSendMessage p = (SessionSendMessage) packet; @@ -234,6 +242,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyInterceptor4 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { return true; @@ -250,6 +259,7 @@ public class InterceptorTest extends ActiveMQTestBase { private class MyOutgoingInterceptor4 implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { return true; @@ -306,6 +316,7 @@ public class InterceptorTest extends ActiveMQTestBase { this.wasCalled = wasCalled; } + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { SessionSendMessage p = (SessionSendMessage) packet; @@ -353,6 +364,7 @@ public class InterceptorTest extends ActiveMQTestBase { this.wasCalled = wasCalled; } + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (isForceDeliveryResponse(packet)) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Outgoing.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Outgoing.java index bc6e44aec4..7bd85dfdc7 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Outgoing.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/Outgoing.java @@ -26,6 +26,7 @@ import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection; public class Outgoing implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { System.out.println("Outgoin:Packet : " + packet); if (packet.getType() == PacketImpl.SESS_SEND) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ManualReconnectionToSingleServerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ManualReconnectionToSingleServerTest.java index 1d869011e3..a8a44e0db9 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ManualReconnectionToSingleServerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/ManualReconnectionToSingleServerTest.java @@ -73,6 +73,7 @@ public class ManualReconnectionToSingleServerTest extends ActiveMQTestBase { private static final int NUM = 20; private final ExceptionListener exceptionListener = new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); disconnect(); @@ -231,6 +232,7 @@ public class ManualReconnectionToSingleServerTest extends ActiveMQTestBase { private int count = 0; + @Override public void onMessage(final Message msg) { count++; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/GroupIDTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/GroupIDTest.java index 861b568dfd..a02dec0dc1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/GroupIDTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/GroupIDTest.java @@ -37,6 +37,7 @@ public class GroupIDTest extends GroupingTest { return cf; } + @Override @Test public void testManyGroups() { // this test does not make sense here diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NewQueueRequestorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NewQueueRequestorTest.java index c3e2b1d340..1fec02b06a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NewQueueRequestorTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/NewQueueRequestorTest.java @@ -90,6 +90,7 @@ public class NewQueueRequestorTest extends JMSTestBase { sender = sess.createSender(null); } + @Override public void onMessage(final Message m) { try { Destination queue = m.getJMSReplyTo(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/RemoteConnectionStressTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/RemoteConnectionStressTest.java index ea0526a28f..c457d7341b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/RemoteConnectionStressTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/RemoteConnectionStressTest.java @@ -46,6 +46,7 @@ public class RemoteConnectionStressTest extends ActiveMQTestBase { MBeanServer mbeanServer; JMSServerManagerImpl jmsServer; + @Override @Before public void setUp() throws Exception { super.setUp(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java index 084060f5fb..8ce9ced843 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java @@ -47,6 +47,7 @@ import org.junit.Test; */ public class TopicCleanupTest extends JMSTestBase { + @Override protected boolean usePersistence() { return true; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/BindingsClusterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/BindingsClusterTest.java index 674c9f15d7..38b8ad6250 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/BindingsClusterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/BindingsClusterTest.java @@ -59,6 +59,7 @@ public class BindingsClusterTest extends JMSClusteredTestBase { return Arrays.asList(new Object[][]{{true}, {false}}); } + @Override @Before public void setUp() throws Exception { //todo fix if needed diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java index a4e867c86a..d2139e9896 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverListenerTest.java @@ -337,6 +337,7 @@ public class JMSFailoverListenerTest extends ActiveMQTestBase { Assert.assertTrue(eventTypeList.size() >= elements); } + @Override public void failoverEvent(FailoverEventType eventType) { eventTypeList.add(eventType); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java index cf0502d5b3..2c1edb6f7a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSFailoverTest.java @@ -360,6 +360,7 @@ public class JMSFailoverTest extends ActiveMQTestBase { // The thread that will fail the server Thread spoilerThread = new Thread() { + @Override public void run() { flagAlign.countDown(); // a large timeout just to help in case of debugging @@ -505,6 +506,7 @@ public class JMSFailoverTest extends ActiveMQTestBase { volatile JMSException e; + @Override public void onException(final JMSException e) { this.e = e; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java index 3c429d9edf..26dea90847 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/JMSReconnectTest.java @@ -306,6 +306,7 @@ public class JMSReconnectTest extends ActiveMQTestBase { volatile JMSException e; + @Override public void onException(final JMSException e) { this.e = e; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java index 1c7bf20bc5..e2adebbc3a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/LargeMessageOverBridgeTest.java @@ -164,6 +164,7 @@ public class LargeMessageOverBridgeTest extends JMSClusteredTestBase { } } + @Override protected Configuration createConfigServer(final int source, final int destination) throws Exception { Configuration config = super.createConfigServer(source, destination); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java index 6475a1334f..b98bf07042 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/cluster/MultipleThreadsOpeningTest.java @@ -47,6 +47,7 @@ public class MultipleThreadsOpeningTest extends JMSClusteredTestBase { int errors = 0; + @Override public void run() { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java index 38f2ff7529..f2e11f9396 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionFactoryOnGCest.java @@ -37,6 +37,7 @@ public class CloseConnectionFactoryOnGCest extends JMSTestBase { final AtomicInteger valueGC = new AtomicInteger(0); ServerLocatorImpl.finalizeCallback = new Runnable() { + @Override public void run() { valueGC.incrementAndGet(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java index adb92e7f19..5cc0baa17d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/CloseConnectionOnGCTest.java @@ -67,6 +67,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase { final CountDownLatch latch = new CountDownLatch(1); Iterator connectionIterator = server.getRemotingService().getConnections().iterator(); connectionIterator.next().addCloseListener(new CloseListener() { + @Override public void connectionClosed() { latch.countDown(); } @@ -97,6 +98,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase { while (connectionIterator.hasNext()) { RemotingConnection remotingConnection = connectionIterator.next(); remotingConnection.addCloseListener(new CloseListener() { + @Override public void connectionClosed() { latch.countDown(); } @@ -136,6 +138,7 @@ public class CloseConnectionOnGCTest extends JMSTestBase { while (connectionIterator.hasNext()) { RemotingConnection remotingConnection = connectionIterator.next(); remotingConnection.addCloseListener(new CloseListener() { + @Override public void connectionClosed() { latch.countDown(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java index 26f17844bf..6e62231e1d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/connection/ExceptionListenerTest.java @@ -79,6 +79,7 @@ public class ExceptionListenerTest extends ActiveMQTestBase { this.latch = latch; } + @Override public synchronized void onException(final JMSException arg0) { numCalls++; latch.countDown(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java index fe0276ce24..ae4d041002 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/consumer/ConsumerTest.java @@ -207,6 +207,7 @@ public class ConsumerTest extends JMSTestBase { int count = 0; + @Override public void onMessage(Message msg) { try { TextMessage txtmsg = (TextMessage) msg; @@ -466,6 +467,7 @@ public class ConsumerTest extends JMSTestBase { jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageConsumer consumer = session.createConsumer(jBossQueue); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message msg) { } }); @@ -481,6 +483,7 @@ public class ConsumerTest extends JMSTestBase { jBossQueue = ActiveMQJMSClient.createQueue(ConsumerTest.Q_NAME); MessageConsumer consumer = session.createConsumer(jBossQueue); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message msg) { } }); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java index c98f94207a..a17e8955d5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSQueueControlUsingJMSTest.java @@ -88,86 +88,107 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest { } } + @Override public boolean changeMessagePriority(final String messageID, final int newPriority) throws Exception { return (Boolean) proxy.invokeOperation("changeMessagePriority", messageID, newPriority); } + @Override public int changeMessagesPriority(final String filter, final int newPriority) throws Exception { return (Integer) proxy.invokeOperation("changeMessagesPriority", filter, newPriority); } + @Override public long countMessages(final String filter) throws Exception { return ((Number) proxy.invokeOperation("countMessages", filter)).intValue(); } + @Override public boolean expireMessage(final String messageID) throws Exception { return (Boolean) proxy.invokeOperation("expireMessage", messageID); } + @Override public int expireMessages(final String filter) throws Exception { return (Integer) proxy.invokeOperation("expireMessages", filter); } + @Override public int getConsumerCount() { return (Integer) proxy.retrieveAttributeValue("consumerCount"); } + @Override public String getDeadLetterAddress() { return (String) proxy.retrieveAttributeValue("deadLetterAddress"); } + @Override public int getDeliveringCount() { return (Integer) proxy.retrieveAttributeValue("deliveringCount"); } + @Override public String getExpiryAddress() { return (String) proxy.retrieveAttributeValue("expiryAddress"); } + @Override public String getFirstMessageAsJSON() throws Exception { return (String) proxy.retrieveAttributeValue("firstMessageAsJSON"); } + @Override public Long getFirstMessageTimestamp() throws Exception { return (Long) proxy.retrieveAttributeValue("firstMessageTimestamp"); } + @Override public Long getFirstMessageAge() throws Exception { return (Long) proxy.retrieveAttributeValue("firstMessageAge"); } + @Override public long getMessageCount() { return ((Number) proxy.retrieveAttributeValue("messageCount")).longValue(); } + @Override public long getMessagesAdded() { return (Integer) proxy.retrieveAttributeValue("messagesAdded"); } + @Override public String getName() { return (String) proxy.retrieveAttributeValue("name"); } + @Override public long getScheduledCount() { return (Long) proxy.retrieveAttributeValue("scheduledCount"); } + @Override public boolean isTemporary() { return (Boolean) proxy.retrieveAttributeValue("temporary"); } + @Override public String listMessageCounter() throws Exception { return (String) proxy.invokeOperation("listMessageCounter"); } + @Override public void resetMessageCounter() throws Exception { proxy.invokeOperation("resetMessageCounter"); } + @Override public String listMessageCounterAsHTML() throws Exception { return (String) proxy.invokeOperation("listMessageCounterAsHTML"); } + @Override public String listMessageCounterHistory() throws Exception { return (String) proxy.invokeOperation("listMessageCounterHistory"); } @@ -176,10 +197,12 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest { return (Boolean) proxy.invokeOperation("retryMessage",messageID); } + @Override public int retryMessages() throws Exception { return (Integer) proxy.invokeOperation("retryMessages"); } + @Override public boolean retryMessage(final String messageID) throws Exception { return (Boolean) proxy.invokeOperation("retryMessage",messageID); } @@ -204,10 +227,12 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest { return null; } + @Override public String listMessageCounterHistoryAsHTML() throws Exception { return (String) proxy.invokeOperation("listMessageCounterHistoryAsHTML"); } + @Override public Map[] listMessages(final String filter) throws Exception { Object[] res = (Object[]) proxy.invokeOperation("listMessages", filter); Map[] results = new Map[res.length]; @@ -217,40 +242,49 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest { return results; } + @Override public String listMessagesAsJSON(final String filter) throws Exception { return (String) proxy.invokeOperation("listMessagesAsJSON", filter); } + @Override public boolean moveMessage(String messageID, String otherQueueName, boolean rejectDuplicates) throws Exception { return (Boolean) proxy.invokeOperation("moveMessage", messageID, otherQueueName, rejectDuplicates); } + @Override public int moveMessages(String filter, String otherQueueName, boolean rejectDuplicates) throws Exception { return (Integer) proxy.invokeOperation("moveMessages", filter, otherQueueName, rejectDuplicates); } + @Override public int moveMessages(final String filter, final String otherQueueName) throws Exception { return (Integer) proxy.invokeOperation("moveMessages", filter, otherQueueName); } + @Override public boolean moveMessage(final String messageID, final String otherQueueName) throws Exception { return (Boolean) proxy.invokeOperation("moveMessage", messageID, otherQueueName); } + @Override public int removeMessages(final String filter) throws Exception { return (Integer) proxy.invokeOperation("removeMessages", filter); } + @Override public boolean removeMessage(final String messageID) throws Exception { return (Boolean) proxy.invokeOperation("removeMessage", messageID); } + @Override public boolean sendMessageToDeadLetterAddress(final String messageID) throws Exception { return (Boolean) proxy.invokeOperation("sendMessageToDeadLetterAddress", messageID); } + @Override public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception { return (Integer) proxy.invokeOperation("sendMessagesToDeadLetterAddress", filterStr); } @@ -263,36 +297,44 @@ public class JMSQueueControlUsingJMSTest extends JMSQueueControlTest { proxy.invokeOperation("setExpiryAddress", expiryAddress); } + @Override public String getAddress() { return (String) proxy.retrieveAttributeValue("address"); } + @Override public boolean isPaused() throws Exception { return (Boolean) proxy.invokeOperation("isPaused"); } + @Override public void pause() throws Exception { proxy.invokeOperation("pause"); } + @Override public void resume() throws Exception { proxy.invokeOperation("resume"); } + @Override public String getSelector() { return (String) proxy.retrieveAttributeValue("selector"); } + @Override public void addBinding(String jndi) throws Exception { // TODO: Add a test for this proxy.invokeOperation("addBindings", jndi); } + @Override public String[] getRegistryBindings() { // TODO: Add a test for this return null; } + @Override public String listConsumersAsJSON() throws Exception { return (String) proxy.invokeOperation("listConsumersAsJSON"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java index b1a7e6da9d..194bce9a45 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java @@ -851,6 +851,7 @@ public class JMSServerControl2Test extends ManagementTestBase { final CountDownLatch exceptionLatch = new CountDownLatch(1); connection.setExceptionListener(new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); } @@ -899,6 +900,7 @@ public class JMSServerControl2Test extends ManagementTestBase { final CountDownLatch exceptionLatch = new CountDownLatch(1); connection.setExceptionListener(new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); } @@ -966,6 +968,7 @@ public class JMSServerControl2Test extends ManagementTestBase { final CountDownLatch exceptionLatch = new CountDownLatch(1); connection.setExceptionListener(new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); } @@ -1046,12 +1049,14 @@ public class JMSServerControl2Test extends ManagementTestBase { final CountDownLatch exceptionLatch = new CountDownLatch(2); connection.setExceptionListener(new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); } }); connection2.setExceptionListener(new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); } @@ -1125,6 +1130,7 @@ public class JMSServerControl2Test extends ManagementTestBase { final CountDownLatch exceptionLatch = new CountDownLatch(1); connection.setExceptionListener(new ExceptionListener() { + @Override public void onException(final JMSException e) { exceptionLatch.countDown(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java index 8200791c63..bf06eb6d88 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlTest.java @@ -681,6 +681,7 @@ public class JMSServerControlTest extends ManagementTestBase { server.getConfiguration().getConnectorConfigurations().put("tst", new TransportConfiguration(INVM_CONNECTOR_FACTORY)); doCreateConnectionFactory(new ConnectionFactoryCreator() { + @Override public void createConnectionFactory(final JMSServerControl control, final String cfName, final Object[] bindings) throws Exception { @@ -1038,34 +1039,41 @@ public class JMSServerControlTest extends ManagementTestBase { this.delegate = delegate; } + @Override public void storeDestination(PersistedDestination destination) throws Exception { destinationMap.put(destination.getName(), destination); delegate.storeDestination(destination); } + @Override public void deleteDestination(PersistedType type, String name) throws Exception { destinationMap.remove(name); delegate.deleteDestination(type, name); } + @Override public List recoverDestinations() { return delegate.recoverDestinations(); } + @Override public void deleteConnectionFactory(String connectionFactory) throws Exception { connectionFactoryMap.remove(connectionFactory); delegate.deleteConnectionFactory(connectionFactory); } + @Override public void storeConnectionFactory(PersistedConnectionFactory connectionFactory) throws Exception { connectionFactoryMap.put(connectionFactory.getName(), connectionFactory); delegate.storeConnectionFactory(connectionFactory); } + @Override public List recoverConnectionFactories() { return delegate.recoverConnectionFactories(); } + @Override public void addBindings(PersistedType type, String name, String... address) throws Exception { persistedJNDIMap.putIfAbsent(name, new ArrayList()); for (String ad : address) { @@ -1074,32 +1082,39 @@ public class JMSServerControlTest extends ManagementTestBase { delegate.addBindings(type, name, address); } + @Override public List recoverPersistedBindings() throws Exception { return delegate.recoverPersistedBindings(); } + @Override public void deleteBindings(PersistedType type, String name, String address) throws Exception { persistedJNDIMap.get(name).remove(address); delegate.deleteBindings(type, name, address); } + @Override public void deleteBindings(PersistedType type, String name) throws Exception { persistedJNDIMap.get(name).clear(); delegate.deleteBindings(type, name); } + @Override public void start() throws Exception { delegate.start(); } + @Override public void stop() throws Exception { delegate.stop(); } + @Override public boolean isStarted() { return delegate.isStarted(); } + @Override public void load() throws Exception { delegate.load(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java index abf4d3fc84..c2ee227ef6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControlUsingJMSTest.java @@ -154,26 +154,32 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { return new JMSServerControl() { + @Override public boolean closeConnectionsForAddress(final String ipAddress) throws Exception { return (Boolean) proxy.invokeOperation("closeConnectionsForAddress", ipAddress); } + @Override public boolean closeConsumerConnectionsForAddress(final String address) throws Exception { return (Boolean) proxy.invokeOperation("closeConsumerConnectionsForAddress", address); } + @Override public boolean closeConnectionsForUser(final String userName) throws Exception { return (Boolean) proxy.invokeOperation("closeConnectionsForUser", userName); } + @Override public boolean createQueue(final String name) throws Exception { return (Boolean) proxy.invokeOperation("createQueue", name); } + @Override public boolean createQueue(String name, String jndiBindings, String selector) throws Exception { return (Boolean) proxy.invokeOperation("createQueue", name, jndiBindings, selector); } + @Override public boolean createQueue(String name, String jndiBindings, String selector, @@ -181,14 +187,17 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { return (Boolean) proxy.invokeOperation("createQueue", name, jndiBindings, selector, durable); } + @Override public boolean createTopic(final String name) throws Exception { return (Boolean) proxy.invokeOperation("createTopic", name); } + @Override public void destroyConnectionFactory(final String name) throws Exception { proxy.invokeOperation("destroyConnectionFactory", name); } + @Override public boolean destroyQueue(final String name) throws Exception { return (Boolean) proxy.invokeOperation("destroyQueue", name); } @@ -198,90 +207,112 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { return (Boolean) proxy.invokeOperation("destroyQueue", name, removeConsumers); } + @Override public boolean destroyTopic(final String name) throws Exception { return (Boolean) proxy.invokeOperation("destroyTopic", name); } + @Override public boolean destroyTopic(final String name, boolean removeConsumers) throws Exception { return (Boolean) proxy.invokeOperation("destroyTopic", name, removeConsumers); } + @Override public String getVersion() { return (String) proxy.retrieveAttributeValue("version"); } + @Override public boolean isStarted() { return (Boolean) proxy.retrieveAttributeValue("started"); } + @Override public String[] getQueueNames() { return JMSServerControlUsingJMSTest.toStringArray((Object[]) proxy.retrieveAttributeValue("queueNames")); } + @Override public String[] getTopicNames() { return JMSServerControlUsingJMSTest.toStringArray((Object[]) proxy.retrieveAttributeValue("topicNames")); } + @Override public String[] getConnectionFactoryNames() { return JMSServerControlUsingJMSTest.toStringArray((Object[]) proxy.retrieveAttributeValue("connectionFactoryNames")); } + @Override public String[] listConnectionIDs() throws Exception { return (String[]) proxy.invokeOperation("listConnectionIDs"); } + @Override public String listConnectionsAsJSON() throws Exception { return (String) proxy.invokeOperation("listConnectionsAsJSON"); } + @Override public String listConsumersAsJSON(String connectionID) throws Exception { return (String) proxy.invokeOperation("listConsumersAsJSON", connectionID); } + @Override public String[] listRemoteAddresses() throws Exception { return (String[]) proxy.invokeOperation("listRemoteAddresses"); } + @Override public String[] listRemoteAddresses(final String ipAddress) throws Exception { return (String[]) proxy.invokeOperation("listRemoteAddresses", ipAddress); } + @Override public String[] listSessions(final String connectionID) throws Exception { return (String[]) proxy.invokeOperation("listSessions", connectionID); } + @Override public boolean createQueue(String name, String jndiBinding) throws Exception { return (Boolean) proxy.invokeOperation("createQueue", name, jndiBinding); } + @Override public boolean createTopic(String name, String jndiBinding) throws Exception { return (Boolean) proxy.invokeOperation("createTopic", name, jndiBinding); } + @Override public String[] listTargetDestinations(String sessionID) throws Exception { return null; } + @Override public String getLastSentMessageID(String sessionID, String address) throws Exception { return null; } + @Override public String getSessionCreationTime(String sessionID) throws Exception { return (String) proxy.invokeOperation("getSessionCreationTime", sessionID); } + @Override public String listSessionsAsJSON(String connectionID) throws Exception { return (String) proxy.invokeOperation("listSessionsAsJSON", connectionID); } + @Override public String listPreparedTransactionDetailsAsJSON() throws Exception { return (String) proxy.invokeOperation("listPreparedTransactionDetailsAsJSON"); } + @Override public String listPreparedTransactionDetailsAsHTML() throws Exception { return (String) proxy.invokeOperation("listPreparedTransactionDetailsAsHTML"); } + @Override public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, @@ -292,6 +323,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { } + @Override public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, @@ -301,10 +333,12 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { proxy.invokeOperation("createConnectionFactory", name, ha, useDiscovery, cfType, connectors, jndiBindings); } + @Override public String listAllConsumersAsJSON() throws Exception { return (String) proxy.invokeOperation("listAllConsumersAsJSON"); } + @Override public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, @@ -343,6 +377,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { proxy.invokeOperation("createConnectionFactory", name, ha, useDiscovery, cfType, connectors, jndiBindings, clientID, clientFailureCheckPeriod, connectionTTL, callTimeout, callFailoverTimeout, minLargeMessageSize, compressLargeMessages, consumerWindowSize, consumerMaxRate, confirmationWindowSize, producerWindowSize, producerMaxRate, blockOnAcknowledge, blockOnDurableSend, blockOnNonDurableSend, autoGroup, preAcknowledge, loadBalancingPolicyClassName, transactionBatchSize, dupsOKBatchSize, useGlobalPools, scheduledThreadPoolMaxSize, threadPoolMaxSize, retryInterval, retryIntervalMultiplier, maxRetryInterval, reconnectAttempts, failoverOnInitialConnection, groupId); } + @Override public void createConnectionFactory(String name, boolean ha, boolean useDiscovery, @@ -381,6 +416,7 @@ public class JMSServerControlUsingJMSTest extends JMSServerControlTest { proxy.invokeOperation("createConnectionFactory", name, ha, useDiscovery, cfType, connectors, jndiBindings, clientID, clientFailureCheckPeriod, connectionTTL, callTimeout, callFailoverTimeout, minLargeMessageSize, compressLargeMessages, consumerWindowSize, consumerMaxRate, confirmationWindowSize, producerWindowSize, producerMaxRate, blockOnAcknowledge, blockOnDurableSend, blockOnNonDurableSend, autoGroup, preAcknowledge, loadBalancingPolicyClassName, transactionBatchSize, dupsOKBatchSize, useGlobalPools, scheduledThreadPoolMaxSize, threadPoolMaxSize, retryInterval, retryIntervalMultiplier, maxRetryInterval, reconnectAttempts, failoverOnInitialConnection, groupId); } + @Override public String closeConnectionWithClientID(String clientID) throws Exception { return (String) proxy.invokeOperation("closeConnectionWithClientID", clientID); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java index 2912c00188..79c0e83a87 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSUtil.java @@ -207,6 +207,7 @@ public class JMSUtil { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(ActiveMQException exception) { System.out.println("MyListener.beforeReconnect"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java index 2bac6de5b0..99679e0185 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/NIOJournalCompactTest.java @@ -1642,6 +1642,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase { final LinkedList survivingMsgs = new LinkedList(); Runnable producerRunnable = new Runnable() { + @Override public void run() { try { while (running.get()) { @@ -1671,11 +1672,14 @@ public class NIOJournalCompactTest extends JournalImplTestBase { storage.commit(tx); ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { deleteExecutor.execute(new Runnable() { + @Override public void run() { try { for (long messageID : values) { @@ -1702,6 +1706,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase { }; Runnable compressRunnable = new Runnable() { + @Override public void run() { try { while (running.get()) { @@ -1751,6 +1756,7 @@ public class NIOJournalCompactTest extends JournalImplTestBase { File[] files = testDir.listFiles(new FilenameFilter() { + @Override public boolean accept(File dir, String name) { return name.startsWith(filePrefix) && name.endsWith(fileExtension); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java index cc49dc6c78..978406aefb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/journal/ValidateTransactionHealthTest.java @@ -182,11 +182,13 @@ public class ValidateTransactionHealthTest extends ActiveMQTestBase { this.expectedRecords = expectedRecords; } + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { numberOfPreparedTransactions++; } + @Override public void addRecord(final RecordInfo info) { if (info.id == lastID) { System.out.println("id = " + info.id + " last id = " + lastID); @@ -205,16 +207,19 @@ public class ValidateTransactionHealthTest extends ActiveMQTestBase { } + @Override public void deleteRecord(final long id) { numberOfDeletes++; } + @Override public void updateRecord(final RecordInfo info) { numberOfUpdates++; } + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { @@ -265,18 +270,23 @@ public class ValidateTransactionHealthTest extends ActiveMQTestBase { journal.start(); journal.load(new LoaderCallback() { + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { } + @Override public void addRecord(final RecordInfo info) { } + @Override public void deleteRecord(final long id) { } + @Override public void updateRecord(final RecordInfo info) { } + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java index f82b677254..0d51d9c9a8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/largemessage/LargeMessageTestBase.java @@ -228,6 +228,7 @@ public abstract class LargeMessageTestBase extends ActiveMQTestBase { MessageHandler handler = new MessageHandler() { int msgCounter; + @Override public void onMessage(final ClientMessage message) { try { if (delayDelivery > 0) { @@ -673,6 +674,7 @@ public abstract class LargeMessageTestBase extends ActiveMQTestBase { pos = 0; } + @Override public TestLargeMessageInputStream clone() { return new TestLargeMessageInputStream(this); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java index 95cbe5ccab..d5c7b65e94 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/AcceptorControlUsingCoreTest.java @@ -52,27 +52,33 @@ public class AcceptorControlUsingCoreTest extends AcceptorControlTest { private final CoreMessagingProxy proxy = new CoreMessagingProxy(session, ResourceNames.CORE_ACCEPTOR + name); + @Override public String getFactoryClassName() { return (String) proxy.retrieveAttributeValue("factoryClassName"); } + @Override public String getName() { return (String) proxy.retrieveAttributeValue("name"); } + @Override @SuppressWarnings("unchecked") public Map getParameters() { return (Map) proxy.retrieveAttributeValue("parameters"); } + @Override public boolean isStarted() { return (Boolean) proxy.retrieveAttributeValue("started"); } + @Override public void start() throws Exception { proxy.invokeOperation("start"); } + @Override public void stop() throws Exception { proxy.invokeOperation("stop"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java index a7a5181eda..9ed5433457 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ActiveMQServerControlUsingCoreTest.java @@ -60,6 +60,7 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes session.start(); } + @Override protected void restartServer() throws Exception { session.close(); @@ -96,30 +97,37 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes private final CoreMessagingProxy proxy = new CoreMessagingProxy(session, ResourceNames.CORE_SERVER); + @Override public boolean isSharedStore() { return (Boolean) proxy.retrieveAttributeValue("sharedStore"); } + @Override public boolean closeConnectionsForAddress(final String ipAddress) throws Exception { return (Boolean) proxy.invokeOperation("closeConnectionsForAddress", ipAddress); } + @Override public boolean closeConsumerConnectionsForAddress(final String address) throws Exception { return (Boolean) proxy.invokeOperation("closeConsumerConnectionsForAddress", address); } + @Override public boolean closeConnectionsForUser(final String userName) throws Exception { return (Boolean) proxy.invokeOperation("closeConnectionsForUser", userName); } + @Override public boolean commitPreparedTransaction(final String transactionAsBase64) throws Exception { return (Boolean) proxy.invokeOperation("commitPreparedTransaction", transactionAsBase64); } + @Override public void createQueue(final String address, final String name) throws Exception { proxy.invokeOperation("createQueue", address, name); } + @Override public void createQueue(final String address, final String name, final String filter, @@ -127,10 +135,12 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes proxy.invokeOperation("createQueue", address, name, filter, durable); } + @Override public void createQueue(final String address, final String name, final boolean durable) throws Exception { proxy.invokeOperation("createQueue", address, name, durable); } + @Override public void deployQueue(final String address, final String name, final String filter, @@ -138,50 +148,62 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes proxy.invokeOperation("deployQueue", address, name, filter, durable); } + @Override public void deployQueue(final String address, final String name, final String filterString) throws Exception { proxy.invokeOperation("deployQueue", address, name); } + @Override public void destroyQueue(final String name) throws Exception { proxy.invokeOperation("destroyQueue", name); } + @Override public void disableMessageCounters() throws Exception { proxy.invokeOperation("disableMessageCounters"); } + @Override public void enableMessageCounters() throws Exception { proxy.invokeOperation("enableMessageCounters"); } + @Override public String getBindingsDirectory() { return (String) proxy.retrieveAttributeValue("bindingsDirectory"); } + @Override public int getConnectionCount() { return (Integer) proxy.retrieveAttributeValue("connectionCount"); } + @Override public long getConnectionTTLOverride() { return (Long) proxy.retrieveAttributeValue("connectionTTLOverride", Long.class); } + @Override public Object[] getConnectors() throws Exception { return (Object[]) proxy.retrieveAttributeValue("connectors"); } + @Override public String getConnectorsAsJSON() throws Exception { return (String) proxy.retrieveAttributeValue("connectorsAsJSON"); } + @Override public String[] getAddressNames() { return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("addressNames")); } + @Override public String[] getQueueNames() { return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("queueNames")); } + @Override public int getIDCacheSize() { return (Integer) proxy.retrieveAttributeValue("IDCacheSize"); } @@ -190,118 +212,147 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames")); } + @Override public String[] getIncomingInterceptorClassNames() { return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("incomingInterceptorClassNames")); } + @Override public String[] getOutgoingInterceptorClassNames() { return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("outgoingInterceptorClassNames")); } + @Override public String getJournalDirectory() { return (String) proxy.retrieveAttributeValue("journalDirectory"); } + @Override public int getJournalFileSize() { return (Integer) proxy.retrieveAttributeValue("journalFileSize"); } + @Override public int getJournalMaxIO() { return (Integer) proxy.retrieveAttributeValue("journalMaxIO"); } + @Override public int getJournalMinFiles() { return (Integer) proxy.retrieveAttributeValue("journalMinFiles"); } + @Override public String getJournalType() { return (String) proxy.retrieveAttributeValue("journalType"); } + @Override public String getLargeMessagesDirectory() { return (String) proxy.retrieveAttributeValue("largeMessagesDirectory"); } + @Override public String getManagementAddress() { return (String) proxy.retrieveAttributeValue("managementAddress"); } + @Override public String getManagementNotificationAddress() { return (String) proxy.retrieveAttributeValue("managementNotificationAddress"); } + @Override public int getMessageCounterMaxDayCount() { return (Integer) proxy.retrieveAttributeValue("messageCounterMaxDayCount"); } + @Override public long getMessageCounterSamplePeriod() { return (Long) proxy.retrieveAttributeValue("messageCounterSamplePeriod", Long.class); } + @Override public long getMessageExpiryScanPeriod() { return (Long) proxy.retrieveAttributeValue("messageExpiryScanPeriod", Long.class); } + @Override public long getMessageExpiryThreadPriority() { return (Long) proxy.retrieveAttributeValue("messageExpiryThreadPriority", Long.class); } + @Override public String getPagingDirectory() { return (String) proxy.retrieveAttributeValue("pagingDirectory"); } + @Override public int getScheduledThreadPoolMaxSize() { return (Integer) proxy.retrieveAttributeValue("scheduledThreadPoolMaxSize"); } + @Override public int getThreadPoolMaxSize() { return (Integer) proxy.retrieveAttributeValue("threadPoolMaxSize"); } + @Override public long getSecurityInvalidationInterval() { return (Long) proxy.retrieveAttributeValue("securityInvalidationInterval", Long.class); } + @Override public long getTransactionTimeout() { return (Long) proxy.retrieveAttributeValue("transactionTimeout", Long.class); } + @Override public long getTransactionTimeoutScanPeriod() { return (Long) proxy.retrieveAttributeValue("transactionTimeoutScanPeriod", Long.class); } + @Override public String getVersion() { return (String) proxy.retrieveAttributeValue("version"); } + @Override public boolean isBackup() { return (Boolean) proxy.retrieveAttributeValue("backup"); } + @Override public boolean isClustered() { return (Boolean) proxy.retrieveAttributeValue("clustered"); } + @Override public boolean isCreateBindingsDir() { return (Boolean) proxy.retrieveAttributeValue("createBindingsDir"); } + @Override public boolean isCreateJournalDir() { return (Boolean) proxy.retrieveAttributeValue("createJournalDir"); } + @Override public boolean isJournalSyncNonTransactional() { return (Boolean) proxy.retrieveAttributeValue("journalSyncNonTransactional"); } + @Override public boolean isJournalSyncTransactional() { return (Boolean) proxy.retrieveAttributeValue("journalSyncTransactional"); } + @Override public void setFailoverOnServerShutdown(boolean failoverOnServerShutdown) throws Exception { proxy.invokeOperation("setFailoverOnServerShutdown", failoverOnServerShutdown); } + @Override public boolean isFailoverOnServerShutdown() { return (Boolean) proxy.retrieveAttributeValue("failoverOnServerShutdown"); } @@ -314,114 +365,142 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes return (Boolean) proxy.retrieveAttributeValue("scaleDown"); } + @Override public boolean isMessageCounterEnabled() { return (Boolean) proxy.retrieveAttributeValue("messageCounterEnabled"); } + @Override public boolean isPersistDeliveryCountBeforeDelivery() { return (Boolean) proxy.retrieveAttributeValue("persistDeliveryCountBeforeDelivery"); } + @Override public boolean isAsyncConnectionExecutionEnabled() { return (Boolean) proxy.retrieveAttributeValue("asyncConnectionExecutionEnabled"); } + @Override public boolean isPersistIDCache() { return (Boolean) proxy.retrieveAttributeValue("persistIDCache"); } + @Override public boolean isSecurityEnabled() { return (Boolean) proxy.retrieveAttributeValue("securityEnabled"); } + @Override public boolean isStarted() { return (Boolean) proxy.retrieveAttributeValue("started"); } + @Override public boolean isWildcardRoutingEnabled() { return (Boolean) proxy.retrieveAttributeValue("wildcardRoutingEnabled"); } + @Override public String[] listConnectionIDs() throws Exception { return (String[]) proxy.invokeOperation("listConnectionIDs"); } + @Override public String[] listPreparedTransactions() throws Exception { return (String[]) proxy.invokeOperation("listPreparedTransactions"); } + @Override public String listPreparedTransactionDetailsAsJSON() throws Exception { return (String) proxy.invokeOperation("listPreparedTransactionDetailsAsJSON"); } + @Override public String listPreparedTransactionDetailsAsHTML() throws Exception { return (String) proxy.invokeOperation("listPreparedTransactionDetailsAsHTML"); } + @Override public String[] listHeuristicCommittedTransactions() throws Exception { return (String[]) proxy.invokeOperation("listHeuristicCommittedTransactions"); } + @Override public String[] listHeuristicRolledBackTransactions() throws Exception { return (String[]) proxy.invokeOperation("listHeuristicRolledBackTransactions"); } + @Override public String[] listRemoteAddresses() throws Exception { return (String[]) proxy.invokeOperation("listRemoteAddresses"); } + @Override public String[] listRemoteAddresses(final String ipAddress) throws Exception { return (String[]) proxy.invokeOperation("listRemoteAddresses", ipAddress); } + @Override public String[] listSessions(final String connectionID) throws Exception { return (String[]) proxy.invokeOperation("listSessions", connectionID); } + @Override public void resetAllMessageCounterHistories() throws Exception { proxy.invokeOperation("resetAllMessageCounterHistories"); } + @Override public void resetAllMessageCounters() throws Exception { proxy.invokeOperation("resetAllMessageCounters"); } + @Override public boolean rollbackPreparedTransaction(final String transactionAsBase64) throws Exception { return (Boolean) proxy.invokeOperation("rollbackPreparedTransaction", transactionAsBase64); } + @Override public void sendQueueInfoToQueue(final String queueName, final String address) throws Exception { proxy.invokeOperation("sendQueueInfoToQueue", queueName, address); } + @Override public void setMessageCounterMaxDayCount(final int count) throws Exception { proxy.invokeOperation("setMessageCounterMaxDayCount", count); } + @Override public void setMessageCounterSamplePeriod(final long newPeriod) throws Exception { proxy.invokeOperation("setMessageCounterSamplePeriod", newPeriod); } + @Override public int getJournalBufferSize() { return (Integer) proxy.retrieveAttributeValue("JournalBufferSize"); } + @Override public int getJournalBufferTimeout() { return (Integer) proxy.retrieveAttributeValue("JournalBufferTimeout"); } + @Override public int getJournalCompactMinFiles() { return (Integer) proxy.retrieveAttributeValue("JournalCompactMinFiles"); } + @Override public int getJournalCompactPercentage() { return (Integer) proxy.retrieveAttributeValue("JournalCompactPercentage"); } + @Override public boolean isPersistenceEnabled() { return (Boolean) proxy.retrieveAttributeValue("PersistenceEnabled"); } + @Override public void addSecuritySettings(String addressMatch, String sendRoles, String consumeRoles, @@ -433,18 +512,22 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes proxy.invokeOperation("addSecuritySettings", addressMatch, sendRoles, consumeRoles, createDurableQueueRoles, deleteDurableQueueRoles, createNonDurableQueueRoles, deleteNonDurableQueueRoles, manageRoles); } + @Override public void removeSecuritySettings(String addressMatch) throws Exception { proxy.invokeOperation("removeSecuritySettings", addressMatch); } + @Override public Object[] getRoles(String addressMatch) throws Exception { return (Object[]) proxy.invokeOperation("getRoles", addressMatch); } + @Override public String getRolesAsJSON(String addressMatch) throws Exception { return (String) proxy.invokeOperation("getRolesAsJSON", addressMatch); } + @Override public void addAddressSettings(@Parameter(desc = "an address match", name = "addressMatch") String addressMatch, @Parameter(desc = "the dead letter address setting", name = "DLA") String DLA, @Parameter(desc = "the expiry address setting", name = "expiryAddress") String expiryAddress, @@ -468,10 +551,12 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes proxy.invokeOperation("addAddressSettings", addressMatch, DLA, expiryAddress, expiryDelay, lastValueQueue, deliveryAttempts, maxSizeBytes, pageSizeBytes, pageMaxCacheSize, redeliveryDelay, redeliveryMultiplier, maxRedeliveryDelay, redistributionDelay, sendToDLAOnNoRoute, addressFullMessagePolicy, slowConsumerThreshold, slowConsumerCheckPeriod, slowConsumerPolicy, autoCreateJmsQueues, autoDeleteJmsQueues); } + @Override public void removeAddressSettings(String addressMatch) throws Exception { proxy.invokeOperation("removeAddressSettings", addressMatch); } + @Override public void createDivert(String name, String routingName, String address, @@ -482,19 +567,23 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes proxy.invokeOperation("createDivert", name, routingName, address, forwardingAddress, exclusive, filterString, transformerClassName); } + @Override public void destroyDivert(String name) throws Exception { proxy.invokeOperation("destroyDivert", name); } + @Override public String[] getBridgeNames() { return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("bridgeNames")); } + @Override public void destroyBridge(String name) throws Exception { proxy.invokeOperation("destroyBridge", name); } + @Override public void forceFailover() throws Exception { proxy.invokeOperation("forceFailover"); } @@ -503,14 +592,17 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes return (String) proxy.retrieveAttributeValue("liveConnectorName"); } + @Override public String getAddressSettingsAsJSON(String addressMatch) throws Exception { return (String) proxy.invokeOperation("getAddressSettingsAsJSON", addressMatch); } + @Override public String[] getDivertNames() { return ActiveMQServerControlUsingCoreTest.toStringArray((Object[]) proxy.retrieveAttributeValue("divertNames")); } + @Override public void createBridge(String name, String queueName, String forwardingAddress, @@ -531,6 +623,7 @@ public class ActiveMQServerControlUsingCoreTest extends ActiveMQServerControlTes proxy.invokeOperation("createBridge", name, queueName, forwardingAddress, filterString, transformerClassName, retryInterval, retryIntervalMultiplier, initialConnectAttempts, reconnectAttempts, useDuplicateDetection, confirmationWindowSize, clientFailureCheckPeriod, connectorNames, useDiscovery, ha, user, password); } + @Override public String listProducersInfoAsJSON() throws Exception { return (String) proxy.invokeOperation("listProducersInfoAsJSON"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlUsingCoreTest.java index cf63385579..d4cdef282c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/BroadcastGroupControlUsingCoreTest.java @@ -34,42 +34,52 @@ public class BroadcastGroupControlUsingCoreTest extends BroadcastGroupControlTes return new BroadcastGroupControl() { private final CoreMessagingProxy proxy = new CoreMessagingProxy(session, ResourceNames.CORE_BROADCAST_GROUP + name); + @Override public long getBroadcastPeriod() { return ((Integer) proxy.retrieveAttributeValue("broadcastPeriod")).longValue(); } + @Override public Object[] getConnectorPairs() { return (Object[]) proxy.retrieveAttributeValue("connectorPairs"); } + @Override public String getConnectorPairsAsJSON() { return (String) proxy.retrieveAttributeValue("connectorPairsAsJSON"); } + @Override public String getGroupAddress() { return (String) proxy.retrieveAttributeValue("groupAddress"); } + @Override public int getGroupPort() { return (Integer) proxy.retrieveAttributeValue("groupPort"); } + @Override public int getLocalBindPort() { return (Integer) proxy.retrieveAttributeValue("localBindPort"); } + @Override public String getName() { return (String) proxy.retrieveAttributeValue("name"); } + @Override public boolean isStarted() { return (Boolean) proxy.retrieveAttributeValue("started"); } + @Override public void start() throws Exception { proxy.invokeOperation("start"); } + @Override public void stop() throws Exception { proxy.invokeOperation("stop"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlUsingCoreTest.java index d502baaffc..77157174b4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/ClusterConnectionControlUsingCoreTest.java @@ -49,62 +49,77 @@ public class ClusterConnectionControlUsingCoreTest extends ClusterConnectionCont return new ClusterConnectionControl() { private final CoreMessagingProxy proxy = new CoreMessagingProxy(session, ResourceNames.CORE_CLUSTER_CONNECTION + name); + @Override public Object[] getStaticConnectors() { return (Object[]) proxy.retrieveAttributeValue("staticConnectors"); } + @Override public String getStaticConnectorsAsJSON() throws Exception { return (String) proxy.retrieveAttributeValue("staticConnectorsAsJSON"); } + @Override public String getAddress() { return (String) proxy.retrieveAttributeValue("address"); } + @Override public String getDiscoveryGroupName() { return (String) proxy.retrieveAttributeValue("discoveryGroupName"); } + @Override public int getMaxHops() { return (Integer) proxy.retrieveAttributeValue("maxHops"); } + @Override public long getRetryInterval() { return (Long) proxy.retrieveAttributeValue("retryInterval"); } + @Override public String getTopology() { return (String) proxy.retrieveAttributeValue("topology"); } + @Override public Map getNodes() throws Exception { return (Map) proxy.retrieveAttributeValue("nodes"); } + @Override public boolean isDuplicateDetection() { return (Boolean) proxy.retrieveAttributeValue("duplicateDetection"); } + @Override public String getMessageLoadBalancingType() { return (String) proxy.retrieveAttributeValue("messageLoadBalancingType"); } + @Override public String getName() { return (String) proxy.retrieveAttributeValue("name"); } + @Override public String getNodeID() { return (String) proxy.retrieveAttributeValue("nodeID"); } + @Override public boolean isStarted() { return (Boolean) proxy.retrieveAttributeValue("started"); } + @Override public void start() throws Exception { proxy.invokeOperation("start"); } + @Override public void stop() throws Exception { proxy.invokeOperation("stop"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlUsingCoreTest.java index 62788be7d4..55c90fa6c6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/DivertControlUsingCoreTest.java @@ -47,30 +47,37 @@ public class DivertControlUsingCoreTest extends DivertControlTest { return new DivertControl() { private final CoreMessagingProxy proxy = new CoreMessagingProxy(session, ResourceNames.CORE_DIVERT + name); + @Override public String getAddress() { return (String) proxy.retrieveAttributeValue("address"); } + @Override public String getFilter() { return (String) proxy.retrieveAttributeValue("filter"); } + @Override public String getForwardingAddress() { return (String) proxy.retrieveAttributeValue("forwardingAddress"); } + @Override public String getRoutingName() { return (String) proxy.retrieveAttributeValue("routingName"); } + @Override public String getTransformerClassName() { return (String) proxy.retrieveAttributeValue("transformerClassName"); } + @Override public String getUniqueName() { return (String) proxy.retrieveAttributeValue("uniqueName"); } + @Override public boolean isExclusive() { return (Boolean) proxy.retrieveAttributeValue("exclusive"); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java index 135a60f77e..bae0a1c377 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlTest.java @@ -2037,6 +2037,7 @@ public class QueueControlTest extends ManagementTestBase { session.start(); } + @Override protected QueueControl createManagementControl(final SimpleString address, final SimpleString queue) throws Exception { QueueControl queueControl = ManagementControlHelper.createQueueControl(address, queue, mbeanServer); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java index 2b75f12c6f..6dce64bd79 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java @@ -48,98 +48,122 @@ public class QueueControlUsingCoreTest extends QueueControlTest { } } + @Override public boolean changeMessagePriority(final long messageID, final int newPriority) throws Exception { return (Boolean) proxy.invokeOperation("changeMessagePriority", messageID, newPriority); } + @Override public int changeMessagesPriority(final String filter, final int newPriority) throws Exception { return (Integer) proxy.invokeOperation("changeMessagesPriority", filter, newPriority); } + @Override public long countMessages(final String filter) throws Exception { return ((Number) proxy.invokeOperation("countMessages", filter)).longValue(); } + @Override public boolean expireMessage(final long messageID) throws Exception { return (Boolean) proxy.invokeOperation("expireMessage", messageID); } + @Override public int expireMessages(final String filter) throws Exception { return (Integer) proxy.invokeOperation("expireMessages", filter); } + @Override public String getAddress() { return (String) proxy.retrieveAttributeValue("address"); } + @Override public int getConsumerCount() { return (Integer) proxy.retrieveAttributeValue("consumerCount"); } + @Override public String getDeadLetterAddress() { return (String) proxy.retrieveAttributeValue("deadLetterAddress"); } + @Override public int getDeliveringCount() { return (Integer) proxy.retrieveAttributeValue("deliveringCount"); } + @Override public String getExpiryAddress() { return (String) proxy.retrieveAttributeValue("expiryAddress"); } + @Override public String getFilter() { return (String) proxy.retrieveAttributeValue("filter"); } + @Override public long getMessageCount() { return ((Number) proxy.retrieveAttributeValue("messageCount")).longValue(); } + @Override public long getMessagesAdded() { return (Integer) proxy.retrieveAttributeValue("messagesAdded"); } + @Override public long getMessagesAcknowledged() { return (Integer) proxy.retrieveAttributeValue("messagesAcknowledged"); } + @Override public void resetMessagesAdded() throws Exception { proxy.invokeOperation("resetMessagesAdded"); } + @Override public void resetMessagesAcknowledged() throws Exception { proxy.invokeOperation("resetMessagesAcknowledged"); } + @Override public String getName() { return (String) proxy.retrieveAttributeValue("name"); } + @Override public long getID() { return (Long) proxy.retrieveAttributeValue("ID"); } + @Override public long getScheduledCount() { return (Long) proxy.retrieveAttributeValue("scheduledCount", Long.class); } + @Override public boolean isDurable() { return (Boolean) proxy.retrieveAttributeValue("durable"); } + @Override public boolean isTemporary() { return (Boolean) proxy.retrieveAttributeValue("temporary"); } + @Override public String listMessageCounter() throws Exception { return (String) proxy.invokeOperation("listMessageCounter"); } + @Override public String listMessageCounterAsHTML() throws Exception { return (String) proxy.invokeOperation("listMessageCounterAsHTML"); } + @Override public String listMessageCounterHistory() throws Exception { return (String) proxy.invokeOperation("listMessageCounterHistory"); } @@ -147,6 +171,7 @@ public class QueueControlUsingCoreTest extends QueueControlTest { /** * Returns the first message on the queue as JSON */ + @Override public String getFirstMessageAsJSON() throws Exception { return (String) proxy.invokeOperation("getFirstMessageAsJSON"); } @@ -154,6 +179,7 @@ public class QueueControlUsingCoreTest extends QueueControlTest { /** * Returns the timestamp of the first message in milliseconds. */ + @Override public Long getFirstMessageTimestamp() throws Exception { return (Long) proxy.invokeOperation("getFirstMessageTimestamp"); } @@ -161,6 +187,7 @@ public class QueueControlUsingCoreTest extends QueueControlTest { /** * Returns the age of the first message in milliseconds. */ + @Override public Long getFirstMessageAge() throws Exception { Object value = proxy.invokeOperation("getFirstMessageAge"); @@ -171,10 +198,12 @@ public class QueueControlUsingCoreTest extends QueueControlTest { return (Long) value; } + @Override public String listMessageCounterHistoryAsHTML() throws Exception { return (String) proxy.invokeOperation("listMessageCounterHistoryAsHTML"); } + @Override public Map[] listMessages(final String filter) throws Exception { Object[] res = (Object[]) proxy.invokeOperation("listMessages", filter); Map[] results = new Map[res.length]; @@ -184,10 +213,12 @@ public class QueueControlUsingCoreTest extends QueueControlTest { return results; } + @Override public String listMessagesAsJSON(final String filter) throws Exception { return (String) proxy.invokeOperation("listMessagesAsJSON", filter); } + @Override public Map[] listScheduledMessages() throws Exception { Object[] res = (Object[]) proxy.invokeOperation("listScheduledMessages"); Map[] results = new Map[res.length]; @@ -197,10 +228,12 @@ public class QueueControlUsingCoreTest extends QueueControlTest { return results; } + @Override public String listScheduledMessagesAsJSON() throws Exception { return (String) proxy.invokeOperation("listScheduledMessagesAsJSON"); } + @Override public int moveMessages(final String filter, final String otherQueueName) throws Exception { return (Integer) proxy.invokeOperation("moveMessages", filter, otherQueueName); } @@ -213,50 +246,61 @@ public class QueueControlUsingCoreTest extends QueueControlTest { return (Integer) proxy.invokeOperation("moveMessages", flushLimit, filter, otherQueueName, rejectDuplicates); } + @Override public int moveMessages(final String filter, final String otherQueueName, final boolean rejectDuplicates) throws Exception { return (Integer) proxy.invokeOperation("moveMessages", filter, otherQueueName, rejectDuplicates); } + @Override public boolean moveMessage(final long messageID, final String otherQueueName) throws Exception { return (Boolean) proxy.invokeOperation("moveMessage", messageID, otherQueueName); } + @Override public boolean moveMessage(final long messageID, final String otherQueueName, final boolean rejectDuplicates) throws Exception { return (Boolean) proxy.invokeOperation("moveMessage", messageID, otherQueueName, rejectDuplicates); } + @Override public boolean retryMessage(final long messageID) throws Exception { return (Boolean) proxy.invokeOperation("retryMessage", messageID); } + @Override public int retryMessages() throws Exception { return (Integer) proxy.invokeOperation("retryMessages"); } + @Override public int removeMessages(final String filter) throws Exception { return (Integer) proxy.invokeOperation("removeMessages", filter); } + @Override public int removeMessages(final int limit, final String filter) throws Exception { return (Integer) proxy.invokeOperation("removeMessages", limit, filter); } + @Override public boolean removeMessage(final long messageID) throws Exception { return (Boolean) proxy.invokeOperation("removeMessage", messageID); } + @Override public void resetMessageCounter() throws Exception { proxy.invokeOperation("resetMessageCounter"); } + @Override public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception { return (Boolean) proxy.invokeOperation("sendMessageToDeadLetterAddress", messageID); } + @Override public int sendMessagesToDeadLetterAddress(final String filterStr) throws Exception { return (Integer) proxy.invokeOperation("sendMessagesToDeadLetterAddress", filterStr); } @@ -269,22 +313,27 @@ public class QueueControlUsingCoreTest extends QueueControlTest { proxy.invokeOperation("setExpiryAddress", expiryAddress); } + @Override public void pause() throws Exception { proxy.invokeOperation("pause"); } + @Override public void resume() throws Exception { proxy.invokeOperation("resume"); } + @Override public boolean isPaused() throws Exception { return (Boolean) proxy.invokeOperation("isPaused"); } + @Override public String listConsumersAsJSON() throws Exception { return (String) proxy.invokeOperation("listConsumersAsJSON"); } + @Override public Map[]> listDeliveringMessages() throws Exception { // This map code could be done better, // however that's just to convert stuff for the test class, so I diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java index 9a63da195e..66270142a2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTest.java @@ -55,6 +55,7 @@ public class MQTTTest extends MQTTTestSupport { private static final int NUM_MESSAGES = 250; + @Override @Before public void setUp() throws Exception { Field sessions = MQTTSession.class.getDeclaredField("SESSIONS"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java index 9fa0ffeda2..28cd8d308e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/imported/MQTTTestSupport.java @@ -84,10 +84,12 @@ public class MQTTTestSupport extends ActiveMQTestBase { this.useSSL = useSSL; } + @Override public String getName() { return name.getMethodName(); } + @Override @Before public void setUp() throws Exception { String basedir = basedir().getPath(); @@ -102,6 +104,7 @@ public class MQTTTestSupport extends ActiveMQTestBase { startBroker(); } + @Override @After public void tearDown() throws Exception { System.clearProperty("javax.net.ssl.trustStore"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicSecurityTest.java index 266ad34be2..a1a5e384a0 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicSecurityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicSecurityTest.java @@ -31,6 +31,7 @@ import org.junit.Test; public class BasicSecurityTest extends BasicOpenWireTest { + @Override @Before public void setUp() throws Exception { this.enableSecurity = true; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSDurableTopicRedeliverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSDurableTopicRedeliverTest.java index ca96492cb8..cbb3e312b2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSDurableTopicRedeliverTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JMSDurableTopicRedeliverTest.java @@ -80,6 +80,7 @@ public class JMSDurableTopicRedeliverTest extends JmsTopicRedeliverTest { assertNull(consumer.receive(1000)); } + @Override protected String getName() { return "JMSDurableTopicRedeliverTest"; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsAutoAckListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsAutoAckListenerTest.java index a61e462b76..644bc5e807 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsAutoAckListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsAutoAckListenerTest.java @@ -58,6 +58,7 @@ public class JmsAutoAckListenerTest extends BasicOpenWireTest implements Message session.close(); } + @Override public void onMessage(Message message) { System.out.println("Received message: " + message); assertNotNull(message); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConnectionStartStopTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConnectionStartStopTest.java index 31cbb93e45..3606200318 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConnectionStartStopTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConnectionStartStopTest.java @@ -45,6 +45,7 @@ public class JmsConnectionStartStopTest extends BasicOpenWireTest { private Connection startedConnection; private Connection stoppedConnection; + @Override @Before public void setUp() throws Exception { super.setUp(); @@ -56,6 +57,7 @@ public class JmsConnectionStartStopTest extends BasicOpenWireTest { /** * @see junit.framework.TestCase#tearDown() */ + @Override @After public void tearDown() throws Exception { stoppedConnection.close(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConsumerResetActiveListenerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConsumerResetActiveListenerTest.java index 80405b983e..b50abb66f5 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConsumerResetActiveListenerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsConsumerResetActiveListenerTest.java @@ -56,6 +56,7 @@ public class JmsConsumerResetActiveListenerTest extends BasicOpenWireTest { final Vector results = new Vector(); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (first.compareAndSet(true, false)) { try { @@ -107,6 +108,7 @@ public class JmsConsumerResetActiveListenerTest extends BasicOpenWireTest { final Vector results = new Vector(); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message message) { if (first.compareAndSet(true, false)) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsCreateConsumerInOnMessageTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsCreateConsumerInOnMessageTest.java index dc86fa3461..0aaded967b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsCreateConsumerInOnMessageTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsCreateConsumerInOnMessageTest.java @@ -73,6 +73,7 @@ public class JmsCreateConsumerInOnMessageTest extends BasicOpenWireTest implemen * * @param message */ + @Override public void onMessage(Message message) { System.out.println("____________onmessage " + message); try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java index a7be9998bb..a17af755f6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableQueueWildcardSendReceiveTest.java @@ -23,6 +23,7 @@ import javax.jms.DeliveryMode; */ public class JmsDurableQueueWildcardSendReceiveTest extends JmsTopicSendReceiveTest { + @Override public void setUp() throws Exception { topic = false; deliveryMode = DeliveryMode.PERSISTENT; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicSendReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicSendReceiveTest.java index 0762edd1ef..f94defdd91 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicSendReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicSendReceiveTest.java @@ -90,6 +90,7 @@ public class JmsDurableTopicSendReceiveTest extends JmsTopicSendReceiveTest { connection2.close(); } + @Override protected String getName() { return "testSendWhileClosed"; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicTransactionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicTransactionTest.java index 53215acd6a..c155a6d400 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicTransactionTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicTransactionTest.java @@ -26,6 +26,7 @@ public class JmsDurableTopicTransactionTest extends JmsTopicTransactionTest { /** * @see JmsTransactionTestSupport#getJmsResourceProvider() */ + @Override protected JmsResourceProvider getJmsResourceProvider() { JmsResourceProvider provider = new JmsResourceProvider(); provider.setTopic(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicWildcardSendReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicWildcardSendReceiveTest.java index d4229307fe..819ff20956 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicWildcardSendReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsDurableTopicWildcardSendReceiveTest.java @@ -23,6 +23,7 @@ import javax.jms.DeliveryMode; */ public class JmsDurableTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest { + @Override public void setUp() throws Exception { topic = true; durable = true; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsSendReceiveTestSupport.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsSendReceiveTestSupport.java index 45d7c8edab..e5cf65915f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsSendReceiveTestSupport.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsSendReceiveTestSupport.java @@ -181,6 +181,7 @@ public abstract class JmsSendReceiveTestSupport extends BasicOpenWireTest implem * * @see javax.jms.MessageListener#onMessage(javax.jms.Message) */ + @Override public synchronized void onMessage(Message message) { consumeMessage(message, messages); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRequestReplyTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRequestReplyTest.java index 8005a3456a..e31621d023 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRequestReplyTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicRequestReplyTest.java @@ -111,6 +111,7 @@ public class JmsTopicRequestReplyTest extends BasicOpenWireTest implements Messa /** * Use the asynchronous subscription mechanism */ + @Override public void onMessage(Message message) { try { TextMessage requestMessage = (TextMessage) message; @@ -185,6 +186,7 @@ public class JmsTopicRequestReplyTest extends BasicOpenWireTest implements Messa } else { Thread thread = new Thread(new Runnable() { + @Override public void run() { syncConsumeLoop(requestConsumer); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicWildcardSendReceiveTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicWildcardSendReceiveTest.java index 92081710bc..a651c0d2bb 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicWildcardSendReceiveTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/JmsTopicWildcardSendReceiveTest.java @@ -48,10 +48,12 @@ public class JmsTopicWildcardSendReceiveTest extends JmsTopicSendReceiveTest { super.setUp(); } + @Override protected String getConsumerSubject() { return "FOO.>"; } + @Override protected String getProducerSubject() { return "FOO.BAR.HUMBUG"; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/MessageListenerRedeliveryTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/MessageListenerRedeliveryTest.java index 37a544f04a..d07ec1aa71 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/MessageListenerRedeliveryTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/MessageListenerRedeliveryTest.java @@ -391,6 +391,7 @@ public class MessageListenerRedeliveryTest extends BasicOpenWireTest { return DeliveryMode.PERSISTENT; } + @Override protected String getName() { return "testQueueSessionListenerExceptionDlq"; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java index 0eeb3e85c8..4d3a6f801e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlSendFailTest.java @@ -174,6 +174,7 @@ public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest { protected ConnectionFactory getConnectionFactory() throws Exception { factory.setExceptionListener(new ExceptionListener() { + @Override public void onException(JMSException arg0) { if (arg0 instanceof ResourceAllocationException) { gotResourceException.set(true); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java index cc4d3f0218..49feb26135 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ProducerFlowControlTest.java @@ -259,6 +259,7 @@ public class ProducerFlowControlTest extends BasicOpenWireTest { // Once the send starts to block it will not reset the done flag // anymore. asyncThread = new Thread("Fill thread.") { + @Override public void run() { Session session = null; try { @@ -299,6 +300,7 @@ public class ProducerFlowControlTest extends BasicOpenWireTest { private CountDownLatch asyncSendTo(final ActiveMQQueue queue, final String message) throws JMSException { final CountDownLatch done = new CountDownLatch(1); new Thread("Send thread.") { + @Override public void run() { Session session = null; try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ReconnectWithSameClientIDTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ReconnectWithSameClientIDTest.java index 940903a682..671fd8d3fd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ReconnectWithSameClientIDTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/amq/ReconnectWithSameClientIDTest.java @@ -69,6 +69,7 @@ public class ReconnectWithSameClientIDTest extends BasicOpenWireTest { } } + @Override @After public void tearDown() throws Exception { if (sameIdConnection != null) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java index 2c62e7307e..88730f3120 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingWithFailoverAndCountersTest.java @@ -170,6 +170,7 @@ public class PagingWithFailoverAndCountersTest extends ActiveMQTestBase { this.txSize = txSize; } + @Override public void run() { try { @@ -235,6 +236,7 @@ public class PagingWithFailoverAndCountersTest extends ActiveMQTestBase { super("Monitor-thread"); } + @Override public void run() { ActiveMQServer server = inProcessBackup.getServer(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerTest.java index a5636cfc80..d2d67e2309 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerTest.java @@ -187,6 +187,7 @@ public class ActiveMQMessageHandlerTest extends ActiveMQRATestBase { /** * @return */ + @Override protected ActiveMQResourceAdapter newResourceAdapter() { ActiveMQResourceAdapter qResourceAdapter = new ActiveMQResourceAdapter(); qResourceAdapter.setConnectorClassName(INVM_CONNECTOR_FACTORY); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java index c49d38a9cc..d702fa0873 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRAClusteredTestBase.java @@ -53,6 +53,7 @@ public class ActiveMQRAClusteredTestBase extends ActiveMQRATestBase { } + @Override protected Configuration createDefaultConfig(boolean netty) throws Exception { return createSecondaryDefaultConfig(false); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRATestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRATestBase.java index 75dc976a75..8043689727 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRATestBase.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQRATestBase.java @@ -101,6 +101,7 @@ public abstract class ActiveMQRATestBase extends JMSTestBase { return endpoint; } + @Override public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException { return isDeliveryTransacted; } @@ -122,20 +123,24 @@ public abstract class ActiveMQRATestBase extends JMSTestBase { this.latch = latch; } + @Override public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException { } + @Override public void afterDelivery() throws ResourceException { if (latch != null) { latch.countDown(); } } + @Override public void release() { released = true; } + @Override public void onMessage(Message message) { lastMessage = (ActiveMQMessage) message; } @@ -154,6 +159,7 @@ public abstract class ActiveMQRATestBase extends JMSTestBase { WorkManager workManager = new DummyWorkManager(); + @Override public Timer createTimer() throws UnavailableException { return null; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ResourceAdapterTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ResourceAdapterTest.java index 221b3da5ec..6bce079f09 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ResourceAdapterTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ResourceAdapterTest.java @@ -660,14 +660,17 @@ public class ResourceAdapterTest extends ActiveMQRATestBase { class DummyEndpoint implements MessageEndpoint { + @Override public void beforeDelivery(Method method) throws NoSuchMethodException, ResourceException { // To change body of implemented methods use File | Settings | File Templates. } + @Override public void afterDelivery() throws ResourceException { // To change body of implemented methods use File | Settings | File Templates. } + @Override public void release() { // To change body of implemented methods use File | Settings | File Templates. } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java index 35f83bd5d3..ed4506f525 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/PingTest.java @@ -87,6 +87,7 @@ public class PingTest extends ActiveMQTestBase { return me; } + @Override public void beforeReconnect(final ActiveMQException exception) { } } @@ -214,6 +215,7 @@ public class PingTest extends ActiveMQTestBase { final CountDownLatch requiredPings = new CountDownLatch(1); final CountDownLatch unwantedPings = new CountDownLatch(2); server.getRemotingService().addIncomingInterceptor(new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.PING) { Assert.assertEquals(ActiveMQClient.DEFAULT_CONNECTION_TTL_INVM, ((Ping) packet).getConnectionTTL()); @@ -325,6 +327,7 @@ public class PingTest extends ActiveMQTestBase { final CountDownLatch pingOnServerLatch = new CountDownLatch(2); server.getRemotingService().addIncomingInterceptor(new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.PING) { pingOnServerLatch.countDown(); @@ -355,12 +358,14 @@ public class PingTest extends ActiveMQTestBase { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException exception) { } }; final CountDownLatch serverLatch = new CountDownLatch(1); CloseListener serverListener = new CloseListener() { + @Override public void connectionClosed() { serverLatch.countDown(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/ReconnectTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/ReconnectTest.java index 3278a643e2..268b10be63 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/ReconnectTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/remoting/ReconnectTest.java @@ -82,6 +82,7 @@ public class ReconnectTest extends ActiveMQTestBase { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException exception) { } @@ -269,6 +270,7 @@ public class ReconnectTest extends ActiveMQTestBase { session.addFailureListener(new SessionFailureListener() { + @Override public void connectionFailed(final ActiveMQException me, boolean failedOver) { count.incrementAndGet(); latch.countDown(); @@ -279,6 +281,7 @@ public class ReconnectTest extends ActiveMQTestBase { connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException exception) { } @@ -287,6 +290,7 @@ public class ReconnectTest extends ActiveMQTestBase { server.stop(); Thread tcommitt = new Thread() { + @Override public void run() { latchCommit.countDown(); try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java index 5b1a4b387e..e9e3c02aaf 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/replication/ReplicationTest.java @@ -345,12 +345,14 @@ public final class ReplicationTest extends ActiveMQTestBase { final CountDownLatch latch = new CountDownLatch(1); ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { lastError.set(errorCode); msgsResult.add(errorMessage); latch.countDown(); } + @Override public void done() { } }); @@ -367,12 +369,14 @@ public final class ReplicationTest extends ActiveMQTestBase { // Adding the Task after the exception should still throw an exception ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { lastError.set(errorCode); msgsResult.add(errorMessage); latch2.countDown(); } + @Override public void done() { } }); @@ -388,9 +392,11 @@ public final class ReplicationTest extends ActiveMQTestBase { final CountDownLatch latch3 = new CountDownLatch(1); ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void done() { latch3.countDown(); } @@ -444,9 +450,11 @@ public final class ReplicationTest extends ActiveMQTestBase { final CountDownLatch latch = new CountDownLatch(1); storage.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void done() { latch.countDown(); } @@ -470,9 +478,11 @@ public final class ReplicationTest extends ActiveMQTestBase { final CountDownLatch latch = new CountDownLatch(1); storage.afterCompleteOperations(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void done() { latch.countDown(); } @@ -509,9 +519,11 @@ public final class ReplicationTest extends ActiveMQTestBase { ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void done() { executions.add(nAdd); latch.countDown(); @@ -530,13 +542,16 @@ public final class ReplicationTest extends ActiveMQTestBase { class FakeData implements EncodingSupport { + @Override public void decode(final ActiveMQBuffer buffer) { } + @Override public void encode(final ActiveMQBuffer buffer) { buffer.writeBytes(new byte[5]); } + @Override public int getEncodeSize() { return 5; } @@ -599,6 +614,7 @@ public final class ReplicationTest extends ActiveMQTestBase { static AtomicBoolean value = new AtomicBoolean(true); + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { return TestInterceptor.value.get(); } @@ -607,6 +623,7 @@ public final class ReplicationTest extends ActiveMQTestBase { static final class FakeJournal implements Journal { + @Override public void appendAddRecord(final long id, final byte recordType, final byte[] record, @@ -614,6 +631,7 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendAddRecord(final long id, final byte recordType, final EncodingSupport record, @@ -621,6 +639,7 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, @@ -628,6 +647,7 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendAddRecordTransactional(final long txID, final long id, final byte recordType, @@ -635,46 +655,55 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendCommitRecord(final long txID, final boolean sync) throws Exception { } + @Override public void appendDeleteRecord(final long id, final boolean sync) throws Exception { } + @Override public void appendDeleteRecordTransactional(final long txID, final long id, final byte[] record) throws Exception { } + @Override public void appendDeleteRecordTransactional(final long txID, final long id, final EncodingSupport record) throws Exception { } + @Override public void appendDeleteRecordTransactional(final long txID, final long id) throws Exception { } + @Override public void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync) throws Exception { } + @Override public void appendPrepareRecord(final long txID, final byte[] transactionData, final boolean sync) throws Exception { } + @Override public void appendRollbackRecord(final long txID, final boolean sync) throws Exception { } + @Override public void appendUpdateRecord(final long id, final byte recordType, final byte[] record, @@ -682,6 +711,7 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendUpdateRecord(final long id, final byte recordType, final EncodingSupport record, @@ -689,6 +719,7 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType, @@ -696,6 +727,7 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public void appendUpdateRecordTransactional(final long txID, final long id, final byte recordType, @@ -703,16 +735,19 @@ public final class ReplicationTest extends ActiveMQTestBase { } + @Override public int getAlignment() throws Exception { return 0; } + @Override public JournalLoadInformation load(final LoaderCallback reloadManager) throws Exception { return new JournalLoadInformation(); } + @Override public JournalLoadInformation load(final List committedRecords, final List preparedTransactions, final TransactionFailureCallback transactionFailure) throws Exception { @@ -720,31 +755,38 @@ public final class ReplicationTest extends ActiveMQTestBase { return new JournalLoadInformation(); } + @Override public void perfBlast(final int pages) { } + @Override public boolean isStarted() { return false; } + @Override public void start() throws Exception { } + @Override public void stop() throws Exception { } + @Override public JournalLoadInformation loadInternalOnly() throws Exception { return new JournalLoadInformation(); } + @Override public int getNumberOfRecords() { return 0; } + @Override public void appendAddRecord(final long id, final byte recordType, final EncodingSupport record, @@ -752,27 +794,32 @@ public final class ReplicationTest extends ActiveMQTestBase { final IOCompletion completionCallback) throws Exception { } + @Override public void appendCommitRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception { } + @Override public void appendDeleteRecord(final long id, final boolean sync, final IOCompletion completionCallback) throws Exception { } + @Override public void appendPrepareRecord(final long txID, final EncodingSupport transactionData, final boolean sync, final IOCompletion callback) throws Exception { } + @Override public void appendRollbackRecord(final long txID, final boolean sync, final IOCompletion callback) throws Exception { } + @Override public void appendUpdateRecord(final long id, final byte recordType, final EncodingSupport record, @@ -783,9 +830,11 @@ public final class ReplicationTest extends ActiveMQTestBase { public void sync(final IOCompletion callback) { } + @Override public void runDirectJournalBlast() throws Exception { } + @Override public int getUserVersion() { return 0; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java index 3047038176..468ffa5b92 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/SecurityTest.java @@ -1648,10 +1648,12 @@ public class SecurityTest extends ActiveMQTestBase { public void testCustomSecurityManager() throws Exception { final Configuration configuration = createDefaultInVMConfig().setSecurityEnabled(true); final ActiveMQSecurityManager customSecurityManager = new ActiveMQSecurityManager() { + @Override public boolean validateUser(final String username, final String password) { return (username.equals("foo") || username.equals("bar") || username.equals("all")) && password.equals("frobnicate"); } + @Override public boolean validateUserAndRole( final String username, final String password, @@ -1732,14 +1734,17 @@ public class SecurityTest extends ActiveMQTestBase { public void testCustomSecurityManager2() throws Exception { final Configuration configuration = createDefaultInVMConfig().setSecurityEnabled(true); final ActiveMQSecurityManager customSecurityManager = new ActiveMQSecurityManager2() { + @Override public boolean validateUser(final String username, final String password) { fail("Unexpected call to overridden method"); return false; } + @Override public boolean validateUser(final String username, final String password, final X509Certificate[] certificates) { return (username.equals("foo") || username.equals("bar") || username.equals("all")) && password.equals("frobnicate"); } + @Override public boolean validateUserAndRole( final String username, final String password, @@ -1750,6 +1755,7 @@ public class SecurityTest extends ActiveMQTestBase { return false; } + @Override public boolean validateUserAndRole( final String username, final String password, diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressFullLoggingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressFullLoggingTest.java index d9469ba1ff..36f866a168 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressFullLoggingTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/AddressFullLoggingTest.java @@ -77,6 +77,7 @@ public class AddressFullLoggingTest extends ActiveMQTestBase { ExecutorService executor = Executors.newFixedThreadPool(1); Callable sendMessageTask = new Callable() { + @Override public Object call() throws ActiveMQException { producer.send(message); return null; diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java index f015ca6967..ee4ac081c4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/ExpiryRunnerTest.java @@ -263,6 +263,7 @@ public class ExpiryRunnerTest extends ActiveMQTestBase { this.latch = latch; } + @Override public void run() { while (true) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/GracefulShutdownTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/GracefulShutdownTest.java index b7894a4e77..f42e585fd6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/GracefulShutdownTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/GracefulShutdownTest.java @@ -45,6 +45,7 @@ public class GracefulShutdownTest extends ActiveMQTestBase { ClientSession session = sf.createSession(true, true); Thread t = new Thread(new Runnable() { + @Override public void run() { try { server.stop(); @@ -113,6 +114,7 @@ public class GracefulShutdownTest extends ActiveMQTestBase { ClientSessionFactory sf = createSessionFactory(locator); Thread t = new Thread(new Runnable() { + @Override public void run() { try { server.stop(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java index 3b0021987c..2e9accf56a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/server/SuppliedThreadPoolTest.java @@ -49,6 +49,7 @@ public class SuppliedThreadPoolTest extends ActiveMQTestBase { server.waitForActivation(100, TimeUnit.MILLISECONDS); } + @Override @After public void tearDown() throws Exception { if (server.isActive()) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/ExampleListener.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/ExampleListener.java index da7b6472bb..8093d28d92 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/ExampleListener.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/ExampleListener.java @@ -29,6 +29,7 @@ public class ExampleListener implements MessageListener { public static ReusableLatch latch = new ReusableLatch(); + @Override public void onMessage(Message message) { try { lastMessage = ((TextMessage) message).getText(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/SpringIntegrationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/SpringIntegrationTest.java index 0b0d1c83d3..f2e5cfd54d 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/SpringIntegrationTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/spring/SpringIntegrationTest.java @@ -33,6 +33,7 @@ public class SpringIntegrationTest extends ActiveMQTestBase { IntegrationTestLogger log = IntegrationTestLogger.LOGGER; + @Override @Before public void setUp() throws Exception { super.setUp(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java index 00cc0a7326..d66b968c17 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java @@ -96,6 +96,7 @@ public class CoreClientOverTwoWaySSLTest extends ActiveMQTestBase { private class MyInterceptor implements Interceptor { + @Override public boolean intercept(final Packet packet, final RemotingConnection connection) throws ActiveMQException { if (packet.getType() == PacketImpl.SESS_SEND) { try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java index b6b908a7d3..534f3422f1 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/StompTest.java @@ -56,6 +56,7 @@ public class StompTest extends StompTestBase { final CountDownLatch latch = new CountDownLatch(count); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message arg0) { latch.countDown(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractClientStompFrame.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractClientStompFrame.java index 8bc7f95d47..1aabb1ad35 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractClientStompFrame.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractClientStompFrame.java @@ -65,6 +65,7 @@ public abstract class AbstractClientStompFrame implements ClientStompFrame { return validCommands.contains(command); } + @Override public String toString() { StringBuffer sb = new StringBuffer("Frame: <" + command + ">" + "\n"); Iterator
iter = headers.iterator(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java index bac977b1a4..4d3c07c91c 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/AbstractStompClientConnection.java @@ -88,6 +88,7 @@ public abstract class AbstractStompClientConnection implements StompClientConnec new ReaderThread().start(); } + @Override public ClientStompFrame sendFrame(ClientStompFrame frame) throws IOException, InterruptedException { ClientStompFrame response = null; ByteBuffer buffer = frame.toByteBuffer(); @@ -113,6 +114,7 @@ public abstract class AbstractStompClientConnection implements StompClientConnec return response; } + @Override public ClientStompFrame sendWickedFrame(ClientStompFrame frame) throws IOException, InterruptedException { ClientStompFrame response = null; ByteBuffer buffer = frame.toByteBufferWithExtra("\n"); @@ -138,10 +140,12 @@ public abstract class AbstractStompClientConnection implements StompClientConnec return response; } + @Override public ClientStompFrame receiveFrame() throws InterruptedException { return frameQueue.poll(10, TimeUnit.SECONDS); } + @Override public ClientStompFrame receiveFrame(long timeout) throws InterruptedException { return frameQueue.poll(timeout, TimeUnit.MILLISECONDS); } @@ -236,10 +240,12 @@ public abstract class AbstractStompClientConnection implements StompClientConnec } } + @Override public ClientStompFrame connect() throws Exception { return connect(null, null); } + @Override public void destroy() { try { close(); @@ -251,18 +257,22 @@ public abstract class AbstractStompClientConnection implements StompClientConnec } } + @Override public ClientStompFrame connect(String username, String password) throws Exception { throw new RuntimeException("connect method not implemented!"); } + @Override public boolean isConnected() { return connected; } + @Override public String getVersion() { return version; } + @Override public int getFrameQueueSize() { return this.frameQueue.size(); } @@ -310,6 +320,7 @@ public abstract class AbstractStompClientConnection implements StompClientConnec this.notify(); } + @Override public void run() { synchronized (this) { while (!stop) { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV11.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV11.java index c168922075..22d71469bd 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV11.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV11.java @@ -37,6 +37,7 @@ public class ClientStompFrameV11 extends AbstractClientStompFrame { super(command, validate); } + @Override public void setForceOneway() { forceOneway = true; } @@ -52,10 +53,12 @@ public class ClientStompFrameV11 extends AbstractClientStompFrame { return false; } + @Override public void setPing(boolean b) { isPing = b; } + @Override public boolean isPing() { return isPing; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV12.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV12.java index 22ce99e2b5..5ca530e978 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV12.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/ClientStompFrameV12.java @@ -44,6 +44,7 @@ public class ClientStompFrameV12 extends AbstractClientStompFrame { } } + @Override public void setForceOneway() { forceOneway = true; } @@ -59,10 +60,12 @@ public class ClientStompFrameV12 extends AbstractClientStompFrame { return false; } + @Override public void setPing(boolean b) { isPing = b; } + @Override public boolean isPing() { return isPing; } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java index 2c9dfe737a..5f46b0ad8a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV10.java @@ -27,6 +27,7 @@ public class StompClientConnectionV10 extends AbstractStompClientConnection { super("1.0", host, port); } + @Override public ClientStompFrame connect(String username, String passcode) throws IOException, InterruptedException { ClientStompFrame frame = factory.newFrame(CONNECT_COMMAND); frame.addHeader(LOGIN_HEADER, username); @@ -44,6 +45,7 @@ public class StompClientConnectionV10 extends AbstractStompClientConnection { return response; } + @Override public void connect(String username, String passcode, String clientID) throws IOException, InterruptedException { ClientStompFrame frame = factory.newFrame(CONNECT_COMMAND); frame.addHeader(LOGIN_HEADER, username); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java index 481f7a1f55..1e2296c69f 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV11.java @@ -24,6 +24,7 @@ public class StompClientConnectionV11 extends AbstractStompClientConnection { super("1.1", host, port); } + @Override public ClientStompFrame connect(String username, String passcode) throws IOException, InterruptedException { ClientStompFrame frame = factory.newFrame(CONNECT_COMMAND); frame.addHeader(ACCEPT_HEADER, "1.1"); @@ -49,6 +50,7 @@ public class StompClientConnectionV11 extends AbstractStompClientConnection { return response; } + @Override public void connect(String username, String passcode, String clientID) throws IOException, InterruptedException { ClientStompFrame frame = factory.newFrame(CONNECT_COMMAND); frame.addHeader(ACCEPT_HEADER, "1.1"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV12.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV12.java index f28743d0cb..797f731341 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV12.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompClientConnectionV12.java @@ -29,6 +29,7 @@ public class StompClientConnectionV12 extends AbstractStompClientConnection { return factory.newFrame(command); } + @Override public ClientStompFrame connect(String username, String passcode) throws IOException, InterruptedException { ClientStompFrame frame = factory.newFrame(CONNECT_COMMAND); frame.addHeader(ACCEPT_HEADER, "1.2"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompFrameFactoryV10.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompFrameFactoryV10.java index 93674acb98..5ed85660ae 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompFrameFactoryV10.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/util/StompFrameFactoryV10.java @@ -37,6 +37,7 @@ import java.util.StringTokenizer; */ public class StompFrameFactoryV10 implements StompFrameFactory { + @Override public ClientStompFrame createFrame(String data) { //split the string at "\n\n" String[] dataFields = data.split("\n\n"); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java index 6c402714fa..22b86a58de 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v11/StompV11Test.java @@ -1259,6 +1259,7 @@ public class StompV11Test extends StompV11TestBase { final CountDownLatch latch = new CountDownLatch(1); Thread thr = new Thread() { + @Override public void run() { ClientStompFrame sendFrame = connV11.createFrame("SEND"); sendFrame.addHeader("destination", getQueuePrefix() + getQueueName()); @@ -1450,6 +1451,7 @@ public class StompV11Test extends StompV11TestBase { int count = 1000; final CountDownLatch latch = new CountDownLatch(count); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message arg0) { latch.countDown(); } diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java index 59f4eb60b7..e6cbf64ef2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/stomp/v12/StompV12Test.java @@ -1468,6 +1468,7 @@ public class StompV12Test extends StompV11TestBase { final CountDownLatch latch = new CountDownLatch(1); Thread thr = new Thread() { + @Override public void run() { ClientStompFrame sendFrame = connV12.createFrame("SEND"); sendFrame.addHeader("destination", getQueuePrefix() + getQueueName()); @@ -1659,6 +1660,7 @@ public class StompV12Test extends StompV11TestBase { int count = 1000; final CountDownLatch latch = new CountDownLatch(count); consumer.setMessageListener(new MessageListener() { + @Override public void onMessage(Message arg0) { TextMessage m = (TextMessage) arg0; latch.countDown(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java index e455ac2a60..edcb588262 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java @@ -137,6 +137,7 @@ public class NettyConnectorWithHTTPUpgradeTest extends ActiveMQTestBase { startWebServer(HTTP_PORT); } + @Override @After public void tearDown() throws Exception { stopWebServer(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java index 7d82a25c32..ce253a76e8 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/BasicXaTest.java @@ -852,6 +852,7 @@ public class BasicXaTest extends ActiveMQTestBase { this.session = session; } + @Override public void onMessage(final ClientMessage message) { Xid xid = new XidImpl(UUIDGenerator.getInstance().generateStringUUID().getBytes(), 1, UUIDGenerator.getInstance().generateStringUUID().getBytes()); try { diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/XaTimeoutTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/XaTimeoutTest.java index f244238df6..ea9d24a9f6 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/XaTimeoutTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/xa/XaTimeoutTest.java @@ -376,6 +376,7 @@ public class XaTimeoutTest extends ActiveMQTestBase { clientSession.setTransactionTimeout(2); MessageHandler handler = new MessageHandler() { + @Override public void onMessage(ClientMessage message) { try { latchReceives.countDown(); diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/NonSerializableFactory.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/NonSerializableFactory.java index aea3b70155..0ace718585 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/NonSerializableFactory.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/util/NonSerializableFactory.java @@ -85,6 +85,7 @@ public final class NonSerializableFactory implements ObjectFactory { return NonSerializableFactory.getWrapperMap().get(name); } + @Override public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AcknowledgementTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AcknowledgementTest.java index 45f443a14e..b4edc54260 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AcknowledgementTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AcknowledgementTest.java @@ -936,6 +936,7 @@ public class AcknowledgementTest extends JMSTestCase { ProxyAssertSupport.assertTrue("failed to receive all messages", latch.await(2000, MILLISECONDS)); } + @Override public abstract void onMessage(Message m); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AutoAckMesageListenerTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AutoAckMesageListenerTest.java index 1a2c30908d..858b5290a1 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AutoAckMesageListenerTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/AutoAckMesageListenerTest.java @@ -110,6 +110,7 @@ public class AutoAckMesageListenerTest extends JMSTestCase { } // will receive two messages + @Override public void onMessage(Message message) { try { if (message.getBooleanProperty("last") == false) { diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/BrowserTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/BrowserTest.java index 85ec7fd8c0..009519b4ee 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/BrowserTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/BrowserTest.java @@ -64,6 +64,7 @@ public class BrowserTest extends JMSTestCase { try { ps.createBrowser(new Queue() { + @Override public String getQueueName() throws JMSException { return "NoSuchQueue"; } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionClosedTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionClosedTest.java index 48117d1292..d47896ee9e 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionClosedTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionClosedTest.java @@ -136,6 +136,7 @@ public class ConnectionClosedTest extends JMSTestCase { public String failed; + @Override public void run() { try { long start = System.currentTimeMillis(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionFactoryTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionFactoryTest.java index b656f932c0..8e29dfd3c0 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionFactoryTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionFactoryTest.java @@ -207,6 +207,7 @@ public class ConnectionFactoryTest extends JMSTestCase { int processed; + @Override public void onMessage(final Message msg) { processed++; @@ -224,6 +225,7 @@ public class ConnectionFactoryTest extends JMSTestCase { int processed; + @Override public void onMessage(final Message msg) { processed++; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java index 7fee727cd4..7faaa0c12a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/ConnectionTest.java @@ -297,6 +297,7 @@ public class ConnectionTest extends JMSTestCase { JMSException exceptionReceived; + @Override public void onException(final JMSException exception) { exceptionReceived = exception; ConnectionTest.log.trace("Received exception"); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/DeliveryOrderTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/DeliveryOrderTest.java index 794d472f08..8cf57198f7 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/DeliveryOrderTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/DeliveryOrderTest.java @@ -96,6 +96,7 @@ public class DeliveryOrderTest extends JMSTestCase { this.sess = sess; } + @Override public void onMessage(final Message msg) { // preserve the first error if (failed) { diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/JMSTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/JMSTest.java index 5df5887130..63e87b96bb 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/JMSTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/JMSTest.java @@ -248,6 +248,7 @@ public class JMSTest extends JMSTestCase { final CountDownLatch latch = new CountDownLatch(1); new Thread(new Runnable() { + @Override public void run() { try { // sleep a little bit to ensure that @@ -297,6 +298,7 @@ public class JMSTest extends JMSTestCase { final CountDownLatch latch = new CountDownLatch(1); cons.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message m) { message.set(m); latch.countDown(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java index 288014fb6a..45e0f3c8c7 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageConsumerTest.java @@ -121,6 +121,7 @@ public class MessageConsumerTest extends JMSTestCase { int count; + @Override public synchronized void onMessage(final Message m) { try { prod.send(m); @@ -484,6 +485,7 @@ public class MessageConsumerTest extends JMSTestCase { try { ps.createConsumer(new Topic() { + @Override public String getTopicName() throws JMSException { return "NoSuchTopic"; } @@ -512,6 +514,7 @@ public class MessageConsumerTest extends JMSTestCase { try { ps.createConsumer(new Queue() { + @Override public String getQueueName() throws JMSException { return "NoSuchQueue"; } @@ -1332,6 +1335,7 @@ public class MessageConsumerTest extends JMSTestCase { boolean failed; + @Override public void run() { try { for (int i = 0; i < NUM_MESSAGES; i++) { @@ -1626,6 +1630,7 @@ public class MessageConsumerTest extends JMSTestCase { final Message m = producerSession.createMessage(); new Thread(new Runnable() { + @Override public void run() { try { // this is needed to make sure the main thread has enough time to block @@ -1673,6 +1678,7 @@ public class MessageConsumerTest extends JMSTestCase { final Message m1 = producerSession.createMessage(); new Thread(new Runnable() { + @Override public void run() { try { // this is needed to make sure the main thread has enough time to block @@ -1721,6 +1727,7 @@ public class MessageConsumerTest extends JMSTestCase { final Message m1 = producerSession.createMessage(); new Thread(new Runnable() { + @Override public void run() { try { // this is needed to make sure the main thread has enough time to block @@ -1819,6 +1826,7 @@ public class MessageConsumerTest extends JMSTestCase { consumerConnection.start(); new Thread(new Runnable() { + @Override public void run() { try { for (int i = 0; i < count; i++) { @@ -1876,6 +1884,7 @@ public class MessageConsumerTest extends JMSTestCase { consumerConnection.start(); new Thread(new Runnable() { + @Override public void run() { try { // this is needed to make sure the main thread has enough time to block @@ -1923,6 +1932,7 @@ public class MessageConsumerTest extends JMSTestCase { consumerConnection.start(); final CountDownLatch latch = new CountDownLatch(1); Thread closerThread = new Thread(new Runnable() { + @Override public void run() { try { // this is needed to make sure the main thread has enough time to block @@ -2310,6 +2320,7 @@ public class MessageConsumerTest extends JMSTestCase { consumerConnection.start(); Thread worker1 = new Thread(new Runnable() { + @Override public void run() { try { topicConsumer.receive(3000); @@ -2350,6 +2361,7 @@ public class MessageConsumerTest extends JMSTestCase { final AtomicInteger messagesReceived = new AtomicInteger(0); MessageListener myListener = new MessageListener() { + @Override public void onMessage(final Message message) { messagesReceived.incrementAndGet(); try { @@ -2449,6 +2461,7 @@ public class MessageConsumerTest extends JMSTestCase { MessageConsumer queueConsumer = consumerSession.createConsumer(queue1); MessageListener myListener = new MessageListener() { + @Override public void onMessage(final Message message) { try { Thread.sleep(1); @@ -2640,6 +2653,7 @@ public class MessageConsumerTest extends JMSTestCase { this.consumer = consumer; } + @Override public void run() { try { m = consumer.receive(1500); @@ -3894,6 +3908,7 @@ public class MessageConsumerTest extends JMSTestCase { this.sess = sess; } + @Override public void onMessage(final Message m) { TextMessage tm = (TextMessage) m; count++; @@ -3990,6 +4005,7 @@ public class MessageConsumerTest extends JMSTestCase { ActiveMQTestBase.waitForLatch(latch); } + @Override public void onMessage(final Message m) { try { TextMessage tm = (TextMessage) m; @@ -4069,6 +4085,7 @@ public class MessageConsumerTest extends JMSTestCase { ActiveMQTestBase.waitForLatch(latch); } + @Override public void onMessage(final Message m) { messages.add(m); log.trace("Added message " + m + " to my list"); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java index 7fa72b337e..cb7e493d15 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MessageProducerTest.java @@ -174,6 +174,7 @@ public class MessageProducerTest extends JMSTestCase { this.m = m; } + @Override public synchronized void run() { try { prod.send(m); @@ -257,6 +258,7 @@ public class MessageProducerTest extends JMSTestCase { final MessageProducer anonProducer = ps.createProducer(null); new Thread(new Runnable() { + @Override public void run() { try { anonProducer.send(ActiveMQServerTestCase.topic2, m1); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MiscellaneousTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MiscellaneousTest.java index a30b7c948b..4febb3dc90 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MiscellaneousTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/MiscellaneousTest.java @@ -114,6 +114,7 @@ public class MiscellaneousTest extends JMSTestCase { Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); final MessageConsumer cons = s.createConsumer(queue1); cons.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message m) { // close the connection on the same thread that processed the message try { @@ -167,6 +168,7 @@ public class MiscellaneousTest extends JMSTestCase { Session s = conn.createSession(true, Session.SESSION_TRANSACTED); final MessageConsumer cons = s.createConsumer(queue1); cons.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message m) { // close the connection on the same thread that processed the message try { diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java index 887fdecd6c..e6a8909a17 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/SessionTest.java @@ -238,6 +238,7 @@ public class SessionTest extends ActiveMQServerTestCase { this.consumer = consumer; } + @Override public void run() { try { m = consumer.receive(3000); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TemporaryDestinationTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TemporaryDestinationTest.java index 9357b1c4fa..c75bfc9054 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TemporaryDestinationTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TemporaryDestinationTest.java @@ -300,6 +300,7 @@ public class TemporaryDestinationTest extends JMSTestCase { final Message m = producerSession.createTextMessage(messageText); Thread t = new Thread(new Runnable() { + @Override public void run() { try { // this is needed to make sure the main thread has enough time to block diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TopicTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TopicTest.java index 9d616f80e1..bbeb176644 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TopicTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TopicTest.java @@ -160,6 +160,7 @@ public class TopicTest extends JMSTestCase { this.num = num; } + @Override public synchronized void onMessage(final Message m) { ObjectMessage om = (ObjectMessage) m; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TransactedSessionTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TransactedSessionTest.java index b7422dc67c..b814d6e665 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TransactedSessionTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/TransactedSessionTest.java @@ -702,6 +702,7 @@ public class TransactedSessionTest extends JMSTestCase { this.conn = conn; } + @Override public void onMessage(Message message) { if (!started) { startLatch.countDown(); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/JMSExpirationHeaderTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/JMSExpirationHeaderTest.java index 303513c357..0babc3cc53 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/JMSExpirationHeaderTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/JMSExpirationHeaderTest.java @@ -115,6 +115,7 @@ public class JMSExpirationHeaderTest extends MessageHeaderTestBase { // start the receiver thread final CountDownLatch latch = new CountDownLatch(1); Thread receiverThread = new Thread(new Runnable() { + @Override public void run() { try { expectedMessage = queueConsumer.receive(100); @@ -141,6 +142,7 @@ public class JMSExpirationHeaderTest extends MessageHeaderTestBase { // start the receiver thread Thread receiverThread = new Thread(new Runnable() { + @Override public void run() { try { long t1 = System.currentTimeMillis(); @@ -161,6 +163,7 @@ public class JMSExpirationHeaderTest extends MessageHeaderTestBase { // start the sender thread Thread senderThread = new Thread(new Runnable() { + @Override public void run() { try { // wait for 3 secs @@ -231,6 +234,7 @@ public class JMSExpirationHeaderTest extends MessageHeaderTestBase { final CountDownLatch latch = new CountDownLatch(1); // blocking read for a while to make sure I don't get anything, not even a null Thread receiverThread = new Thread(new Runnable() { + @Override public void run() { try { log.trace("Attempting to receive"); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java index f672de6704..7394a93613 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageHeaderTest.java @@ -815,17 +815,20 @@ public class MessageHeaderTest extends MessageHeaderTestBase { class FakeSession implements ClientSession { + @Override public ClientConsumer createConsumer(final SimpleString queueName, final boolean browseOnly) throws ActiveMQException { // TODO Auto-generated method stub return null; } + @Override public ClientConsumer createConsumer(final String queueName, final boolean browseOnly) throws ActiveMQException { // TODO Auto-generated method stub return null; } + @Override public void createQueue(final String address, final String queueName) throws ActiveMQException { // TODO Auto-generated method stub @@ -837,12 +840,14 @@ public class MessageHeaderTest extends MessageHeaderTestBase { this.message = message; } + @Override public void createQueue(final SimpleString address, final SimpleString queueName, final SimpleString filterString, final boolean durable) throws ActiveMQException { } + @Override public void createQueue(final SimpleString address, final SimpleString queueName, final boolean durable) throws ActiveMQException { @@ -861,6 +866,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase { boolean durable) throws ActiveMQException { } + @Override public void createQueue(final String address, final String queueName, final boolean durable) throws ActiveMQException { @@ -878,50 +884,61 @@ public class MessageHeaderTest extends MessageHeaderTestBase { final boolean temporary) throws ActiveMQException { } + @Override public void createQueue(final String address, final String queueName, final String filterString, final boolean durable) throws ActiveMQException { } + @Override public void createTemporaryQueue(final SimpleString address, final SimpleString queueName) throws ActiveMQException { } + @Override public void createTemporaryQueue(final String address, final String queueName) throws ActiveMQException { } + @Override public void createTemporaryQueue(final SimpleString address, final SimpleString queueName, final SimpleString filter) throws ActiveMQException { } + @Override public void createTemporaryQueue(final String address, final String queueName, final String filter) throws ActiveMQException { } + @Override public void deleteQueue(final SimpleString queueName) throws ActiveMQException { } + @Override public void deleteQueue(final String queueName) throws ActiveMQException { } + @Override public ClientConsumer createConsumer(final SimpleString queueName) throws ActiveMQException { return null; } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString) throws ActiveMQException { return null; } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, final boolean browseOnly) throws ActiveMQException { return null; } + @Override public ClientConsumer createConsumer(final SimpleString queueName, final SimpleString filterString, final int windowSize, @@ -930,20 +947,24 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return null; } + @Override public ClientConsumer createConsumer(final String queueName) throws ActiveMQException { return null; } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString) throws ActiveMQException { return null; } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString, final boolean browseOnly) throws ActiveMQException { return null; } + @Override public ClientConsumer createConsumer(final String queueName, final String filterString, final int windowSize, @@ -1005,14 +1026,17 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return null; } + @Override public ClientProducer createProducer() throws ActiveMQException { return null; } + @Override public ClientProducer createProducer(final SimpleString address) throws ActiveMQException { return null; } + @Override public ClientProducer createProducer(final SimpleString address, final int rate) throws ActiveMQException { return null; } @@ -1024,6 +1048,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return null; } + @Override public ClientProducer createProducer(final String address) throws ActiveMQException { return null; } @@ -1039,55 +1064,69 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return null; } + @Override public QueueQuery queueQuery(final SimpleString queueName) throws ActiveMQException { return null; } + @Override public AddressQuery addressQuery(final SimpleString address) throws ActiveMQException { return null; } + @Override public XAResource getXAResource() { return null; } + @Override public void commit() throws ActiveMQException { } + @Override public boolean isRollbackOnly() { return false; } + @Override public void rollback() throws ActiveMQException { } + @Override public void rollback(final boolean considerLastMessageAsDelivered) throws ActiveMQException { } + @Override public void close() throws ActiveMQException { } + @Override public boolean isClosed() { return false; } + @Override public boolean isAutoCommitSends() { return false; } + @Override public boolean isAutoCommitAcks() { return false; } + @Override public boolean isBlockOnAcknowledge() { return false; } + @Override public boolean isXA() { return false; } + @Override public ClientMessage createMessage(final byte type, final boolean durable, final long expiration, @@ -1096,24 +1135,29 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return message; } + @Override public ClientMessage createMessage(final byte type, final boolean durable) { return message; } + @Override public ClientMessage createMessage(final boolean durable) { return message; } + @Override public FakeSession start() throws ActiveMQException { return this; } + @Override public void stop() throws ActiveMQException { } public void addFailureListener(final FailureListener listener) { } + @Override public void addFailoverListener(FailoverEventListener listener) { } @@ -1121,50 +1165,63 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return false; } + @Override public boolean removeFailoverListener(FailoverEventListener listener) { return false; } + @Override public int getVersion() { return 0; } + @Override public FakeSession setSendAcknowledgementHandler(final SendAcknowledgementHandler handler) { return this; } + @Override public void commit(final Xid xid, final boolean b) throws XAException { } + @Override public void end(final Xid xid, final int i) throws XAException { } + @Override public void forget(final Xid xid) throws XAException { } + @Override public int getTransactionTimeout() throws XAException { return 0; } + @Override public boolean isSameRM(final XAResource xaResource) throws XAException { return false; } + @Override public int prepare(final Xid xid) throws XAException { return 0; } + @Override public Xid[] recover(final int i) throws XAException { return new Xid[0]; } + @Override public void rollback(final Xid xid) throws XAException { } + @Override public boolean setTransactionTimeout(final int i) throws XAException { return false; } + @Override public void start(final Xid xid, final int i) throws XAException { } @@ -1184,11 +1241,13 @@ public class MessageHeaderTest extends MessageHeaderTestBase { return null; } + @Override public void addFailureListener(final SessionFailureListener listener) { // TODO Auto-generated method stub } + @Override public boolean removeFailureListener(final SessionFailureListener listener) { // TODO Auto-generated method stub return false; @@ -1197,6 +1256,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase { /* (non-Javadoc) * @see ClientSession#createQueue(org.apache.activemq.artemis.utils.SimpleString, org.apache.activemq.artemis.utils.SimpleString) */ + @Override public void createQueue(SimpleString address, SimpleString queueName) throws ActiveMQException { // TODO Auto-generated method stub @@ -1213,6 +1273,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase { /* (non-Javadoc) * @see ClientSession#addMetaData(java.lang.String, java.lang.String) */ + @Override public void addMetaData(String key, String data) throws ActiveMQException { // TODO Auto-generated method stub @@ -1221,6 +1282,7 @@ public class MessageHeaderTest extends MessageHeaderTestBase { /* (non-Javadoc) * @see ClientSession#addUniqueMetaData(java.lang.String, java.lang.String) */ + @Override public void addUniqueMetaData(String key, String data) throws ActiveMQException { // TODO Auto-generated method stub diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageTestBase.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageTestBase.java index 0cd90313ea..40e92fd344 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageTestBase.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/MessageTestBase.java @@ -65,6 +65,7 @@ public abstract class MessageTestBase extends ActiveMQServerTestCase { conn.start(); } + @Override @After public void tearDown() throws Exception { if (conn != null) diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSBytesMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSBytesMessage.java index 232b11f225..8e8c6e417c 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSBytesMessage.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSBytesMessage.java @@ -56,6 +56,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess // BytesMessage implementation ----------------------------------- + @Override public boolean readBoolean() throws JMSException { checkRead(); try { @@ -69,6 +70,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public byte readByte() throws JMSException { checkRead(); try { @@ -82,6 +84,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public int readUnsignedByte() throws JMSException { checkRead(); try { @@ -95,6 +98,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public short readShort() throws JMSException { checkRead(); try { @@ -108,6 +112,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public int readUnsignedShort() throws JMSException { checkRead(); try { @@ -121,6 +126,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public char readChar() throws JMSException { checkRead(); try { @@ -134,6 +140,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public int readInt() throws JMSException { checkRead(); try { @@ -147,6 +154,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public long readLong() throws JMSException { checkRead(); try { @@ -160,6 +168,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public float readFloat() throws JMSException { checkRead(); try { @@ -173,6 +182,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public double readDouble() throws JMSException { checkRead(); try { @@ -186,6 +196,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public String readUTF() throws JMSException { checkRead(); try { @@ -199,6 +210,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public int readBytes(final byte[] value) throws JMSException { checkRead(); try { @@ -209,6 +221,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public int readBytes(final byte[] value, final int length) throws JMSException { checkRead(); try { @@ -219,6 +232,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeBoolean(final boolean value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -231,6 +245,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeByte(final byte value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -243,6 +258,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeShort(final short value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -255,6 +271,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeChar(final char value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -267,6 +284,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeInt(final int value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -279,6 +297,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeLong(final long value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -291,6 +310,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeFloat(final float value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -303,6 +323,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeDouble(final double value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -315,6 +336,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeUTF(final String value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -327,6 +349,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeBytes(final byte[] value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -339,6 +362,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -351,6 +375,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public void writeObject(final Object value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("the message body is read-only"); @@ -396,6 +421,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } + @Override public void reset() throws JMSException { try { if (bodyWriteOnly) { @@ -414,6 +440,7 @@ public class SimpleJMSBytesMessage extends SimpleJMSMessage implements BytesMess } } + @Override public long getBodyLength() throws JMSException { checkRead(); return internalArray.length; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMapMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMapMessage.java index 6ae217b142..f2164200d0 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMapMessage.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMapMessage.java @@ -45,6 +45,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage // MapMessage implementation ------------------------------------- + @Override public void setBoolean(final String name, final boolean value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -55,6 +56,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setByte(final String name, final byte value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -65,6 +67,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setShort(final String name, final short value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -75,6 +78,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setChar(final String name, final char value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -85,6 +89,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setInt(final String name, final int value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -95,6 +100,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setLong(final String name, final long value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -105,6 +111,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setFloat(final String name, final float value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -115,6 +122,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setDouble(final String name, final double value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -125,6 +133,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setString(final String name, final String value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -135,6 +144,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -145,6 +155,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -163,6 +174,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public void setObject(final String name, final Object value) throws JMSException { checkName(name); if (bodyReadOnly) { @@ -205,6 +217,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } + @Override public boolean getBoolean(final String name) throws JMSException { Object value; @@ -225,6 +238,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public byte getByte(final String name) throws JMSException { Object value; @@ -245,6 +259,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public short getShort(final String name) throws JMSException { Object value; @@ -268,6 +283,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public char getChar(final String name) throws JMSException { Object value; @@ -285,6 +301,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public int getInt(final String name) throws JMSException { Object value; @@ -311,6 +328,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public long getLong(final String name) throws JMSException { Object value; @@ -340,6 +358,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public float getFloat(final String name) throws JMSException { Object value; @@ -360,6 +379,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public double getDouble(final String name) throws JMSException { Object value; @@ -383,6 +403,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public String getString(final String name) throws JMSException { Object value; @@ -424,6 +445,7 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public byte[] getBytes(final String name) throws JMSException { Object value; @@ -440,18 +462,21 @@ public class SimpleJMSMapMessage extends SimpleJMSMessage implements MapMessage } } + @Override public Object getObject(final String name) throws JMSException { return content.get(name); } + @Override public Enumeration getMapNames() throws JMSException { return Collections.enumeration(new HashMap(content).keySet()); } + @Override public boolean itemExists(final String name) throws JMSException { return content.containsKey(name); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMessage.java index afdcd63a1d..3f49a5bfae 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMessage.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSMessage.java @@ -52,20 +52,24 @@ public class SimpleJMSMessage implements Message { private String messageID; + @Override public String getJMSMessageID() throws JMSException { return messageID; } + @Override public void setJMSMessageID(final String id) throws JMSException { messageID = id; } private long timestamp; + @Override public long getJMSTimestamp() throws JMSException { return timestamp; } + @Override public void setJMSTimestamp(final long timestamp) throws JMSException { this.timestamp = timestamp; } @@ -80,6 +84,7 @@ public class SimpleJMSMessage implements Message { private boolean isCorrelationIDBytes; + @Override public byte[] getJMSCorrelationIDAsBytes() throws JMSException { if (!isCorrelationIDBytes) { throw new JMSException("CorrelationID is a String for this message"); @@ -87,6 +92,7 @@ public class SimpleJMSMessage implements Message { return correlationIDBytes; } + @Override public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException { if (correlationID == null || correlationID.length == 0) { throw new JMSException("Please specify a non-zero length byte[]"); @@ -95,11 +101,13 @@ public class SimpleJMSMessage implements Message { isCorrelationIDBytes = true; } + @Override public void setJMSCorrelationID(final String correlationID) throws JMSException { correlationIDString = correlationID; isCorrelationIDBytes = false; } + @Override public String getJMSCorrelationID() throws JMSException { return correlationIDString; @@ -107,20 +115,24 @@ public class SimpleJMSMessage implements Message { private Destination replyTo; + @Override public Destination getJMSReplyTo() throws JMSException { return replyTo; } + @Override public void setJMSReplyTo(final Destination replyTo) throws JMSException { this.replyTo = replyTo; } private Destination destination; + @Override public Destination getJMSDestination() throws JMSException { return destination; } + @Override public void setJMSDestination(final Destination destination) throws JMSException { if (!ignoreSetDestination) { this.destination = destination; @@ -129,64 +141,77 @@ public class SimpleJMSMessage implements Message { private int deliveryMode = DeliveryMode.PERSISTENT; + @Override public int getJMSDeliveryMode() throws JMSException { return deliveryMode; } + @Override public void setJMSDeliveryMode(final int deliveryMode) throws JMSException { this.deliveryMode = deliveryMode; } private boolean redelivered; + @Override public boolean getJMSRedelivered() throws JMSException { return redelivered; } + @Override public void setJMSRedelivered(final boolean redelivered) throws JMSException { this.redelivered = redelivered; } private String type; + @Override public String getJMSType() throws JMSException { return type; } + @Override public void setJMSType(final String type) throws JMSException { this.type = type; } private long expiration; + @Override public long getJMSExpiration() throws JMSException { return expiration; } + @Override public void setJMSExpiration(final long expiration) throws JMSException { this.expiration = expiration; } private int priority; + @Override public int getJMSPriority() throws JMSException { return priority; } + @Override public void setJMSPriority(final int priority) throws JMSException { this.priority = priority; } private final Map properties = new HashMap(); + @Override public void clearProperties() throws JMSException { properties.clear(); } + @Override public boolean propertyExists(final String name) throws JMSException { return properties.containsKey(name); } + @Override public boolean getBooleanProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Boolean)) { @@ -195,6 +220,7 @@ public class SimpleJMSMessage implements Message { return ((Boolean) properties.get(name)).booleanValue(); } + @Override public byte getByteProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Byte)) { @@ -203,6 +229,7 @@ public class SimpleJMSMessage implements Message { return ((Byte) properties.get(name)).byteValue(); } + @Override public short getShortProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Short)) { @@ -211,6 +238,7 @@ public class SimpleJMSMessage implements Message { return ((Short) properties.get(name)).shortValue(); } + @Override public int getIntProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Integer)) { @@ -219,6 +247,7 @@ public class SimpleJMSMessage implements Message { return ((Integer) properties.get(name)).intValue(); } + @Override public long getLongProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Long)) { @@ -227,6 +256,7 @@ public class SimpleJMSMessage implements Message { return ((Long) properties.get(name)).longValue(); } + @Override public float getFloatProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Float)) { @@ -235,6 +265,7 @@ public class SimpleJMSMessage implements Message { return ((Float) properties.get(name)).floatValue(); } + @Override public double getDoubleProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof Double)) { @@ -243,6 +274,7 @@ public class SimpleJMSMessage implements Message { return ((Double) properties.get(name)).doubleValue(); } + @Override public String getStringProperty(final String name) throws JMSException { Object prop = properties.get(name); if (!(prop instanceof String)) { @@ -251,53 +283,66 @@ public class SimpleJMSMessage implements Message { return (String) properties.get(name); } + @Override public Object getObjectProperty(final String name) throws JMSException { return properties.get(name); } + @Override public Enumeration getPropertyNames() throws JMSException { return Collections.enumeration(properties.keySet()); } + @Override public void setBooleanProperty(final String name, final boolean value) throws JMSException { properties.put(name, new Boolean(value)); } + @Override public void setByteProperty(final String name, final byte value) throws JMSException { properties.put(name, new Byte(value)); } + @Override public void setShortProperty(final String name, final short value) throws JMSException { properties.put(name, new Short(value)); } + @Override public void setIntProperty(final String name, final int value) throws JMSException { properties.put(name, new Integer(value)); } + @Override public void setLongProperty(final String name, final long value) throws JMSException { properties.put(name, new Long(value)); } + @Override public void setFloatProperty(final String name, final float value) throws JMSException { properties.put(name, new Float(value)); } + @Override public void setDoubleProperty(final String name, final double value) throws JMSException { properties.put(name, new Double(value)); } + @Override public void setStringProperty(final String name, final String value) throws JMSException { properties.put(name, value); } + @Override public void setObjectProperty(final String name, final Object value) throws JMSException { properties.put(name, value); } + @Override public void acknowledge() throws JMSException { } + @Override public void clearBody() throws JMSException { } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSObjectMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSObjectMessage.java index 32987d93af..fcce6c2045 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSObjectMessage.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSObjectMessage.java @@ -34,10 +34,12 @@ public class SimpleJMSObjectMessage extends SimpleJMSMessage implements ObjectMe // ObjectMessage implementation ---------------------------------- + @Override public void setObject(final Serializable object) throws JMSException { this.object = object; } + @Override public Serializable getObject() throws JMSException { return object; } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSStreamMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSStreamMessage.java index 23a4e8d9d1..ca63cefb6e 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSStreamMessage.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSStreamMessage.java @@ -58,6 +58,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe // StreamMessage implementation ---------------------------------- + @Override public boolean readBoolean() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -89,6 +90,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } + @Override public byte readByte() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -118,6 +120,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public short readShort() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -151,6 +154,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public char readChar() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -175,6 +179,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public int readInt() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -212,6 +217,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public long readLong() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -253,6 +259,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public float readFloat() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -282,6 +289,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public double readDouble() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -315,6 +323,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public String readString() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -372,6 +381,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public int readBytes(final byte[] value) throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -423,6 +433,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public Object readObject() throws JMSException { if (bodyWriteOnly) { throw new MessageNotReadableException("The message body is writeonly"); @@ -439,6 +450,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public void writeBoolean(final boolean value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -446,6 +458,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Boolean(value)); } + @Override public void writeByte(final byte value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -453,6 +466,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Byte(value)); } + @Override public void writeShort(final short value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -460,6 +474,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Short(value)); } + @Override public void writeChar(final char value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -467,6 +482,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Character(value)); } + @Override public void writeInt(final int value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -474,6 +490,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Integer(value)); } + @Override public void writeLong(final long value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -481,6 +498,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Long(value)); } + @Override public void writeFloat(final float value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -488,6 +506,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Float(value)); } + @Override public void writeDouble(final double value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -495,6 +514,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(new Double(value)); } + @Override public void writeString(final String value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -507,6 +527,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public void writeBytes(final byte[] value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -514,6 +535,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(value.clone()); } + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -530,6 +552,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe content.add(temp); } + @Override public void writeObject(final Object value) throws JMSException { if (!bodyWriteOnly) { throw new MessageNotWriteableException("The message body is readonly"); @@ -572,6 +595,7 @@ public class SimpleJMSStreamMessage extends SimpleJMSMessage implements StreamMe } } + @Override public void reset() throws JMSException { bodyWriteOnly = false; position = 0; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSTextMessage.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSTextMessage.java index 2e839dfa8d..8860b7114a 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSTextMessage.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/message/SimpleJMSTextMessage.java @@ -40,10 +40,12 @@ public class SimpleJMSTextMessage extends SimpleJMSMessage implements TextMessag // TextMessage implementation ------------------------------------ + @Override public void setText(final String text) throws JMSException { this.text = text; } + @Override public String getText() throws JMSException { return text; } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java index 0db8a3b436..baf8df8a8d 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/selector/SelectorTest.java @@ -536,6 +536,7 @@ public class SelectorTest extends ActiveMQServerTestCase { final CountDownLatch latch2 = new CountDownLatch(1); new Thread(new Runnable() { + @Override public void run() { try { while (true) { @@ -556,6 +557,7 @@ public class SelectorTest extends ActiveMQServerTestCase { }, "consumer thread 1").start(); new Thread(new Runnable() { + @Override public void run() { try { while (true) { diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMContext.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMContext.java index 0dfd49e5c0..269246b020 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMContext.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMContext.java @@ -68,10 +68,12 @@ public class InVMContext implements Context, Serializable { // Context implementation ---------------------------------------- + @Override public Object lookup(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookup(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -96,26 +98,32 @@ public class InVMContext implements Context, Serializable { } } + @Override public void bind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void bind(final String name, final Object obj) throws NamingException { internalBind(name, obj, false); } + @Override public void rebind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rebind(final String name, final Object obj) throws NamingException { internalBind(name, obj, true); } + @Override public void unbind(final Name name) throws NamingException { unbind(name.toString()); } + @Override public void unbind(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -133,26 +141,32 @@ public class InVMContext implements Context, Serializable { } } + @Override public void rename(final Name oldName, final Name newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rename(final String oldName, final String newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(String contextName) throws NamingException { contextName = trimSlashes(contextName); if (!"".equals(contextName) && !".".equals(contextName)) { @@ -172,18 +186,22 @@ public class InVMContext implements Context, Serializable { return new NamingEnumerationImpl(l.iterator()); } + @Override public void destroySubcontext(final Name name) throws NamingException { destroySubcontext(name.toString()); } + @Override public void destroySubcontext(final String name) throws NamingException { map.remove(trimSlashes(name)); } + @Override public Context createSubcontext(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Context createSubcontext(String name) throws NamingException { name = trimSlashes(name); if (map.get(name) != null) { @@ -194,47 +212,58 @@ public class InVMContext implements Context, Serializable { return c; } + @Override public Object lookupLink(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookupLink(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); } + @Override public NameParser getNameParser(final String name) throws NamingException { return parser; } + @Override public Name composeName(final Name name, final Name prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public String composeName(final String name, final String prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object addToEnvironment(final String propName, final Object propVal) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object removeFromEnvironment(final String propName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Hashtable getEnvironment() throws NamingException { Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", InVMInitialContextFactory.class.getCanonicalName()); return env; } + @Override public void close() throws NamingException { } + @Override public String getNameInNamespace() throws NamingException { return nameInNamespace; } @@ -292,22 +321,27 @@ public class InVMContext implements Context, Serializable { iterator = bindingIterator; } + @Override public void close() throws NamingException { throw new UnsupportedOperationException(); } + @Override public boolean hasMore() throws NamingException { return iterator.hasNext(); } + @Override public Binding next() throws NamingException { return iterator.next(); } + @Override public boolean hasMoreElements() { return iterator.hasNext(); } + @Override public Binding nextElement() { return iterator.next(); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactory.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactory.java index e323f46942..ce8c2cf94b 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactory.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactory.java @@ -58,6 +58,7 @@ public class InVMInitialContextFactory implements InitialContextFactory { // Public -------------------------------------------------------- + @Override public Context getInitialContext(final Hashtable environment) throws NamingException { // try first in the environment passed as argument ... String s = (String) environment.get(Constants.SERVER_INDEX_PROPERTY_NAME); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactoryBuilder.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactoryBuilder.java index b61639adc2..66eba9f6a3 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactoryBuilder.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMInitialContextFactoryBuilder.java @@ -40,6 +40,7 @@ public class InVMInitialContextFactoryBuilder implements InitialContextFactoryBu // InitialContextFactoryBuilder implementation -------------------------------------------------- + @Override public InitialContextFactory createInitialContextFactory(final Hashtable environment) throws NamingException { InitialContextFactory icf = null; diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMNameParser.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMNameParser.java index 2fe13bf3eb..fa006b3c0c 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMNameParser.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/InVMNameParser.java @@ -50,6 +50,7 @@ public class InVMNameParser implements NameParser, Serializable { return InVMNameParser.syntax; } + @Override public Name parse(final String name) throws NamingException { return new CompoundName(name, InVMNameParser.syntax); } diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java index 165b332ed7..e4b615dbe2 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/LocalTestServer.java @@ -81,10 +81,12 @@ public class LocalTestServer implements Server, Runnable { // Server implementation ------------------------------------------------------------------------ + @Override public int getServerID() { return serverIndex; } + @Override public synchronized void start(final HashMap configuration, final boolean clearJournal) throws Exception { if (isStarted()) { @@ -133,6 +135,7 @@ public class LocalTestServer implements Server, Runnable { return directory.delete(); } + @Override public synchronized boolean stop() throws Exception { jmsServerManager.stop(); started = false; @@ -141,25 +144,30 @@ public class LocalTestServer implements Server, Runnable { return true; } + @Override public void ping() throws Exception { if (!isStarted()) { throw new RuntimeException("ok"); } } + @Override public synchronized void kill() throws Exception { stop(); } + @Override public synchronized boolean isStarted() throws Exception { return started; } + @Override public synchronized void startServerPeer() throws Exception { System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID()); getActiveMQServer().start(); } + @Override public synchronized void stopServerPeer() throws Exception { System.setProperty(Constants.SERVER_INDEX_PROPERTY_NAME, "" + getServerID()); getActiveMQServer().stop(); @@ -179,48 +187,58 @@ public class LocalTestServer implements Server, Runnable { /** * Only for in-VM use! */ + @Override public ActiveMQServer getServerPeer() { return getActiveMQServer(); } + @Override public void destroyQueue(final String name, final String jndiName) throws Exception { getJMSServerManager().destroyQueue(name); } + @Override public void destroyTopic(final String name, final String jndiName) throws Exception { getJMSServerManager().destroyTopic(name); } + @Override public void createQueue(final String name, final String jndiName) throws Exception { getJMSServerManager().createQueue(true, name, null, true, "/queue/" + (jndiName != null ? jndiName : name)); } + @Override public void createTopic(final String name, final String jndiName) throws Exception { getJMSServerManager().createTopic(true, name, "/topic/" + (jndiName != null ? jndiName : name)); } + @Override public void deployConnectionFactory(final String clientId, final String objectName, final String... jndiBindings) throws Exception { deployConnectionFactory(clientId, JMSFactoryType.CF, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings); } + @Override public void deployConnectionFactory(final String objectName, final int consumerWindowSize, final String... jndiBindings) throws Exception { deployConnectionFactory(null, JMSFactoryType.CF, objectName, consumerWindowSize, -1, -1, -1, false, false, -1, false, jndiBindings); } + @Override public void deployConnectionFactory(final String objectName, final String... jndiBindings) throws Exception { deployConnectionFactory(null, JMSFactoryType.CF, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings); } + @Override public void deployConnectionFactory(final String objectName, JMSFactoryType type, final String... jndiBindings) throws Exception { deployConnectionFactory(null, type, objectName, -1, -1, -1, -1, false, false, -1, false, jndiBindings); } + @Override public void deployConnectionFactory(final String objectName, final int prefetchSize, final int defaultTempQueueFullSize, @@ -230,6 +248,7 @@ public class LocalTestServer implements Server, Runnable { this.deployConnectionFactory(null, JMSFactoryType.CF, objectName, prefetchSize, defaultTempQueueFullSize, defaultTempQueuePageSize, defaultTempQueueDownCacheSize, false, false, -1, false, jndiBindings); } + @Override public void deployConnectionFactory(final String objectName, final boolean supportsFailover, final boolean supportsLoadBalancing, @@ -237,6 +256,7 @@ public class LocalTestServer implements Server, Runnable { this.deployConnectionFactory(null, JMSFactoryType.CF, objectName, -1, -1, -1, -1, supportsFailover, supportsLoadBalancing, -1, false, jndiBindings); } + @Override public void deployConnectionFactory(final String clientId, final JMSFactoryType type, final String objectName, @@ -258,10 +278,12 @@ public class LocalTestServer implements Server, Runnable { getJMSServerManager().createConnectionFactory(objectName, false, type, connectors, clientId, ActiveMQClient.DEFAULT_CLIENT_FAILURE_CHECK_PERIOD, ActiveMQClient.DEFAULT_CONNECTION_TTL, ActiveMQClient.DEFAULT_CALL_TIMEOUT, ActiveMQClient.DEFAULT_CALL_FAILOVER_TIMEOUT, ActiveMQClient.DEFAULT_CACHE_LARGE_MESSAGE_CLIENT, ActiveMQClient.DEFAULT_MIN_LARGE_MESSAGE_SIZE, ActiveMQClient.DEFAULT_COMPRESS_LARGE_MESSAGES, prefetchSize, ActiveMQClient.DEFAULT_CONSUMER_MAX_RATE, ActiveMQClient.DEFAULT_CONFIRMATION_WINDOW_SIZE, ActiveMQClient.DEFAULT_PRODUCER_WINDOW_SIZE, ActiveMQClient.DEFAULT_PRODUCER_MAX_RATE, blockOnAcknowledge, true, true, ActiveMQClient.DEFAULT_AUTO_GROUP, ActiveMQClient.DEFAULT_PRE_ACKNOWLEDGE, ActiveMQClient.DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME, ActiveMQClient.DEFAULT_ACK_BATCH_SIZE, dupsOkBatchSize, ActiveMQClient.DEFAULT_USE_GLOBAL_POOLS, ActiveMQClient.DEFAULT_SCHEDULED_THREAD_POOL_MAX_SIZE, ActiveMQClient.DEFAULT_THREAD_POOL_MAX_SIZE, ActiveMQClient.DEFAULT_RETRY_INTERVAL, ActiveMQClient.DEFAULT_RETRY_INTERVAL_MULTIPLIER, ActiveMQClient.DEFAULT_MAX_RETRY_INTERVAL, ActiveMQClient.DEFAULT_RECONNECT_ATTEMPTS, ActiveMQClient.DEFAULT_FAILOVER_ON_INITIAL_CONNECTION, null, jndiBindings); } + @Override public void undeployConnectionFactory(final String objectName) throws Exception { getJMSServerManager().destroyConnectionFactory(objectName); } + @Override public void configureSecurityForDestination(final String destName, final boolean isQueue, final Set roles) throws Exception { @@ -282,14 +304,17 @@ public class LocalTestServer implements Server, Runnable { // Private -------------------------------------------------------------------------------------- + @Override public ActiveMQServer getActiveMQServer() { return jmsServerManager.getActiveMQServer(); } + @Override public JMSServerManager getJMSServerManager() { return jmsServerManager; } + @Override public InitialContext getInitialContext() throws Exception { Properties props = new Properties(); props.setProperty("java.naming.factory.initial", "org.apache.activemq.artemis.jms.tests.tools.container.InVMInitialContextFactory"); @@ -297,6 +322,7 @@ public class LocalTestServer implements Server, Runnable { return new InitialContext(props); } + @Override public void run() { // bootstrap.run(); @@ -315,6 +341,7 @@ public class LocalTestServer implements Server, Runnable { } } + @Override public void removeAllMessages(final String destination, final boolean isQueue) throws Exception { if (isQueue) { JMSQueueControl queue = (JMSQueueControl) getActiveMQServer().getManagementService().getResource(ResourceNames.JMS_QUEUE + destination); @@ -326,6 +353,7 @@ public class LocalTestServer implements Server, Runnable { } } + @Override public List listAllSubscribersForTopic(final String s) throws Exception { ObjectName objectName = ObjectNameBuilder.DEFAULT.getJMSTopicObjectName(s); TopicControl topic = MBeanServerInvocationHandler.newProxyInstance(ManagementFactory.getPlatformMBeanServer(), objectName, TopicControl.class, false); @@ -338,10 +366,12 @@ public class LocalTestServer implements Server, Runnable { return subs; } + @Override public Set getSecurityConfig() throws Exception { return getActiveMQServer().getSecurityRepository().getMatch("*"); } + @Override public void setSecurityConfig(final Set defConfig) throws Exception { getActiveMQServer().getSecurityRepository().removeMatch("#"); getActiveMQServer().getSecurityRepository().addMatch("#", defConfig); diff --git a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java index d17133132b..ee67b63db5 100644 --- a/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java +++ b/tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container/NonSerializableFactory.java @@ -85,6 +85,7 @@ public final class NonSerializableFactory implements ObjectFactory { return NonSerializableFactory.getWrapperMap().get(name); } + @Override public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java index 1f2f9ccb74..9088758475 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/AbstractAdmin.java @@ -26,64 +26,80 @@ import org.objectweb.jtests.jms.admin.Admin; */ public class AbstractAdmin implements Admin { + @Override public String getName() { return getClass().getName(); } + @Override public void start() { } + @Override public void stop() throws Exception { } + @Override public InitialContext createContext() throws NamingException { return new InitialContext(); } + @Override public void createConnectionFactory(final String name) { throw new RuntimeException("FIXME NYI createConnectionFactory"); } + @Override public void deleteConnectionFactory(final String name) { throw new RuntimeException("FIXME NYI deleteConnectionFactory"); } + @Override public void createQueue(final String name) { throw new RuntimeException("FIXME NYI createQueue"); } + @Override public void deleteQueue(final String name) { throw new RuntimeException("FIXME NYI deleteQueue"); } + @Override public void createQueueConnectionFactory(final String name) { createConnectionFactory(name); } + @Override public void deleteQueueConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public void createTopic(final String name) { throw new RuntimeException("FIXME NYI createTopic"); } + @Override public void deleteTopic(final String name) { throw new RuntimeException("FIXME NYI deleteTopic"); } + @Override public void createTopicConnectionFactory(final String name) { createConnectionFactory(name); } + @Override public void deleteTopicConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public void startServer() { } + @Override public void stopServer() { } } diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java index f02902c7bf..94ebed1589 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/ActiveMQAdmin.java @@ -75,6 +75,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void start() throws Exception { serverLocator = ActiveMQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName())); sf = serverLocator.createSessionFactory(); @@ -84,6 +85,7 @@ public class ActiveMQAdmin implements Admin { } + @Override public void stop() throws Exception { requestor.close(); @@ -99,6 +101,7 @@ public class ActiveMQAdmin implements Admin { serverLocator = null; } + @Override public void createConnectionFactory(final String name) { createConnection(name, 0); } @@ -113,10 +116,12 @@ public class ActiveMQAdmin implements Admin { } + @Override public Context createContext() throws NamingException { return context; } + @Override public void createQueue(final String name) { Boolean result; try { @@ -128,10 +133,12 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createQueueConnectionFactory(final String name) { createConnection(name, 1); } + @Override public void createTopic(final String name) { Boolean result; try { @@ -143,10 +150,12 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void createTopicConnectionFactory(final String name) { createConnection(name, 2); } + @Override public void deleteConnectionFactory(final String name) { try { invokeSyncOperation(ResourceNames.JMS_SERVER, "destroyConnectionFactory", name); @@ -156,6 +165,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteQueue(final String name) { Boolean result; try { @@ -167,10 +177,12 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteQueueConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public void deleteTopic(final String name) { Boolean result; try { @@ -182,14 +194,17 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void deleteTopicConnectionFactory(final String name) { deleteConnectionFactory(name); } + @Override public String getName() { return this.getClass().getName(); } + @Override public void startServer() throws Exception { if (!serverLifeCycleActive) { return; @@ -228,6 +243,7 @@ public class ActiveMQAdmin implements Admin { } } + @Override public void stopServer() throws Exception { if (!serverLifeCycleActive) { return; diff --git a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java index 68b61fbbd3..5892ee4b27 100644 --- a/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java +++ b/tests/joram-tests/src/test/java/org/apache/activemq/artemis/jms/GenericAdmin.java @@ -33,79 +33,95 @@ public class GenericAdmin implements Admin { public static Admin delegate = new AbstractAdmin(); + @Override public String getName() { String name = GenericAdmin.delegate.getName(); GenericAdmin.log.debug("Using admin '" + name + "' delegate=" + GenericAdmin.delegate); return name; } + @Override public void start() throws Exception { } + @Override public void stop() throws Exception { } + @Override public Context createContext() throws NamingException { Context ctx = GenericAdmin.delegate.createContext(); GenericAdmin.log.debug("Using initial context: " + ctx.getEnvironment()); return ctx; } + @Override public void createConnectionFactory(final String name) { GenericAdmin.log.debug("createConnectionFactory '" + name + "'"); GenericAdmin.delegate.createConnectionFactory(name); } + @Override public void deleteConnectionFactory(final String name) { GenericAdmin.log.debug("deleteConnectionFactory '" + name + "'"); GenericAdmin.delegate.deleteConnectionFactory(name); } + @Override public void createQueue(final String name) { GenericAdmin.log.debug("createQueue '" + name + "'"); GenericAdmin.delegate.createQueue(name); } + @Override public void deleteQueue(final String name) { GenericAdmin.log.debug("deleteQueue '" + name + "'"); GenericAdmin.delegate.deleteQueue(name); } + @Override public void createQueueConnectionFactory(final String name) { GenericAdmin.log.debug("createQueueConnectionFactory '" + name + "'"); GenericAdmin.delegate.createQueueConnectionFactory(name); } + @Override public void deleteQueueConnectionFactory(final String name) { GenericAdmin.log.debug("deleteQueueConnectionFactory '" + name + "'"); GenericAdmin.delegate.deleteQueueConnectionFactory(name); } + @Override public void createTopic(final String name) { GenericAdmin.log.debug("createTopic '" + name + "'"); GenericAdmin.delegate.createTopic(name); } + @Override public void deleteTopic(final String name) { GenericAdmin.log.debug("deleteTopic '" + name + "'"); GenericAdmin.delegate.deleteTopic(name); } + @Override public void createTopicConnectionFactory(final String name) { GenericAdmin.log.debug("createTopicConnectionFactory '" + name + "'"); GenericAdmin.delegate.createTopicConnectionFactory(name); } + @Override public void deleteTopicConnectionFactory(final String name) { GenericAdmin.log.debug("deleteTopicConnectionFactory '" + name + "'"); GenericAdmin.delegate.deleteTopicConnectionFactory(name); } + @Override public void startServer() throws Exception { GenericAdmin.log.debug("startEmbeddedServer"); GenericAdmin.delegate.startServer(); } + @Override public void stopServer() throws Exception { GenericAdmin.log.debug("stopEmbeddedServer"); GenericAdmin.delegate.stopServer(); diff --git a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java index 26ed4bcf79..18c5fd937e 100644 --- a/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java +++ b/tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/connection/ConnectionTest.java @@ -166,6 +166,7 @@ public class ConnectionTest extends PTPTestCase { receiverConnection.stop(); receiver.setMessageListener(new MessageListener() { + @Override public void onMessage(final Message m) { try { Assert.fail("The message must not be received, the consumer connection is stopped"); diff --git a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java index 9c4a2674bc..cbbc6f2566 100644 --- a/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java +++ b/tests/performance-tests/src/test/java/org/apache/activemq/artemis/tests/performance/sends/MeasureCommitPerfTest.java @@ -27,6 +27,7 @@ public class MeasureCommitPerfTest extends AbstractSendReceivePerfTest { } /* This will by default send non persistent messages */ + @Override protected void sendMessages(Connection c, String qName) throws JMSException { Session s = c.createSession(true, Session.SESSION_TRANSACTED); diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java index 9a239fe69d..e0dc1f1317 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Receiver.java @@ -62,6 +62,7 @@ public class Receiver extends ClientAbstract { // Public -------------------------------------------------------- + @Override public void run() { super.run(); @@ -129,6 +130,7 @@ public class Receiver extends ClientAbstract { pendingMsgs = 0; } + @Override public String toString() { return "Receiver::" + this.queue + ", msgs=" + msgs + ", pending=" + pendingMsgs; } diff --git a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java index e1d18cfe49..6d40e8ce13 100644 --- a/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java +++ b/tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/client/Sender.java @@ -53,6 +53,7 @@ public class Sender extends ClientAbstract { producer = session.createProducer(queue); } + @Override public void run() { super.run(); while (running) { @@ -94,6 +95,7 @@ public class Sender extends ClientAbstract { pendingMsgs = 0; } + @Override public String toString() { return "Sender, msgs=" + msgs + ", pending=" + pendingMsgs; diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java index 54ac07507f..3bf033e3bb 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AddAndRemoveStressTest.java @@ -36,18 +36,23 @@ public class AddAndRemoveStressTest extends ActiveMQTestBase { private static final LoaderCallback dummyLoader = new LoaderCallback() { + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { } + @Override public void addRecord(final RecordInfo info) { } + @Override public void deleteRecord(final long id) { } + @Override public void updateRecord(final RecordInfo info) { } + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java index 00a5ac26c8..20f1d77784 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactStressTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.stress.journal; public class AllPossibilitiesCompactStressTest extends MixupCompactorTestBase { + @Override public void internalTest() throws Exception { createJournal(); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java index bfc2191e10..bbb4ec70d4 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/AllPossibilitiesCompactWithAddDeleteStressTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.artemis.tests.stress.journal; public class AllPossibilitiesCompactWithAddDeleteStressTest extends MixupCompactorTestBase { + @Override public void internalTest() throws Exception { createJournal(); diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java index 8d7dcabada..2bab97b95c 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/JournalCleanupCompactStressTest.java @@ -123,6 +123,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { @Override protected void onCompactStart() throws Exception { testExecutor.execute(new Runnable() { + @Override public void run() { try { // System.out.println("OnCompactStart enter"); @@ -226,6 +227,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { final CountDownLatch latchExecutorDone = new CountDownLatch(1); testExecutor.execute(new Runnable() { + @Override public void run() { latchExecutorDone.countDown(); } @@ -266,6 +268,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { ArrayList committedRecords = new ArrayList(); ArrayList preparedTransactions = new ArrayList(); journal.load(committedRecords, preparedTransactions, new TransactionFailureCallback() { + @Override public void failedTransaction(long transactionID, List records, List recordsToDelete) { } }); @@ -332,9 +335,11 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { ctx.executeOnCompletion(new IOCallback() { + @Override public void onError(final int errorCode, final String errorMessage) { } + @Override public void done() { numberOfRecords.addAndGet(txSize); for (Long id : ids) { @@ -434,6 +439,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { this.ids = ids; } + @Override public void done() { rwLock.readLock().lock(); numberOfUpdates.addAndGet(ids.length); @@ -457,6 +463,7 @@ public class JournalCleanupCompactStressTest extends ActiveMQTestBase { } } + @Override public void onError(final int errorCode, final String errorMessage) { } diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java index 42750aef05..a6133b2b8f 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/journal/MixupCompactorTestBase.java @@ -83,6 +83,7 @@ public abstract class MixupCompactorTestBase extends JournalImplTestBase { File[] files = testDir.listFiles(new FilenameFilter() { + @Override public boolean accept(final File dir, final String name) { return name.startsWith(filePrefix) && name.endsWith(fileExtension); } diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java index b40976a30c..d0e127ab15 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/paging/PageCursorStressTest.java @@ -145,6 +145,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { PageSubscription cursorEven = createNonPersistentCursor(new Filter() { + @Override public boolean match(ServerMessage message) { Boolean property = message.getBooleanProperty("even"); if (property == null) { @@ -155,6 +156,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { } } + @Override public SimpleString getFilterString() { return new SimpleString("even=true"); } @@ -163,6 +165,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { PageSubscription cursorOdd = createNonPersistentCursor(new Filter() { + @Override public boolean match(ServerMessage message) { Boolean property = message.getBooleanProperty("even"); if (property == null) { @@ -173,6 +176,7 @@ public class PageCursorStressTest extends ActiveMQTestBase { } } + @Override public SimpleString getFilterString() { return new SimpleString("even=true"); } diff --git a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java index bd4a1186b2..dbae369213 100644 --- a/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java +++ b/tests/stress-tests/src/test/java/org/apache/activemq/artemis/tests/stress/remote/PingStressTest.java @@ -71,6 +71,7 @@ public class PingStressTest extends ActiveMQTestBase { */ private void internalTest() throws Exception { Interceptor noPongInterceptor = new Interceptor() { + @Override public boolean intercept(final Packet packet, final RemotingConnection conn) throws ActiveMQException { PingStressTest.log.info("In interceptor, packet is " + packet.getType()); if (packet.getType() == PacketImpl.PING) { diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java index 2ff8886ef9..896fda8852 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/jms/bridge/impl/JMSBridgeImplTest.java @@ -93,33 +93,42 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { protected static TransactionManager newTransactionManager() { return new TransactionManager() { + @Override public Transaction suspend() throws SystemException { return null; } + @Override public void setTransactionTimeout(final int arg0) throws SystemException { } + @Override public void setRollbackOnly() throws IllegalStateException, SystemException { } + @Override public void rollback() throws IllegalStateException, SecurityException, SystemException { } + @Override public void resume(final Transaction arg0) throws InvalidTransactionException, IllegalStateException, SystemException { } + @Override public Transaction getTransaction() throws SystemException { return null; } + @Override public int getStatus() throws SystemException { return 0; } + @Override public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException { } + @Override public void begin() throws NotSupportedException, SystemException { } }; @@ -127,6 +136,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { private static DestinationFactory newDestinationFactory(final Destination dest) { return new DestinationFactory() { + @Override public Destination createDestination() throws Exception { return dest; } @@ -135,6 +145,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { private static ConnectionFactoryFactory newConnectionFactoryFactory(final ConnectionFactory cf) { return new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { return cf; } @@ -153,6 +164,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { private static ConnectionFactoryFactory newTCCLAwareConnectionFactoryFactory(final ConnectionFactory cf) { return new ConnectionFactoryFactory() { + @Override public ConnectionFactory createConnectionFactory() throws Exception { loadATCCLClass(); return cf; @@ -310,6 +322,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { final List messages = new LinkedList(); MessageListener listener = new MessageListener() { + @Override public void onMessage(final Message message) { messages.add(message); } @@ -368,6 +381,7 @@ public class JMSBridgeImplTest extends ActiveMQTestBase { final List messages = new LinkedList(); final CountDownLatch latch = new CountDownLatch(numMessages); MessageListener listener = new MessageListener() { + @Override public void onMessage(final Message message) { messages.add(message); latch.countDown(); diff --git a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java index a3b84264ce..6dca39773e 100644 --- a/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java +++ b/tests/timing-tests/src/test/java/org/apache/activemq/artemis/tests/timing/util/TokenBucketLimiterImplTest.java @@ -172,6 +172,7 @@ public class TokenBucketLimiterImplTest extends ActiveMQTestBase { TokenBucketLimiterImpl tbl = new TokenBucketLimiterImpl(rate, false, TimeUnit.SECONDS, window); Thread t = new Thread() { + @Override public void run() { int lastRun = 0; long lastTime = System.currentTimeMillis(); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java index 988c1d5e6f..d5a7f5a3be 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/asyncio/AIOTestBase.java @@ -100,6 +100,7 @@ public abstract class AIOTestBase extends ActiveMQTestBase { final AtomicInteger timesDoneCalled = new AtomicInteger(0); + @Override public void done() { if (outputList != null) { outputList.add(order); @@ -111,6 +112,7 @@ public abstract class AIOTestBase extends ActiveMQTestBase { } } + @Override public void onError(final int errorCode, final String errorMessage) { errorCalled++; if (outputList != null) { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java index 88fb109942..549e61d412 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/client/impl/LargeMessageBufferTest.java @@ -662,41 +662,51 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { static class FakeConsumerInternal implements ClientConsumerInternal { + @Override public ConsumerContext getConsumerContext() { return new ActiveMQConsumerContext(0); } + @Override public void close() throws ActiveMQException { } + @Override public Exception getLastException() { return null; } + @Override public MessageHandler getMessageHandler() throws ActiveMQException { return null; } + @Override public boolean isClosed() { return false; } + @Override public ClientMessage receive() throws ActiveMQException { return null; } + @Override public ClientMessage receive(final long timeout) throws ActiveMQException { return null; } + @Override public ClientMessage receiveImmediate() throws ActiveMQException { return null; } + @Override public FakeConsumerInternal setMessageHandler(final MessageHandler handler) throws ActiveMQException { return this; } + @Override public void acknowledge(final ClientMessage message) throws ActiveMQException { } @@ -704,31 +714,39 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { public void individualAcknowledge(ClientMessage message) throws ActiveMQException { } + @Override public void cleanUp() throws ActiveMQException { } + @Override public void clear(boolean waitForOnMessage) throws ActiveMQException { } + @Override public void clearAtFailover() { } + @Override public void flowControl(final int messageBytes, final boolean discountSlowConsumer) throws ActiveMQException { } + @Override public void flushAcks() throws ActiveMQException { } + @Override public int getBufferSize() { return 0; } + @Override public int getClientWindowSize() { return 0; } + @Override public SimpleString getFilterString() { return null; @@ -739,11 +757,13 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { return 0; } + @Override public SimpleString getQueueName() { return null; } + @Override public boolean isBrowseOnly() { return false; @@ -764,6 +784,7 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { boolean isContinues) throws Exception { } + @Override public void start() { } @@ -772,9 +793,11 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { } + @Override public void stop(boolean waitForOnMessage) throws ActiveMQException { } + @Override public ClientSession.QueueQuery getQueueInfo() { return null; } @@ -790,6 +813,7 @@ public class LargeMessageBufferTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.client.impl.ClientConsumerInternal#prepareForClose() */ + @Override public Thread prepareForClose(FutureLatch future) throws ActiveMQException { return null; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java index 4ef03ce4fe..110a621353 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/config/impl/ConnectorsServiceTest.java @@ -39,6 +39,7 @@ public class ConnectorsServiceTest extends ActiveMQTestBase { private ServiceRegistry serviceRegistry; + @Override @Before public void setUp() throws Exception { // Setup Configuration diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java index bac9b89f77..97cd4fe8b6 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/AlignedJournalImplTest.java @@ -51,18 +51,23 @@ public class AlignedJournalImplTest extends ActiveMQTestBase { private static final LoaderCallback dummyLoader = new LoaderCallback() { + @Override public void addPreparedTransaction(final PreparedTransactionInfo preparedTransaction) { } + @Override public void addRecord(final RecordInfo info) { } + @Override public void deleteRecord(final long id) { } + @Override public void updateRecord(final RecordInfo info) { } + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { @@ -1305,6 +1310,7 @@ public class AlignedJournalImplTest extends ActiveMQTestBase { incompleteTransactions.clear(); journalImpl.load(records, transactions, new TransactionFailureCallback() { + @Override public void failedTransaction(final long transactionID, final List records, final List recordsToDelete) { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java index d67a2b2c03..4c6c4e7da6 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestBase.java @@ -210,6 +210,7 @@ public abstract class JournalImplTestBase extends ActiveMQTestBase { File dir = new File(getTestDir()); FilenameFilter fnf = new FilenameFilter() { + @Override public boolean accept(final File file, final String name) { return name.endsWith("." + fileExtension); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java index 47752e4316..02f1e9e19b 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java @@ -35,6 +35,7 @@ import org.junit.Test; public abstract class JournalImplTestUnit extends JournalImplTestBase { + @Override @After public void tearDown() throws Exception { List files = fileFactory.listFiles(fileExtension); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java index 4d3009fb7e..53849c73cd 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/ReclaimerTest.java @@ -741,6 +741,7 @@ public class ReclaimerTest extends ActiveMQTestBase { public void extendOffset(final int delta) { } + @Override public SequentialFile getFile() { return null; } @@ -749,6 +750,7 @@ public class ReclaimerTest extends ActiveMQTestBase { return 0; } + @Override public long getFileID() { return 0; } @@ -756,6 +758,7 @@ public class ReclaimerTest extends ActiveMQTestBase { public void setOffset(final long offset) { } + @Override public int getNegCount(final JournalFile file) { Integer count = negCounts.get(file); @@ -767,6 +770,7 @@ public class ReclaimerTest extends ActiveMQTestBase { } } + @Override public void incNegCount(final JournalFile file) { Integer count = negCounts.get(file); @@ -777,22 +781,27 @@ public class ReclaimerTest extends ActiveMQTestBase { totalDep++; } + @Override public int getPosCount() { return posCount; } + @Override public void incPosCount() { posCount++; } + @Override public void decPosCount() { posCount--; } + @Override public boolean isCanReclaim() { return canDelete; } + @Override public void setCanReclaim(final boolean canDelete) { this.canDelete = canDelete; } @@ -859,6 +868,7 @@ public class ReclaimerTest extends ActiveMQTestBase { return 0; } + @Override public void addSize(final int bytes) { } @@ -869,6 +879,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getSize() */ + @Override public int getLiveSize() { return 0; } @@ -898,6 +909,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getRecordID() */ + @Override public int getRecordID() { return 0; } @@ -905,6 +917,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getTotalNegativeToOthers() */ + @Override public int getTotalNegativeToOthers() { return totalDep; } @@ -912,6 +925,7 @@ public class ReclaimerTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.journal.impl.JournalFile#getJournalVersion() */ + @Override public int getJournalVersion() { return JournalImpl.FORMAT_VERSION; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java index f80beed78c..537cabf17a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/TimedBufferTest.java @@ -48,9 +48,11 @@ public class TimedBufferTest extends ActiveMQTestBase { IOCallback dummyCallback = new IOCallback() { + @Override public void done() { } + @Override public void onError(final int errorCode, final String errorMessage) { } }; @@ -61,6 +63,7 @@ public class TimedBufferTest extends ActiveMQTestBase { final AtomicInteger flushTimes = new AtomicInteger(0); class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List callbacks) { buffers.add(buffer); flushTimes.incrementAndGet(); @@ -69,10 +72,12 @@ public class TimedBufferTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } @@ -127,6 +132,7 @@ public class TimedBufferTest extends ActiveMQTestBase { final AtomicInteger flushTimes = new AtomicInteger(0); class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List callbacks) { buffers.add(buffer); flushTimes.incrementAndGet(); @@ -135,10 +141,12 @@ public class TimedBufferTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } @@ -210,16 +218,19 @@ public class TimedBufferTest extends ActiveMQTestBase { public void testVerifySwitchToSpin() throws Exception { class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List callbacks) { } /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } @@ -285,16 +296,19 @@ public class TimedBufferTest extends ActiveMQTestBase { public void testStillSleeps() throws Exception { class TestObserver implements TimedBufferObserver { + @Override public void flushBuffer(final ByteBuffer buffer, final boolean sync, final List callbacks) { } /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.timedbuffer.TimedBufferObserver#newBuffer(int, int) */ + @Override public ByteBuffer newBuffer(final int minSize, final int maxSize) { return ByteBuffer.allocate(maxSize); } + @Override public int getRemainingBytes() { return 1024 * 1024; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java index 820c93c41b..7ab0abf683 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/FakeSequentialFileFactory.java @@ -66,6 +66,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { // Public -------------------------------------------------------- + @Override public SequentialFile createSequentialFile(final String fileName) { FakeSequentialFile sf = fileMap.get(fileName); @@ -83,6 +84,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return sf; } + @Override public void clearBuffer(final ByteBuffer buffer) { final int limit = buffer.limit(); buffer.rewind(); @@ -94,6 +96,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { buffer.rewind(); } + @Override public List listFiles(final String extension) { List files = new ArrayList(); @@ -114,10 +117,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { fileMap.clear(); } + @Override public boolean isSupportsCallbacks() { return supportsCallback; } + @Override public ByteBuffer newBuffer(int size) { if (size % alignment != 0) { size = (size / alignment + 1) * alignment; @@ -125,6 +130,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return ByteBuffer.allocate(size); } + @Override public int calculateBlockSize(final int position) { int alignment = getAlignment(); @@ -133,6 +139,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return pos; } + @Override public ByteBuffer wrapBuffer(final byte[] bytes) { return ByteBuffer.wrap(bytes); } @@ -177,6 +184,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return callbacksInHold.size(); } + @Override public int getAlignment() { return alignment; } @@ -217,6 +225,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { this.callback = callback; } + @Override public void run() { if (sendError) { @@ -253,6 +262,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { return data; } + @Override public boolean isOpen() { return open; } @@ -264,6 +274,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { this.fileName = fileName; } + @Override public synchronized void close() { open = false; @@ -274,6 +285,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { notifyAll(); } + @Override public void delete() { if (open) { close(); @@ -282,19 +294,23 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { fileMap.remove(fileName); } + @Override public String getFileName() { return fileName; } + @Override public void open() throws Exception { open(1, true); } + @Override public synchronized void open(final int currentMaxIO, final boolean useExecutor) throws Exception { open = true; checkAndResize(0); } + @Override public void fill(final int size) throws Exception { if (!open) { throw new IllegalStateException("Is closed"); @@ -312,10 +328,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } } + @Override public int read(final ByteBuffer bytes) throws Exception { return read(bytes, null); } + @Override public int read(final ByteBuffer bytes, final IOCallback callback) throws Exception { if (!open) { throw new IllegalStateException("Is closed"); @@ -347,10 +365,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { data.position((int) pos); } + @Override public long position() { return data.position(); } + @Override public synchronized void writeDirect(final ByteBuffer bytes, final boolean sync, final IOCallback callback) { if (!open) { throw new IllegalStateException("Is closed"); @@ -379,12 +399,14 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } + @Override public void sync() throws IOException { if (supportsCallback) { throw new IllegalStateException("sync is not supported when supportsCallback=true"); } } + @Override public long size() throws Exception { if (data == null) { return 0; @@ -394,6 +416,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } } + @Override public void writeDirect(final ByteBuffer bytes, final boolean sync) throws Exception { writeDirect(bytes, sync, null); } @@ -434,10 +457,12 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { } } + @Override public int getAlignment() throws Exception { return alignment; } + @Override public int calculateBlockStart(final int position) throws Exception { int pos = (position / alignment + (position % alignment != 0 ? 1 : 0)) * alignment; @@ -458,6 +483,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#renameTo(org.apache.activemq.artemis.core.io.SequentialFile) */ + @Override public void renameTo(final String newFileName) throws Exception { fileMap.remove(fileName); fileName = newFileName; @@ -467,6 +493,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#fits(int) */ + @Override public boolean fits(final int size) { return data.position() + size <= data.limit(); } @@ -489,6 +516,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { public void enableAutoFlush() { } + @Override public SequentialFile cloneFile() { return null; // To change body of implemented methods use File | Settings | File Templates. } @@ -496,6 +524,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer, boolean, org.apache.activemq.artemis.core.journal.IOCallback) */ + @Override public void write(final ActiveMQBuffer bytes, final boolean sync, final IOCallback callback) throws Exception { bytes.writerIndex(bytes.capacity()); bytes.readerIndex(0); @@ -506,6 +535,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.spi.core.remoting.ActiveMQBuffer, boolean) */ + @Override public void write(final ActiveMQBuffer bytes, final boolean sync) throws Exception { bytes.writerIndex(bytes.capacity()); bytes.readerIndex(0); @@ -515,6 +545,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.core.journal.EncodingSupport, boolean, org.apache.activemq.artemis.core.journal.IOCompletion) */ + @Override public void write(final EncodingSupport bytes, final boolean sync, final IOCallback callback) throws Exception { ByteBuffer buffer = newBuffer(bytes.getEncodeSize()); ActiveMQBuffer outbuffer = ActiveMQBuffers.wrappedBuffer(buffer); @@ -525,6 +556,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#write(org.apache.activemq.artemis.core.journal.EncodingSupport, boolean) */ + @Override public void write(final EncodingSupport bytes, final boolean sync) throws Exception { ByteBuffer buffer = newBuffer(bytes.getEncodeSize()); ActiveMQBuffer outbuffer = ActiveMQBuffers.wrappedBuffer(buffer); @@ -535,6 +567,7 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#exists() */ + @Override public boolean exists() { FakeSequentialFile file = fileMap.get(fileName); @@ -544,12 +577,14 @@ public class FakeSequentialFileFactory implements SequentialFileFactory { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#setTimedBuffer(org.apache.activemq.artemis.core.io.buffer.TimedBuffer) */ + @Override public void setTimedBuffer(final TimedBuffer buffer) { } /* (non-Javadoc) * @see org.apache.activemq.artemis.core.io.SequentialFile#copyTo(org.apache.activemq.artemis.core.io.SequentialFile) */ + @Override public void copyTo(SequentialFile newFileName) { // TODO Auto-generated method stub diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java index 87acb21f77..42a06314cf 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/fakes/SimpleEncoding.java @@ -41,17 +41,20 @@ public class SimpleEncoding implements EncodingSupport { } // Public -------------------------------------------------------- + @Override public void decode(final ActiveMQBuffer buffer) { throw new UnsupportedOperationException(); } + @Override public void encode(final ActiveMQBuffer buffer) { for (int i = 0; i < size; i++) { buffer.writeByte(bytetosend); } } + @Override public int getEncodeSize() { return size; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java index 719da0a9cb..e1dd4cc012 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/persistence/impl/OperationContextUnitTest.java @@ -51,9 +51,11 @@ public class OperationContextUnitTest extends ActiveMQTestBase { impl.executeOnCompletion(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { latch1.countDown(); } @@ -68,9 +70,11 @@ public class OperationContextUnitTest extends ActiveMQTestBase { impl.executeOnCompletion(new IOCallback() { + @Override public void onError(int errorCode, String errorMessage) { } + @Override public void done() { latch2.countDown(); } @@ -193,10 +197,12 @@ public class OperationContextUnitTest extends ActiveMQTestBase { // We should be up to date with lineUps and executions. this should now just finish processing context.executeOnCompletion(new IOCallback() { + @Override public void done() { operations.incrementAndGet(); } + @Override public void onError(final int errorCode, final String errorMessage) { failures.incrementAndGet(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java index 3bfd628e24..a644718188 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/BindingsImplTest.java @@ -104,6 +104,7 @@ public class BindingsImplTest extends ActiveMQTestBase { private final class FakeTransaction implements Transaction { + @Override public void addOperation(final TransactionOperation sync) { } @@ -113,28 +114,34 @@ public class BindingsImplTest extends ActiveMQTestBase { return false; } + @Override public boolean hasTimedOut(long currentTime, int defaultTimeout) { return false; } + @Override public void commit() throws Exception { } + @Override public void commit(final boolean onePhase) throws Exception { } + @Override public long getCreateTime() { return 0; } + @Override public long getID() { return 0; } + @Override public Object getProperty(final int index) { return null; @@ -145,23 +152,28 @@ public class BindingsImplTest extends ActiveMQTestBase { return false; } + @Override public State getState() { return null; } + @Override public Xid getXid() { return null; } + @Override public void markAsRollbackOnly(final ActiveMQException exception) { } + @Override public void prepare() throws Exception { } + @Override public void putProperty(final int index, final Object property) { } @@ -170,6 +182,7 @@ public class BindingsImplTest extends ActiveMQTestBase { } + @Override public void resume() { } @@ -177,6 +190,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.transaction.Transaction#rollback() */ + @Override public void rollback() throws Exception { } @@ -184,6 +198,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.transaction.Transaction#setState(org.apache.activemq.artemis.core.transaction.Transaction.State) */ + @Override public void setState(final State state) { } @@ -191,6 +206,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.transaction.Transaction#suspend() */ + @Override public void suspend() { } @@ -202,14 +218,17 @@ public class BindingsImplTest extends ActiveMQTestBase { return Collections.emptySet(); } + @Override public void setContainsPersistent() { } + @Override public void setTimeout(int timeout) { } + @Override public List getAllOperations() { return null; } @@ -229,6 +248,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.filter.Filter#getFilterString() */ + @Override public SimpleString getFilterString() { return null; } @@ -236,6 +256,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.filter.Filter#match(org.apache.activemq.artemis.core.server.ServerMessage) */ + @Override public boolean match(final ServerMessage message) { return false; } @@ -244,6 +265,7 @@ public class BindingsImplTest extends ActiveMQTestBase { private final class FakeBinding implements Binding { + @Override public void close() throws Exception { } @@ -259,6 +281,7 @@ public class BindingsImplTest extends ActiveMQTestBase { this.name = name; } + @Override public SimpleString getAddress() { return null; } @@ -266,6 +289,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getBindable() */ + @Override public Bindable getBindable() { return null; @@ -274,6 +298,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getClusterName() */ + @Override public SimpleString getClusterName() { return null; @@ -282,6 +307,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getDistance() */ + @Override public int getDistance() { return 0; } @@ -289,10 +315,12 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getFilter() */ + @Override public Filter getFilter() { return new FakeFilter(); } + @Override public long getID() { return 0; } @@ -300,6 +328,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getRoutingName() */ + @Override public SimpleString getRoutingName() { return name; } @@ -307,6 +336,7 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getType() */ + @Override public BindingType getType() { return null; @@ -315,18 +345,22 @@ public class BindingsImplTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.postoffice.Binding#getUniqueName() */ + @Override public SimpleString getUniqueName() { return null; } + @Override public boolean isExclusive() { return false; } + @Override public boolean isHighAcceptPriority(final ServerMessage message) { return false; } + @Override public void route(final ServerMessage message, final RoutingContext context) throws Exception { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java index 4aefc9a55f..d53a51e670 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/FakeQueue.java @@ -45,6 +45,7 @@ public class FakeQueue implements Queue { public void deleteQueue(boolean removeConsumers) throws Exception { } + @Override public void unproposed(SimpleString groupID) { } @@ -72,11 +73,13 @@ public class FakeQueue implements Queue { PageSubscription subs; + @Override public boolean isDirectDeliver() { // no-op return false; } + @Override public void close() { // no-op @@ -87,35 +90,42 @@ public class FakeQueue implements Queue { } + @Override public void reload(MessageReference ref) { // no-op } + @Override public boolean flushExecutor() { return true; } + @Override public void addHead(MessageReference ref) { // no-op } + @Override public void addHead(List ref) { // no-op } + @Override public void addTail(MessageReference ref, boolean direct) { // no-op } + @Override public void addTail(MessageReference ref) { // no-op } + @Override public void resetAllIterators() { // no-op @@ -323,6 +333,7 @@ public class FakeQueue implements Queue { return name; } + @Override public SimpleString getAddress() { // no-op return null; @@ -404,11 +415,13 @@ public class FakeQueue implements Queue { } + @Override public void referenceHandled() { // no-op } + @Override public void removeConsumer(final Consumer consumer) { } @@ -417,21 +430,25 @@ public class FakeQueue implements Queue { return null; } + @Override public MessageReference removeReferenceWithID(final long id1) throws Exception { // no-op return null; } + @Override public void resume() { // no-op } + @Override public boolean sendMessageToDeadLetterAddress(final long messageID) throws Exception { // no-op return false; } + @Override public int sendMessagesToDeadLetterAddress(Filter filter) throws Exception { // no-op return 0; @@ -453,11 +470,13 @@ public class FakeQueue implements Queue { } + @Override public boolean hasMatchingConsumer(final ServerMessage message) { // no-op return false; } + @Override public Executor getExecutor() { // no-op return null; @@ -515,6 +534,7 @@ public class FakeQueue implements Queue { /* (non-Javadoc) * @see org.apache.activemq.artemis.core.server.Queue#destroyPaging() */ + @Override public void destroyPaging() { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java index 6c298f66e2..6f177706f9 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/postoffice/impl/WildcardAddressManagerUnitTest.java @@ -73,6 +73,7 @@ public class WildcardAddressManagerUnitTest extends ActiveMQTestBase { class BindingFactoryFake implements BindingsFactory { + @Override public Bindings createBindings(SimpleString address) throws Exception { return new BindignsFake(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java index 470122860a..a8fdfabec4 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorFactoryTest.java @@ -43,23 +43,28 @@ public class NettyAcceptorFactoryTest extends ActiveMQTestBase { Map params = new HashMap(); BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java index 7743020193..55aae43f02 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyAcceptorTest.java @@ -66,6 +66,7 @@ public class NettyAcceptorTest extends ActiveMQTestBase { public void testStartStop() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -73,17 +74,21 @@ public class NettyAcceptorTest extends ActiveMQTestBase { Map params = new HashMap(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java index a4e6810a7f..b96a9be112 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectionTest.java @@ -78,20 +78,24 @@ public class NettyConnectionTest extends ActiveMQTestBase { class MyListener implements ConnectionLifeCycleListener { + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java index ca9bf0d74e..fb6a5d85d0 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java @@ -39,22 +39,27 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testStartStop() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; Map params = new HashMap(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -70,22 +75,27 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testNullParams() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; Map params = new HashMap(); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -112,6 +122,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testJavaSystemPropertyOverrides() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -122,17 +133,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path"); params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -153,6 +168,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testActiveMQSystemPropertyOverrides() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -163,17 +179,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path"); params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad password"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -199,6 +219,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testBadCipherSuite() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -206,17 +227,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true); params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, "myBadCipherSuite"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; @@ -233,6 +258,7 @@ public class NettyConnectorTest extends ActiveMQTestBase { @Test public void testBadProtocol() throws Exception { BufferHandler handler = new BufferHandler() { + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { } }; @@ -240,17 +266,21 @@ public class NettyConnectorTest extends ActiveMQTestBase { params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true); params.put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, "myBadProtocol"); ConnectionLifeCycleListener listener = new ConnectionLifeCycleListener() { + @Override public void connectionException(final Object connectionID, final ActiveMQException me) { } + @Override public void connectionDestroyed(final Object connectionID) { } + @Override public void connectionCreated(final ActiveMQComponent component, final Connection connection, final String protocol) { } + @Override public void connectionReadyForWrites(Object connectionID, boolean ready) { } }; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java index f351dfb725..838c829aa6 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/server/impl/fake/FakeAcceptorFactory.java @@ -47,6 +47,7 @@ public class FakeAcceptorFactory implements AcceptorFactory { private final class FakeAcceptor implements Acceptor { + @Override public String getName() { return "fake"; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/QueueImplTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/QueueImplTest.java index 1e57f234d2..8b4e26564a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/QueueImplTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/QueueImplTest.java @@ -155,10 +155,12 @@ public class QueueImplTest extends ActiveMQTestBase { Assert.assertNull(queue.getFilter()); Filter filter = new Filter() { + @Override public boolean match(final ServerMessage message) { return false; } + @Override public SimpleString getFilterString() { return null; } @@ -1226,6 +1228,7 @@ public class QueueImplTest extends ActiveMQTestBase { this.first = first; } + @Override public void run() { if (first) { queue.addHead(messageReference); diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeConsumer.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeConsumer.java index dc109b143a..735567493f 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeConsumer.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeConsumer.java @@ -45,10 +45,12 @@ public class FakeConsumer implements Consumer { this.filter = filter; } + @Override public Filter getFilter() { return filter; } + @Override public String debug() { return toString(); } @@ -89,6 +91,7 @@ public class FakeConsumer implements Consumer { references.clear(); } + @Override public synchronized HandleStatus handle(final MessageReference reference) { if (statusToReturn == HandleStatus.BUSY) { return HandleStatus.BUSY; @@ -142,6 +145,7 @@ public class FakeConsumer implements Consumer { //To change body of implemented methods use File | Settings | File Templates. } + @Override public List getDeliveringMessages() { return Collections.emptyList(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeFilter.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeFilter.java index 51f07808c2..9d7f0e19ac 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeFilter.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeFilter.java @@ -35,6 +35,7 @@ public class FakeFilter implements Filter { public FakeFilter() { } + @Override public boolean match(final ServerMessage message) { if (headerName != null) { Object value = message.getObjectProperty(new SimpleString(headerName)); @@ -53,6 +54,7 @@ public class FakeFilter implements Filter { return true; } + @Override public SimpleString getFilterString() { return null; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java index dc51f0e9c8..27d9c33675 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakePostOffice.java @@ -80,6 +80,7 @@ public class FakePostOffice implements PostOffice { return null; } + @Override public Bindings lookupBindingsForAddress(final SimpleString address) throws Exception { return null; @@ -122,12 +123,14 @@ public class FakePostOffice implements PostOffice { } + @Override public Pair redistribute(final ServerMessage message, final Queue originatingQueue, final Transaction tx) throws Exception { return null; } + @Override public MessageReference reroute(final ServerMessage message, final Queue queue, final Transaction tx) throws Exception { @@ -135,6 +138,7 @@ public class FakePostOffice implements PostOffice { return new MessageReferenceImpl(); } + @Override public void route(ServerMessage message, QueueCreator creator, RoutingContext context, @@ -142,6 +146,7 @@ public class FakePostOffice implements PostOffice { } + @Override public void route(ServerMessage message, QueueCreator creator, Transaction tx, boolean direct) throws Exception { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeQueueFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeQueueFactory.java index 288b6f9900..021915349d 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeQueueFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/server/impl/fakes/FakeQueueFactory.java @@ -36,6 +36,7 @@ public class FakeQueueFactory implements QueueFactory { private PostOffice postOffice; + @Override public Queue createQueue(final long persistenceID, final SimpleString address, final SimpleString name, @@ -48,6 +49,7 @@ public class FakeQueueFactory implements QueueFactory { return new QueueImpl(persistenceID, address, name, filter, subscription, user, durable, temporary, autoCreated, scheduledExecutor, postOffice, null, null, executor); } + @Override public void setPostOffice(final PostOffice postOffice) { this.postOffice = postOffice; diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java index b319dfbc64..614084ee4e 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/jms/client/ActiveMQStreamMessageTest.java @@ -71,6 +71,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadBooleanFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readBoolean(); } @@ -80,6 +81,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadBooleanFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readBoolean(); } @@ -89,6 +91,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadCharFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readChar(); } @@ -98,6 +101,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadCharFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readChar(); } @@ -129,6 +133,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadByteFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -138,6 +143,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadByteFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -175,6 +181,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadBytesFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomBoolean(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -184,6 +191,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadBytesFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { byte[] bytes = new byte[1]; return message.readBytes(bytes); @@ -227,6 +235,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadShortFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readShort(); } @@ -236,6 +245,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadShortFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readShort(); } @@ -289,6 +299,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadIntFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readInt(); } @@ -298,6 +309,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadIntFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readInt(); } @@ -388,6 +400,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadLongFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readLong(); } @@ -397,6 +410,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadLongFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readLong(); } @@ -428,6 +442,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadFloatFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomBoolean(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readFloat(); } @@ -437,6 +452,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadFloatFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readFloat(); } @@ -479,6 +495,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadDoubleFromInvalidType() throws Exception { doReadTypeFromInvalidType(RandomUtil.randomBoolean(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readDouble(); } @@ -488,6 +505,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadDoubleFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readDouble(); } @@ -625,6 +643,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testReadStringFromEmptyMessage() throws Exception { doReadTypeFromEmptyMessage(new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readString(); } @@ -634,6 +653,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithBoolean() throws Exception { doWriteObjectWithType(RandomUtil.randomBoolean(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readBoolean(); } @@ -643,6 +663,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithChar() throws Exception { doWriteObjectWithType(RandomUtil.randomChar(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readChar(); } @@ -652,6 +673,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithByte() throws Exception { doWriteObjectWithType(RandomUtil.randomByte(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readByte(); } @@ -662,6 +684,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { public void testWriteObjectWithBytes() throws Exception { final byte[] value = RandomUtil.randomBytes(); doWriteObjectWithType(value, new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { byte[] bytes = new byte[value.length]; message.readBytes(bytes); @@ -673,6 +696,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithShort() throws Exception { doWriteObjectWithType(RandomUtil.randomShort(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readShort(); } @@ -682,6 +706,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithInt() throws Exception { doWriteObjectWithType(RandomUtil.randomInt(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readInt(); } @@ -691,6 +716,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithLong() throws Exception { doWriteObjectWithType(RandomUtil.randomLong(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readLong(); } @@ -700,6 +726,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithFloat() throws Exception { doWriteObjectWithType(RandomUtil.randomFloat(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readFloat(); } @@ -709,6 +736,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithDouble() throws Exception { doWriteObjectWithType(RandomUtil.randomDouble(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readDouble(); } @@ -718,6 +746,7 @@ public class ActiveMQStreamMessageTest extends ActiveMQTestBase { @Test public void testWriteObjectWithString() throws Exception { doWriteObjectWithType(RandomUtil.randomString(), new TypeReader() { + @Override public Object readType(final ActiveMQStreamMessage message) throws Exception { return message.readString(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/ra/BootstrapContext.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/ra/BootstrapContext.java index 30f385da48..b69ec518b6 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/ra/BootstrapContext.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/ra/BootstrapContext.java @@ -27,25 +27,31 @@ import java.util.Timer; public class BootstrapContext implements javax.resource.spi.BootstrapContext { + @Override public Timer createTimer() throws UnavailableException { return null; } + @Override public WorkManager getWorkManager() { return new WorkManager() { + @Override public void doWork(final Work work) throws WorkException { } + @Override public void doWork(final Work work, final long l, final ExecutionContext executionContext, final WorkListener workListener) throws WorkException { } + @Override public long startWork(final Work work) throws WorkException { return 0; } + @Override public long startWork(final Work work, final long l, final ExecutionContext executionContext, @@ -53,10 +59,12 @@ public class BootstrapContext implements javax.resource.spi.BootstrapContext { return 0; } + @Override public void scheduleWork(final Work work) throws WorkException { work.run(); } + @Override public void scheduleWork(final Work work, final long l, final ExecutionContext executionContext, @@ -65,6 +73,7 @@ public class BootstrapContext implements javax.resource.spi.BootstrapContext { }; } + @Override public XATerminator getXATerminator() { return null; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/FakePagingManager.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/FakePagingManager.java index e51252f619..9faf3075bb 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/FakePagingManager.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/FakePagingManager.java @@ -35,6 +35,7 @@ public final class FakePagingManager implements PagingManager { return 0; } + @Override public void addTransaction(final PageTransactionInfo pageTransaction) { } @@ -46,6 +47,7 @@ public final class FakePagingManager implements PagingManager { return 0; } + @Override public SimpleString[] getStoreNames() { return null; } @@ -54,13 +56,16 @@ public final class FakePagingManager implements PagingManager { return 0; } + @Override public PagingStore getPageStore(final SimpleString address) throws Exception { return null; } + @Override public void deletePageStore(SimpleString storeName) throws Exception { } + @Override public PageTransactionInfo getTransaction(final long transactionID) { return null; } @@ -87,9 +92,11 @@ public final class FakePagingManager implements PagingManager { return false; } + @Override public void reloadStores() throws Exception { } + @Override public void removeTransaction(final long transactionID) { } @@ -106,13 +113,16 @@ public final class FakePagingManager implements PagingManager { public void sync(final Collection destinationsToSync) throws Exception { } + @Override public boolean isStarted() { return false; } + @Override public void start() throws Exception { } + @Override public void stop() throws Exception { } @@ -128,6 +138,7 @@ public final class FakePagingManager implements PagingManager { * (non-Javadoc) * @see org.apache.activemq.artemis.core.paging.PagingManager#getTransactions() */ + @Override public Map getTransactions() { return null; } @@ -136,6 +147,7 @@ public final class FakePagingManager implements PagingManager { * (non-Javadoc) * @see org.apache.activemq.artemis.core.paging.PagingManager#processReload() */ + @Override public void processReload() { } @@ -151,6 +163,7 @@ public final class FakePagingManager implements PagingManager { * (non-Javadoc) * @see org.apache.activemq.artemis.core.settings.HierarchicalRepositoryChangeListener#onChange() */ + @Override public void onChange() { } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMContext.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMContext.java index 526f0fc8e2..6d398f176a 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMContext.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMContext.java @@ -67,10 +67,12 @@ public class InVMContext implements Context, Serializable { // Context implementation ---------------------------------------- + @Override public Object lookup(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookup(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -95,26 +97,32 @@ public class InVMContext implements Context, Serializable { } } + @Override public void bind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void bind(final String name, final Object obj) throws NamingException { internalBind(name, obj, false); } + @Override public void rebind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rebind(final String name, final Object obj) throws NamingException { internalBind(name, obj, true); } + @Override public void unbind(final Name name) throws NamingException { unbind(name.toString()); } + @Override public void unbind(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -132,26 +140,32 @@ public class InVMContext implements Context, Serializable { } } + @Override public void rename(final Name oldName, final Name newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rename(final String oldName, final String newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(String contextName) throws NamingException { contextName = trimSlashes(contextName); if (!"".equals(contextName) && !".".equals(contextName)) { @@ -172,18 +186,22 @@ public class InVMContext implements Context, Serializable { return new NamingEnumerationImpl(l.iterator()); } + @Override public void destroySubcontext(final Name name) throws NamingException { destroySubcontext(name.toString()); } + @Override public void destroySubcontext(final String name) throws NamingException { map.remove(trimSlashes(name)); } + @Override public Context createSubcontext(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Context createSubcontext(String name) throws NamingException { name = trimSlashes(name); if (map.get(name) != null) { @@ -194,47 +212,58 @@ public class InVMContext implements Context, Serializable { return c; } + @Override public Object lookupLink(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookupLink(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); } + @Override public NameParser getNameParser(final String name) throws NamingException { return parser; } + @Override public Name composeName(final Name name, final Name prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public String composeName(final String name, final String prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object addToEnvironment(final String propName, final Object propVal) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object removeFromEnvironment(final String propName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Hashtable getEnvironment() throws NamingException { Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jms.tests.tools.container.InVMInitialContextFactory"); return env; } + @Override public void close() throws NamingException { } + @Override public String getNameInNamespace() throws NamingException { return nameInNamespace; } @@ -292,22 +321,27 @@ public class InVMContext implements Context, Serializable { iterator = bindingIterator; } + @Override public void close() throws NamingException { throw new UnsupportedOperationException(); } + @Override public boolean hasMore() throws NamingException { return iterator.hasNext(); } + @Override public T next() throws NamingException { return iterator.next(); } + @Override public boolean hasMoreElements() { return iterator.hasNext(); } + @Override public T nextElement() { return iterator.next(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNameParser.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNameParser.java index ebaaa62f83..059a646ea2 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNameParser.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNameParser.java @@ -50,6 +50,7 @@ public class InVMNameParser implements NameParser, Serializable { return InVMNameParser.syntax; } + @Override public Name parse(final String name) throws NamingException { return new CompoundName(name, InVMNameParser.syntax); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNamingContext.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNamingContext.java index 8b7df6dddd..b323902977 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNamingContext.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/InVMNamingContext.java @@ -67,10 +67,12 @@ public class InVMNamingContext implements Context, Serializable { // Context implementation ---------------------------------------- + @Override public Object lookup(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookup(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -95,26 +97,32 @@ public class InVMNamingContext implements Context, Serializable { } } + @Override public void bind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void bind(final String name, final Object obj) throws NamingException { internalBind(name, obj, false); } + @Override public void rebind(final Name name, final Object obj) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rebind(final String name, final Object obj) throws NamingException { internalBind(name, obj, true); } + @Override public void unbind(final Name name) throws NamingException { unbind(name.toString()); } + @Override public void unbind(String name) throws NamingException { name = trimSlashes(name); int i = name.indexOf("/"); @@ -132,26 +140,32 @@ public class InVMNamingContext implements Context, Serializable { } } + @Override public void rename(final Name oldName, final Name newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public void rename(final String oldName, final String newName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration list(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NamingEnumeration listBindings(String contextName) throws NamingException { contextName = trimSlashes(contextName); if (!"".equals(contextName) && !".".equals(contextName)) { @@ -172,18 +186,22 @@ public class InVMNamingContext implements Context, Serializable { return new NamingEnumerationImpl(l.iterator()); } + @Override public void destroySubcontext(final Name name) throws NamingException { destroySubcontext(name.toString()); } + @Override public void destroySubcontext(final String name) throws NamingException { map.remove(trimSlashes(name)); } + @Override public Context createSubcontext(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Context createSubcontext(String name) throws NamingException { name = trimSlashes(name); if (map.get(name) != null) { @@ -194,47 +212,58 @@ public class InVMNamingContext implements Context, Serializable { return c; } + @Override public Object lookupLink(final Name name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object lookupLink(final String name) throws NamingException { throw new UnsupportedOperationException(); } + @Override public NameParser getNameParser(final Name name) throws NamingException { return getNameParser(name.toString()); } + @Override public NameParser getNameParser(final String name) throws NamingException { return parser; } + @Override public Name composeName(final Name name, final Name prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public String composeName(final String name, final String prefix) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object addToEnvironment(final String propName, final Object propVal) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Object removeFromEnvironment(final String propName) throws NamingException { throw new UnsupportedOperationException(); } + @Override public Hashtable getEnvironment() throws NamingException { Hashtable env = new Hashtable(); env.put("java.naming.factory.initial", "org.apache.activemq.artemis.jms.tests.tools.container.InVMInitialContextFactory"); return env; } + @Override public void close() throws NamingException { } + @Override public String getNameInNamespace() throws NamingException { return nameInNamespace; } @@ -292,22 +321,27 @@ public class InVMNamingContext implements Context, Serializable { iterator = bindingIterator; } + @Override public void close() throws NamingException { throw new UnsupportedOperationException(); } + @Override public boolean hasMore() throws NamingException { return iterator.hasNext(); } + @Override public T next() throws NamingException { return iterator.next(); } + @Override public boolean hasMoreElements() { return iterator.hasNext(); } + @Override public T nextElement() { return iterator.next(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/MemorySizeTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/MemorySizeTest.java index b6e08ef9c0..052afaf7e6 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/MemorySizeTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/MemorySizeTest.java @@ -30,12 +30,14 @@ public class MemorySizeTest extends Assert { @Test public void testObjectSizes() throws Exception { UnitTestLogger.LOGGER.info("Server message size is " + MemorySize.calculateSize(new MemorySize.ObjectFactory() { + @Override public Object createObject() { return new ServerMessageImpl(1, 1000); } })); UnitTestLogger.LOGGER.info("Message reference size is " + MemorySize.calculateSize(new MemorySize.ObjectFactory() { + @Override public Object createObject() { return new MessageReferenceImpl(); } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java index a7d21d2b2f..3b621aedd2 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/NonSerializableFactory.java @@ -84,6 +84,7 @@ public class NonSerializableFactory implements ObjectFactory { return NonSerializableFactory.getWrapperMap().get(name); } + @Override public Object getObjectInstance(final Object obj, final Name name, final Context nameCtx, diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java index 7592c15e09..8e45f5da06 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/ObjectInputStreamWithClassLoaderTest.java @@ -158,6 +158,7 @@ public class ObjectInputStreamWithClassLoaderTest extends ActiveMQTestBase { } } + @Override public void run() { try { diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/SoftValueMapTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/SoftValueMapTest.java index 9e13967b32..8c0d042576 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/SoftValueMapTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/SoftValueMapTest.java @@ -123,6 +123,7 @@ public class SoftValueMapTest extends ActiveMQTestBase { /* (non-Javadoc) * @see org.apache.activemq.artemis.utils.SoftValueHashMap.ValueCache#isLive() */ + @Override public boolean isLive() { return live; } diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/util/SpawnedVMSupport.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/util/SpawnedVMSupport.java index d7afaab8bf..b88786c07d 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/util/SpawnedVMSupport.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/util/SpawnedVMSupport.java @@ -163,6 +163,7 @@ public final class SpawnedVMSupport { ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); Future future = executor.submit(new Callable() { + @Override public Integer call() throws Exception { p.waitFor(); return p.exitValue();