From 8cf4795b94da83e09b94612c654315956c862677 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Fri, 23 Feb 2007 18:50:52 +0000 Subject: [PATCH] added the first cut of version 3 of the wire format which now supports BlobMessage for out-of-band (or later on in-band) BLOBs for AMQ-1075 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@511045 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/ActiveMQSession.java | 179 ++++-- .../java/org/apache/activemq/BlobMessage.java | 57 ++ .../activemq/blob/BlobUploadStrategy.java | 37 ++ .../apache/activemq/blob/BlobUploader.java | 57 ++ .../org/apache/activemq/blob/package.html | 25 + .../QueryBasedSubscriptionRecoveryPolicy.java | 15 +- .../activemq/command/ActiveMQBlobMessage.java | 152 +++++ .../command/ActiveMQBytesMessage.java | 30 +- .../activemq/command/ActiveMQMessage.java | 2 +- .../command/ActiveMQStreamMessage.java | 2 +- .../apache/activemq/command/CommandTypes.java | 1 + .../activemq/openwire/OpenWireFormat.java | 27 +- .../openwire/OpenWireFormatFactory.java | 2 +- .../v3/ActiveMQBlobMessageMarshaller.java | 1 + .../v3/ActiveMQBytesMessageMarshaller.java | 1 + .../v3/ActiveMQDestinationMarshaller.java | 1 + .../v3/ActiveMQMapMessageMarshaller.java | 1 + .../v3/ActiveMQMessageMarshaller.java | 1 + .../v3/ActiveMQObjectMessageMarshaller.java | 1 + .../openwire/v3/ActiveMQQueueMarshaller.java | 1 + .../v3/ActiveMQStreamMessageMarshaller.java | 1 + .../v3/ActiveMQTempDestinationMarshaller.java | 1 + .../v3/ActiveMQTempQueueMarshaller.java | 1 + .../v3/ActiveMQTempTopicMarshaller.java | 1 + .../v3/ActiveMQTextMessageMarshaller.java | 1 + .../openwire/v3/ActiveMQTopicMarshaller.java | 1 + .../openwire/v3/BaseCommandMarshaller.java | 1 + .../openwire/v3/BaseDataStreamMarshaller.java | 604 ++++++++++++++++++ .../openwire/v3/BrokerIdMarshaller.java | 1 + .../openwire/v3/BrokerInfoMarshaller.java | 1 + .../v3/ConnectionControlMarshaller.java | 1 + .../v3/ConnectionErrorMarshaller.java | 1 + .../openwire/v3/ConnectionIdMarshaller.java | 1 + .../openwire/v3/ConnectionInfoMarshaller.java | 1 + .../v3/ConsumerControlMarshaller.java | 1 + .../openwire/v3/ConsumerIdMarshaller.java | 1 + .../openwire/v3/ConsumerInfoMarshaller.java | 1 + .../openwire/v3/ControlCommandMarshaller.java | 1 + .../v3/DataArrayResponseMarshaller.java | 1 + .../openwire/v3/DataResponseMarshaller.java | 1 + .../v3/DestinationInfoMarshaller.java | 1 + .../openwire/v3/DiscoveryEventMarshaller.java | 1 + .../v3/ExceptionResponseMarshaller.java | 1 + .../openwire/v3/FlushCommandMarshaller.java | 1 + .../v3/IntegerResponseMarshaller.java | 1 + .../v3/JournalQueueAckMarshaller.java | 1 + .../v3/JournalTopicAckMarshaller.java | 1 + .../openwire/v3/JournalTraceMarshaller.java | 1 + .../v3/JournalTransactionMarshaller.java | 1 + .../openwire/v3/KeepAliveInfoMarshaller.java | 1 + .../v3/LastPartialCommandMarshaller.java | 1 + .../v3/LocalTransactionIdMarshaller.java | 1 + .../openwire/v3/MarshallerFactory.java | 108 ++++ .../openwire/v3/MessageAckMarshaller.java | 1 + .../v3/MessageDispatchMarshaller.java | 1 + ...MessageDispatchNotificationMarshaller.java | 1 + .../openwire/v3/MessageIdMarshaller.java | 1 + .../openwire/v3/MessageMarshaller.java | 1 + .../openwire/v3/MessagePullMarshaller.java | 1 + .../v3/NetworkBridgeFilterMarshaller.java | 1 + .../openwire/v3/PartialCommandMarshaller.java | 1 + .../openwire/v3/ProducerIdMarshaller.java | 1 + .../openwire/v3/ProducerInfoMarshaller.java | 1 + .../openwire/v3/RemoveInfoMarshaller.java | 1 + .../v3/RemoveSubscriptionInfoMarshaller.java | 1 + .../openwire/v3/ReplayCommandMarshaller.java | 1 + .../openwire/v3/ResponseMarshaller.java | 1 + .../openwire/v3/SessionIdMarshaller.java | 1 + .../openwire/v3/SessionInfoMarshaller.java | 1 + .../openwire/v3/ShutdownInfoMarshaller.java | 1 + .../v3/SubscriptionInfoMarshaller.java | 1 + .../openwire/v3/TransactionIdMarshaller.java | 1 + .../v3/TransactionInfoMarshaller.java | 1 + .../openwire/v3/WireFormatInfoMarshaller.java | 1 + .../v3/XATransactionIdMarshaller.java | 1 + .../openwire/v3/BaseCommandTestSupport.java | 43 ++ .../activemq/openwire/v3/BrokerIdTest.java | 1 + .../activemq/openwire/v3/BrokerInfoTest.java | 1 + .../openwire/v3/ConnectionControlTest.java | 1 + .../openwire/v3/ConnectionErrorTest.java | 1 + .../openwire/v3/ConnectionIdTest.java | 1 + .../openwire/v3/ConnectionInfoTest.java | 1 + .../openwire/v3/ConsumerControlTest.java | 1 + .../activemq/openwire/v3/ConsumerIdTest.java | 1 + .../openwire/v3/ConsumerInfoTest.java | 1 + .../openwire/v3/ControlCommandTest.java | 1 + .../openwire/v3/DataArrayResponseTest.java | 1 + .../openwire/v3/DataResponseTest.java | 1 + .../openwire/v3/DestinationInfoTest.java | 1 + .../openwire/v3/DiscoveryEventTest.java | 1 + .../openwire/v3/ExceptionResponseTest.java | 1 + .../openwire/v3/FlushCommandTest.java | 1 + .../openwire/v3/IntegerResponseTest.java | 1 + .../openwire/v3/JournalQueueAckTest.java | 1 + .../openwire/v3/JournalTopicAckTest.java | 1 + .../openwire/v3/JournalTraceTest.java | 1 + .../openwire/v3/JournalTransactionTest.java | 1 + .../openwire/v3/KeepAliveInfoTest.java | 1 + .../openwire/v3/LastPartialCommandTest.java | 1 + .../openwire/v3/LocalTransactionIdTest.java | 1 + .../activemq/openwire/v3/MessageAckTest.java | 1 + .../v3/MessageDispatchNotificationTest.java | 1 + .../openwire/v3/MessageDispatchTest.java | 1 + .../activemq/openwire/v3/MessageIdTest.java | 1 + .../activemq/openwire/v3/MessagePullTest.java | 1 + .../openwire/v3/MessageTestSupport.java | 1 + .../openwire/v3/NetworkBridgeFilterTest.java | 1 + .../openwire/v3/PartialCommandTest.java | 1 + .../activemq/openwire/v3/ProducerIdTest.java | 1 + .../openwire/v3/ProducerInfoTest.java | 1 + .../activemq/openwire/v3/RemoveInfoTest.java | 1 + .../v3/RemoveSubscriptionInfoTest.java | 1 + .../openwire/v3/ReplayCommandTest.java | 1 + .../activemq/openwire/v3/ResponseTest.java | 1 + .../activemq/openwire/v3/SessionIdTest.java | 1 + .../activemq/openwire/v3/SessionInfoTest.java | 1 + .../openwire/v3/ShutdownInfoTest.java | 1 + .../openwire/v3/SubscriptionInfoTest.java | 1 + .../openwire/v3/TransactionIdTestSupport.java | 1 + .../openwire/v3/TransactionInfoTest.java | 1 + .../openwire/v3/XATransactionIdTest.java | 1 + .../openwire/tool/MultiSourceGenerator.java | 17 +- 122 files changed, 1335 insertions(+), 128 deletions(-) create mode 100644 activemq-core/src/main/java/org/apache/activemq/BlobMessage.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/blob/package.html create mode 100644 activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java create mode 100644 activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java create mode 100644 activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java index 0e6d005c71..87af8f5de7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java @@ -17,58 +17,7 @@ */ package org.apache.activemq; -import java.io.Serializable; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; - -import javax.jms.BytesMessage; -import javax.jms.Destination; -import javax.jms.IllegalStateException; -import javax.jms.InvalidDestinationException; -import javax.jms.InvalidSelectorException; -import javax.jms.JMSException; -import javax.jms.MapMessage; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Queue; -import javax.jms.QueueBrowser; -import javax.jms.QueueReceiver; -import javax.jms.QueueSender; -import javax.jms.QueueSession; -import javax.jms.Session; -import javax.jms.StreamMessage; -import javax.jms.TemporaryQueue; -import javax.jms.TemporaryTopic; -import javax.jms.TextMessage; -import javax.jms.Topic; -import javax.jms.TopicPublisher; -import javax.jms.TopicSession; -import javax.jms.TopicSubscriber; -import javax.jms.TransactionRolledBackException; - -import org.apache.activemq.command.ActiveMQBytesMessage; -import org.apache.activemq.command.ActiveMQDestination; -import org.apache.activemq.command.ActiveMQMapMessage; -import org.apache.activemq.command.ActiveMQMessage; -import org.apache.activemq.command.ActiveMQObjectMessage; -import org.apache.activemq.command.ActiveMQQueue; -import org.apache.activemq.command.ActiveMQStreamMessage; -import org.apache.activemq.command.ActiveMQTextMessage; -import org.apache.activemq.command.ActiveMQTopic; -import org.apache.activemq.command.Command; -import org.apache.activemq.command.ConsumerId; -import org.apache.activemq.command.MessageAck; -import org.apache.activemq.command.MessageDispatch; -import org.apache.activemq.command.MessageId; -import org.apache.activemq.command.ProducerId; -import org.apache.activemq.command.Response; -import org.apache.activemq.command.SessionId; -import org.apache.activemq.command.SessionInfo; -import org.apache.activemq.command.TransactionId; +import org.apache.activemq.command.*; import org.apache.activemq.management.JMSSessionStatsImpl; import org.apache.activemq.management.StatsCapable; import org.apache.activemq.management.StatsImpl; @@ -76,9 +25,21 @@ import org.apache.activemq.thread.Scheduler; import org.apache.activemq.transaction.Synchronization; import org.apache.activemq.util.Callback; import org.apache.activemq.util.LongSequenceGenerator; +import org.apache.activemq.blob.BlobUploader; +import org.apache.activemq.blob.BlobUploadStrategy; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import javax.jms.*; +import javax.jms.IllegalStateException; +import javax.jms.Message; +import java.io.Serializable; +import java.io.File; +import java.io.InputStream; +import java.net.URL; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicBoolean; @@ -169,6 +130,7 @@ import java.util.concurrent.atomic.AtomicBoolean; * @see javax.jms.XASession */ public class ActiveMQSession implements Session, QueueSession, TopicSession, StatsCapable, ActiveMQDispatcher { + private BlobUploadStrategy blobUploadStrategy; public static interface DeliveryListener { public void beforeDelivery(ActiveMQSession session, Message msg); @@ -286,9 +248,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public BytesMessage createBytesMessage() throws JMSException { - checkClosed(); ActiveMQBytesMessage message = new ActiveMQBytesMessage(); - message.setConnection(connection); + configureMessage(message); return message; } @@ -304,9 +265,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public MapMessage createMapMessage() throws JMSException { - checkClosed(); ActiveMQMapMessage message = new ActiveMQMapMessage(); - message.setConnection(connection); + configureMessage(message); return message; } @@ -322,9 +282,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public Message createMessage() throws JMSException { - checkClosed(); ActiveMQMessage message = new ActiveMQMessage(); - message.setConnection(connection); + configureMessage(message); return message; } @@ -339,9 +298,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public ObjectMessage createObjectMessage() throws JMSException { - checkClosed(); ActiveMQObjectMessage message = new ActiveMQObjectMessage(); - message.setConnection(connection); + configureMessage(message); return message; } @@ -358,9 +316,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public ObjectMessage createObjectMessage(Serializable object) throws JMSException { - checkClosed(); ActiveMQObjectMessage message = new ActiveMQObjectMessage(); - message.setConnection(connection); + configureMessage(message); message.setObject(object); return message; } @@ -376,9 +333,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public StreamMessage createStreamMessage() throws JMSException { - checkClosed(); ActiveMQStreamMessage message = new ActiveMQStreamMessage(); - message.setConnection(connection); + configureMessage(message); return message; } @@ -393,9 +349,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public TextMessage createTextMessage() throws JMSException { - checkClosed(); ActiveMQTextMessage message = new ActiveMQTextMessage(); - message.setConnection(connection); + configureMessage(message); return message; } @@ -411,13 +366,77 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta * internal error. */ public TextMessage createTextMessage(String text) throws JMSException { - checkClosed(); ActiveMQTextMessage message = new ActiveMQTextMessage(); message.setText(text); - message.setConnection(connection); + configureMessage(message); return message; } + /** + * Creates an initialized BlobMessage object. A BlobMessage + * object is used to send a message containing a URL which points to some + * network addressible BLOB. + * + * @param url + * the network addressable URL used to pass directly to the consumer + * @return a BlobMessage + * @throws JMSException + * if the JMS provider fails to create this message due to some + * internal error. + */ + public BlobMessage createBlobMessage(URL url) throws JMSException { + ActiveMQBlobMessage message = new ActiveMQBlobMessage(); + configureMessage(message); + message.setURL(url); + return message; + } + + /** + * Creates an initialized BlobMessage object. A BlobMessage + * object is used to send a message containing the File content. Before the + * message is sent the file conent will be uploaded to the broker or some other remote repository + * depending on the {@link #getBlobUploadStrategy()}. + * + * @param file + * the file to be uploaded to some remote repo (or the broker) depending on the + * + * @return a BlobMessage + * @throws JMSException + * if the JMS provider fails to create this message due to some + * internal error. + */ + public BlobMessage createBlobMessage(File file) throws JMSException { + ActiveMQBlobMessage message = new ActiveMQBlobMessage(); + configureMessage(message); + message.setBlobUploader(new BlobUploader(blobUploadStrategy, file)); + message.setDeletedByBroker(true); + return message; + } + + + /** + * Creates an initialized BlobMessage object. A BlobMessage + * object is used to send a message containing the File content. Before the + * message is sent the file conent will be uploaded to the broker or some other remote repository + * depending on the {@link #getBlobUploadStrategy()}. + * + * @param file + * the file to be uploaded to some remote repo (or the broker) depending on the + * + * @return a BlobMessage + * @throws JMSException + * if the JMS provider fails to create this message due to some + * internal error. + */ + public BlobMessage createBlobMessage(InputStream in) throws JMSException { + ActiveMQBlobMessage message = new ActiveMQBlobMessage(); + configureMessage(message); + message.setBlobUploader(new BlobUploader(blobUploadStrategy, in)); + message.setDeletedByBroker(true); + return message; + } + + /** * Indicates whether the session is in transacted mode. * @@ -572,6 +591,15 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta } } + /** + * Checks that the session is not closed then configures the message + */ + protected void configureMessage(ActiveMQMessage message) throws IllegalStateException { + checkClosed(); + message.setConnection(connection); + } + + /** * Check if the session is closed. It is used for ensuring that the session * is open before performing various operations. @@ -1718,7 +1746,20 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta public List getUnconsumedMessages() { return executor.getUnconsumedMessages(); } - + + + public BlobUploadStrategy getBlobUploadStrategy() { + return blobUploadStrategy; + } + + /** + * Sets the upload strategy for BLOBs which are sent out-of-band by uploading them + * to some remote repository or the broker + */ + public void setBlobUploadStrategy(BlobUploadStrategy blobUploadStrategy) { + this.blobUploadStrategy = blobUploadStrategy; + } + public String toString() { return "ActiveMQSession {id="+info.getSessionId()+",started="+started.get()+"}"; } diff --git a/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java b/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java new file mode 100644 index 0000000000..066b0d54c3 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/BlobMessage.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq; + +import javax.jms.Message; +import javax.jms.JMSException; +import java.net.URL; +import java.net.MalformedURLException; +import java.io.InputStream; +import java.io.IOException; + +/** + * Represents a message which has a typically out of band Binary Large Object + * (BLOB) + * + * @version $Revision: $ + */ +public interface BlobMessage extends Message { + + /** + * Return the input stream to process the BLOB + */ + InputStream getInputStream() throws IOException, JMSException; + + /** + * Returns the URL for the blob if its available as an external URL (such as file, http, ftp etc) + * or null if there is no URL available + */ + URL getURL() throws MalformedURLException, JMSException; + + + /** + * The MIME type of the BLOB which can be used to apply different content types to messages. + */ + String getMimeType(); + + /** + * Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework + * DataHandler + */ + void setMimeType(String mimeType); + +} diff --git a/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java b/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java new file mode 100644 index 0000000000..5b75b15d9c --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploadStrategy.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.blob; + +import org.apache.activemq.command.ActiveMQBlobMessage; + +import javax.jms.JMSException; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; + +/** + * Represents a strategy of uploading a file/stream to some remote + * + * @version $Revision: $ + */ +public interface BlobUploadStrategy { + + URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException; + + URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws JMSException, IOException; +} diff --git a/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java b/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java new file mode 100644 index 0000000000..5f654aff4f --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/blob/BlobUploader.java @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.blob; + +import org.apache.activemq.command.ActiveMQBlobMessage; + +import javax.jms.JMSException; +import java.io.File; +import java.io.*; +import java.io.IOException; +import java.net.URL; + +/** + * A helper class to represent a required upload of a BLOB to some remote URL + * + * @version $Revision: $ + */ +public class BlobUploader { + + private BlobUploadStrategy strategy; + private File file; + private InputStream in; + + + public BlobUploader(BlobUploadStrategy strategy, File file) { + this.strategy = strategy; + this.file = file; + } + + public BlobUploader(BlobUploadStrategy strategy, InputStream in) { + this.strategy = strategy; + this.in = in; + } + + public URL upload(ActiveMQBlobMessage message) throws JMSException, IOException { + if (file != null) { + return strategy.uploadFile(message, file); + } + else { + return strategy.uploadStream(message, in); + } + } +} diff --git a/activemq-core/src/main/java/org/apache/activemq/blob/package.html b/activemq-core/src/main/java/org/apache/activemq/blob/package.html new file mode 100644 index 0000000000..2964e78d30 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/blob/package.html @@ -0,0 +1,25 @@ + + + + + + +Helper classes for dealing with out-of-band BLOB objects + + + diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java index 98b177d687..f4c46a9c19 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/QueryBasedSubscriptionRecoveryPolicy.java @@ -17,28 +17,21 @@ */ package org.apache.activemq.broker.region.policy; -import java.util.concurrent.atomic.AtomicLong; - import org.apache.activemq.ActiveMQMessageTransformation; import org.apache.activemq.broker.ConnectionContext; import org.apache.activemq.broker.region.Destination; import org.apache.activemq.broker.region.MessageReference; -import org.apache.activemq.broker.region.Subscription; import org.apache.activemq.broker.region.SubscriptionRecovery; import org.apache.activemq.broker.region.Topic; -import org.apache.activemq.command.ActiveMQDestination; -import org.apache.activemq.command.ActiveMQMessage; -import org.apache.activemq.command.ConnectionId; -import org.apache.activemq.command.MessageId; -import org.apache.activemq.command.ProducerId; -import org.apache.activemq.command.SessionId; -import org.apache.activemq.filter.MessageEvaluationContext; +import org.apache.activemq.command.*; import org.apache.activemq.util.IdGenerator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; +import java.util.concurrent.atomic.AtomicLong; /** * This implementation of {@link SubscriptionRecoveryPolicy} will perform a user @@ -121,7 +114,7 @@ public class QueryBasedSubscriptionRecoveryPolicy implements SubscriptionRecover } } - protected void configure(ActiveMQMessage msg) { + protected void configure(ActiveMQMessage msg) throws JMSException { long sequenceNumber = messageSequence.incrementAndGet(); msg.setMessageId(new MessageId(producerId, sequenceNumber)); msg.onSend(); diff --git a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java new file mode 100644 index 0000000000..493984ee6d --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBlobMessage.java @@ -0,0 +1,152 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.command; + +import org.apache.activemq.BlobMessage; +import org.apache.activemq.blob.BlobUploader; +import org.apache.activemq.util.JMSExceptionSupport; + +import javax.jms.JMSException; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; + +/** + * An implementation of {@link BlobMessage} for out of band BLOB transfer + * + * @version $Revision: $ + * @openwire:marshaller code="29" + */ +public class ActiveMQBlobMessage extends ActiveMQMessage implements BlobMessage { + public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_BLOB_MESSAGE; + + public static final String BINARY_MIME_TYPE = "application/octet-stream"; + + private String remoteBlobUrl; + private String mimeType; + private boolean deletedByBroker; + + private transient BlobUploader blobUploader; + private transient URL url; + + + public Message copy() { + ActiveMQBlobMessage copy = new ActiveMQBlobMessage(); + copy(copy); + return copy; + } + + private void copy(ActiveMQBlobMessage copy) { + super.copy(copy); + copy.setRemoteBlobUrl(getRemoteBlobUrl()); + copy.setMimeType(getMimeType()); + copy.setDeletedByBroker(isDeletedByBroker()); + } + + public byte getDataStructureType() { + return DATA_STRUCTURE_TYPE; + } + + /** + * @openwire:property version=3 cache=false + */ + public String getRemoteBlobUrl() { + return remoteBlobUrl; + } + + public void setRemoteBlobUrl(String remoteBlobUrl) { + this.remoteBlobUrl = remoteBlobUrl; + url = null; + } + + /** + * The MIME type of the BLOB which can be used to apply different content types to messages. + * + * @openwire:property version=3 cache=true + */ + public String getMimeType() { + if (mimeType == null) { + return BINARY_MIME_TYPE; + } + return mimeType; + } + + public void setMimeType(String mimeType) { + this.mimeType = mimeType; + } + + /** + * @openwire:property version=3 cache=false + */ + public boolean isDeletedByBroker() { + return deletedByBroker; + } + + public void setDeletedByBroker(boolean deletedByBroker) { + this.deletedByBroker = deletedByBroker; + } + + public InputStream getInputStream() throws IOException, JMSException { + URL value = getURL(); + if (value == null) { + return null; + } + return value.openStream(); + } + + public URL getURL() throws JMSException { + if (url == null && remoteBlobUrl != null) { + try { + url = new URL(remoteBlobUrl); + } + catch (MalformedURLException e) { + throw JMSExceptionSupport.create(e); + } + } + return url; + } + + public void setURL(URL url) { + this.url = url; + remoteBlobUrl = url != null ? url.toExternalForm() : null; + } + + + public BlobUploader getBlobUploader() { + return blobUploader; + } + + public void setBlobUploader(BlobUploader blobUploader) { + this.blobUploader = blobUploader; + } + + public void onSend() throws JMSException { + super.onSend(); + + // lets ensure we upload the BLOB first out of band before we send the message + if (blobUploader != null) { + try { + URL value = blobUploader.upload(this); + setURL(value); + } + catch (IOException e) { + throw JMSExceptionSupport.create(e); + } + } + } +} diff --git a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java index 9cef279a3d..6309ee8f22 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQBytesMessage.java @@ -17,30 +17,16 @@ */ package org.apache.activemq.command; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.EOFException; -import java.io.FilterOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.zip.Deflater; -import java.util.zip.DeflaterOutputStream; -import java.util.zip.InflaterInputStream; - -import javax.jms.BytesMessage; -import javax.jms.JMSException; -import javax.jms.MessageEOFException; -import javax.jms.MessageFormatException; -import javax.jms.MessageNotReadableException; -import javax.jms.MessageNotWriteableException; - import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.util.ByteArrayInputStream; import org.apache.activemq.util.ByteArrayOutputStream; -import org.apache.activemq.util.ByteSequence; -import org.apache.activemq.util.ByteSequenceData; -import org.apache.activemq.util.JMSExceptionSupport; +import org.apache.activemq.util.*; + +import javax.jms.*; +import java.io.*; +import java.util.zip.Deflater; +import java.util.zip.DeflaterOutputStream; +import java.util.zip.InflaterInputStream; /** * A BytesMessage object is used to send a message containing a stream of uninterpreted bytes. It inherits @@ -94,7 +80,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag copy.dataIn = null; } - public void onSend() { + public void onSend() throws JMSException { super.onSend(); storeContent(); } diff --git a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java index 0334cee1af..49f0c713db 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java @@ -594,7 +594,7 @@ public class ActiveMQMessage extends Message implements javax.jms.Message { /** * Send operation event listener. Used to get the message ready to be sent. */ - public void onSend() { + public void onSend() throws JMSException { setReadOnlyBody(true); setReadOnlyProperties(true); } diff --git a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java index 0770e81bb1..ffd73f9592 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQStreamMessage.java @@ -129,7 +129,7 @@ public class ActiveMQStreamMessage extends ActiveMQMessage implements StreamMess copy.dataIn = null; } - public void onSend() { + public void onSend() throws JMSException { super.onSend(); storeContent(); } diff --git a/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java b/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java index 2e6a5a3ba0..c6df016539 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/CommandTypes.java @@ -67,6 +67,7 @@ public interface CommandTypes { byte ACTIVEMQ_OBJECT_MESSAGE = 26; byte ACTIVEMQ_STREAM_MESSAGE = 27; byte ACTIVEMQ_TEXT_MESSAGE = 28; + byte ACTIVEMQ_BLOB_MESSAGE = 29; /////////////////////////////////////////////////// // diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java index 0fbdffa03d..9d7c0e83bc 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java @@ -17,36 +17,33 @@ */ package org.apache.activemq.openwire; +import org.apache.activemq.command.CommandTypes; +import org.apache.activemq.command.DataStructure; +import org.apache.activemq.command.MarshallAware; +import org.apache.activemq.command.WireFormatInfo; +import org.apache.activemq.util.*; +import org.apache.activemq.wireformat.WireFormat; + import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.lang.reflect.Method; import java.util.HashMap; -import org.apache.activemq.command.CommandTypes; -import org.apache.activemq.command.DataStructure; -import org.apache.activemq.command.MarshallAware; -import org.apache.activemq.command.WireFormatInfo; -import org.apache.activemq.util.ByteSequence; -import org.apache.activemq.util.ByteSequenceData; -import org.apache.activemq.util.ClassLoading; -import org.apache.activemq.util.DataByteArrayInputStream; -import org.apache.activemq.util.DataByteArrayOutputStream; -import org.apache.activemq.util.IdGenerator; -import org.apache.activemq.wireformat.WireFormat; - /** * * @version $Revision$ */ final public class OpenWireFormat implements WireFormat { - + + public static final int DEFAULT_VERSION = 3; + static final byte NULL_TYPE = CommandTypes.NULL; private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE/2; private static final int MARSHAL_CACHE_FREE_SPACE = 100; private DataStreamMarshaller dataMarshallers[]; - private int version = 2; + private int version; private boolean stackTraceEnabled=false; private boolean tcpNoDelayEnabled=false; private boolean cacheEnabled=false; @@ -64,7 +61,7 @@ final public class OpenWireFormat implements WireFormat { private WireFormatInfo preferedWireFormatInfo; public OpenWireFormat() { - this(2); + this(DEFAULT_VERSION); } public OpenWireFormat(int i) { diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java index b6187bbec5..849778ff66 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java @@ -30,7 +30,7 @@ public class OpenWireFormatFactory implements WireFormatFactory { // The default values here are what the wire format changes to after a default negotiation. // - private int version=2; + private int version=OpenWireFormat.DEFAULT_VERSION; private boolean stackTraceEnabled=true; private boolean tcpNoDelayEnabled=true; private boolean cacheEnabled=true; diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java new file mode 100644 index 0000000000..6eb43e91e0 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBlobMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQBlobMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQBlobMessageMarshaller extends ActiveMQMessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQBlobMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ActiveMQBlobMessage info = (ActiveMQBlobMessage)o; info.setRemoteBlobUrl(tightUnmarshalString(dataIn, bs)); info.setMimeType(tightUnmarshalString(dataIn, bs)); info.setDeletedByBroker(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ActiveMQBlobMessage info = (ActiveMQBlobMessage)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getRemoteBlobUrl(), bs); rc += tightMarshalString1(info.getMimeType(), bs); bs.writeBoolean(info.isDeletedByBroker()); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ActiveMQBlobMessage info = (ActiveMQBlobMessage)o; tightMarshalString2(info.getRemoteBlobUrl(), dataOut, bs); tightMarshalString2(info.getMimeType(), dataOut, bs); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ActiveMQBlobMessage info = (ActiveMQBlobMessage)o; info.setRemoteBlobUrl(looseUnmarshalString(dataIn)); info.setMimeType(looseUnmarshalString(dataIn)); info.setDeletedByBroker(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ActiveMQBlobMessage info = (ActiveMQBlobMessage)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getRemoteBlobUrl(), dataOut); looseMarshalString(info.getMimeType(), dataOut); dataOut.writeBoolean(info.isDeletedByBroker()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java new file mode 100644 index 0000000000..a36131a038 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQBytesMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQBytesMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQBytesMessageMarshaller extends ActiveMQMessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQBytesMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBytesMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java new file mode 100644 index 0000000000..b215e759fb --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQDestinationMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQDestinationMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public abstract class ActiveMQDestinationMarshaller extends BaseDataStreamMarshaller { /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ActiveMQDestination info = (ActiveMQDestination)o; info.setPhysicalName(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ActiveMQDestination info = (ActiveMQDestination)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getPhysicalName(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ActiveMQDestination info = (ActiveMQDestination)o; tightMarshalString2(info.getPhysicalName(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ActiveMQDestination info = (ActiveMQDestination)o; info.setPhysicalName(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ActiveMQDestination info = (ActiveMQDestination)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getPhysicalName(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java new file mode 100644 index 0000000000..ffc965eb4f --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMapMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQMapMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQMapMessageMarshaller extends ActiveMQMessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQMapMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQMapMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java new file mode 100644 index 0000000000..fcad3d92cd --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQMessageMarshaller extends MessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java new file mode 100644 index 0000000000..ae45341a77 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQObjectMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQObjectMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQObjectMessageMarshaller extends ActiveMQMessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQObjectMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQObjectMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java new file mode 100644 index 0000000000..e0b90d8321 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQQueueMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQQueueMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQQueueMarshaller extends ActiveMQDestinationMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQQueue.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQQueue(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java new file mode 100644 index 0000000000..7c1e8264e9 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQStreamMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQStreamMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQStreamMessageMarshaller extends ActiveMQMessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQStreamMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQStreamMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java new file mode 100644 index 0000000000..1d6a81934a --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempDestinationMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQTempDestinationMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public abstract class ActiveMQTempDestinationMarshaller extends ActiveMQDestinationMarshaller { /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java new file mode 100644 index 0000000000..765160eb30 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempQueueMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQTempQueueMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQTempQueueMarshaller extends ActiveMQTempDestinationMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQTempQueue.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempQueue(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java new file mode 100644 index 0000000000..fafc294856 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTempTopicMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQTempTopicMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQTempTopicMarshaller extends ActiveMQTempDestinationMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQTempTopic.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTempTopic(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java new file mode 100644 index 0000000000..3a8848f2ec --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTextMessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQTextMessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQTextMessageMarshaller extends ActiveMQMessageMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQTextMessage.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTextMessage(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java new file mode 100644 index 0000000000..3ce2e92c70 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ActiveMQTopicMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ActiveMQTopicMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ActiveMQTopicMarshaller extends ActiveMQDestinationMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ActiveMQTopic.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQTopic(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java new file mode 100644 index 0000000000..f4787cc549 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseCommandMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for BaseCommandMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public abstract class BaseCommandMarshaller extends BaseDataStreamMarshaller { /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); BaseCommand info = (BaseCommand)o; info.setCommandId(dataIn.readInt()); info.setResponseRequired(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { BaseCommand info = (BaseCommand)o; int rc = super.tightMarshal1(wireFormat, o, bs); bs.writeBoolean(info.isResponseRequired()); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); BaseCommand info = (BaseCommand)o; dataOut.writeInt(info.getCommandId()); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BaseCommand info = (BaseCommand)o; info.setCommandId(dataIn.readInt()); info.setResponseRequired(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { BaseCommand info = (BaseCommand)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getCommandId()); dataOut.writeBoolean(info.isResponseRequired()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java new file mode 100644 index 0000000000..d3f0a6d0c5 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BaseDataStreamMarshaller.java @@ -0,0 +1,604 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.v3; + +import org.apache.activemq.openwire.DataStreamMarshaller; +import org.apache.activemq.openwire.OpenWireFormat; +import org.apache.activemq.openwire.BooleanStream; +import org.apache.activemq.command.DataStructure; +import org.apache.activemq.util.ClassLoading; +import org.apache.activemq.util.ByteSequence; + +import java.lang.reflect.Constructor; +import java.io.IOException; +import java.io.DataOutput; +import java.io.DataInput; + +abstract public class BaseDataStreamMarshaller implements DataStreamMarshaller { + + static final public Constructor STACK_TRACE_ELEMENT_CONSTRUCTOR; + + static { + Constructor constructor=null; + try { + constructor = StackTraceElement.class.getConstructor(new Class[]{String.class, String.class, String.class, int.class}); + } catch (Throwable e) { + } + STACK_TRACE_ELEMENT_CONSTRUCTOR = constructor; + } + + + abstract public byte getDataStructureType(); + abstract public DataStructure createObject(); + + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + return 0; + } + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + } + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + } + + public int tightMarshalLong1(OpenWireFormat wireFormat, long o, BooleanStream bs) throws IOException { + if( o == 0 ) { + bs.writeBoolean(false); + bs.writeBoolean(false); + return 0; + } else if ( (o & 0xFFFFFFFFFFFF0000l ) == 0 ) { + bs.writeBoolean(false); + bs.writeBoolean(true); + return 2; + } else if ( (o & 0xFFFFFFFF00000000l ) == 0) { + bs.writeBoolean(true); + bs.writeBoolean(false); + return 4; + } else { + bs.writeBoolean(true); + bs.writeBoolean(true); + return 8; + } + } + public void tightMarshalLong2(OpenWireFormat wireFormat, long o, DataOutput dataOut, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + if( bs.readBoolean() ) { + dataOut.writeLong(o); + } else { + dataOut.writeInt((int) o); + } + } else { + if( bs.readBoolean() ) { + dataOut.writeShort((int) o); + } + } + } + public long tightUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + if( bs.readBoolean() ) { + return dataIn.readLong(); + } else { + return toLong(dataIn.readInt()); + } + } else { + if( bs.readBoolean() ) { + return toLong(dataIn.readShort()); + } else { + return 0; + } + } + } + + protected long toLong(short value) { + // lets handle negative values + long answer = value; + return answer & 0xffffL; + } + + protected long toLong(int value) { + // lets handle negative values + long answer = value; + return answer & 0xffffffffL; + } + + protected DataStructure tightUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException { + return wireFormat.tightUnmarshalNestedObject(dataIn, bs); + } + protected int tightMarshalNestedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs) throws IOException { + return wireFormat.tightMarshalNestedObject1(o, bs); + } + + protected void tightMarshalNestedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut, BooleanStream bs) throws IOException { + wireFormat.tightMarshalNestedObject2(o, dataOut, bs); + } + + protected DataStructure tightUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException { + if( wireFormat.isCacheEnabled() ) { + if( bs.readBoolean() ) { + short index = dataIn.readShort(); + DataStructure object = wireFormat.tightUnmarshalNestedObject(dataIn, bs); + wireFormat.setInUnmarshallCache(index, object); + return object; + } else { + short index = dataIn.readShort(); + return wireFormat.getFromUnmarshallCache(index); + } + } else { + return wireFormat.tightUnmarshalNestedObject(dataIn, bs); + } + } + protected int tightMarshalCachedObject1(OpenWireFormat wireFormat, DataStructure o, BooleanStream bs) throws IOException { + if( wireFormat.isCacheEnabled() ) { + Short index = wireFormat.getMarshallCacheIndex(o); + bs.writeBoolean(index == null); + if( index == null ) { + int rc = wireFormat.tightMarshalNestedObject1(o, bs); + wireFormat.addToMarshallCache(o); + return 2+rc; + } else { + return 2; + } + } else { + return wireFormat.tightMarshalNestedObject1(o, bs); + } + } + protected void tightMarshalCachedObject2(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut, BooleanStream bs) throws IOException { + if( wireFormat.isCacheEnabled() ) { + Short index = wireFormat.getMarshallCacheIndex(o); + if( bs.readBoolean() ) { + dataOut.writeShort(index.shortValue()); + wireFormat.tightMarshalNestedObject2(o, dataOut, bs); + } else { + dataOut.writeShort(index.shortValue()); + } + } else { + wireFormat.tightMarshalNestedObject2(o, dataOut, bs); + } + } + + protected Throwable tightUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + String clazz = tightUnmarshalString(dataIn, bs); + String message = tightUnmarshalString(dataIn, bs); + Throwable o = createThrowable(clazz, message); + if( wireFormat.isStackTraceEnabled() ) { + if( STACK_TRACE_ELEMENT_CONSTRUCTOR !=null) { + StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()]; + for (int i = 0; i < ss.length; i++) { + try { + ss[i] = (StackTraceElement) STACK_TRACE_ELEMENT_CONSTRUCTOR.newInstance(new Object[]{ + tightUnmarshalString(dataIn, bs), + tightUnmarshalString(dataIn, bs), + tightUnmarshalString(dataIn, bs), + new Integer(dataIn.readInt()) + }); + } catch (IOException e) { + throw e; + } catch (Throwable e) { + } + } + o.setStackTrace(ss); + } else { + short size = dataIn.readShort(); + for (int i = 0; i < size; i++) { + tightUnmarshalString(dataIn, bs); + tightUnmarshalString(dataIn, bs); + tightUnmarshalString(dataIn, bs); + dataIn.readInt(); + } + } + o.initCause(tightUnmarsalThrowable(wireFormat, dataIn, bs)); + + } + return o; + } else { + return null; + } + } + + private Throwable createThrowable(String className, String message) { + try { + Class clazz = ClassLoading.loadClass(className, BaseDataStreamMarshaller.class.getClassLoader()); + Constructor constructor = clazz.getConstructor(new Class[]{String.class}); + return (Throwable) constructor.newInstance(new Object[]{message}); + } catch (Throwable e) { + return new Throwable(className+": "+message); + } + } + + protected int tightMarshalThrowable1(OpenWireFormat wireFormat, Throwable o, BooleanStream bs) throws IOException { + if( o==null ) { + bs.writeBoolean(false); + return 0; + } else { + int rc=0; + bs.writeBoolean(true); + rc += tightMarshalString1(o.getClass().getName(), bs); + rc += tightMarshalString1(o.getMessage(), bs); + if( wireFormat.isStackTraceEnabled() ) { + rc += 2; + StackTraceElement[] stackTrace = o.getStackTrace(); + for (int i = 0; i < stackTrace.length; i++) { + StackTraceElement element = stackTrace[i]; + rc += tightMarshalString1(element.getClassName(), bs); + rc += tightMarshalString1(element.getMethodName(), bs); + rc += tightMarshalString1(element.getFileName(), bs); + rc += 4; + } + rc += tightMarshalThrowable1(wireFormat, o.getCause(), bs); + } + return rc; + } + } + + protected void tightMarshalThrowable2(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + tightMarshalString2(o.getClass().getName(), dataOut, bs); + tightMarshalString2(o.getMessage(), dataOut, bs); + if( wireFormat.isStackTraceEnabled() ) { + StackTraceElement[] stackTrace = o.getStackTrace(); + dataOut.writeShort(stackTrace.length); + for (int i = 0; i < stackTrace.length; i++) { + StackTraceElement element = stackTrace[i]; + tightMarshalString2(element.getClassName(), dataOut, bs); + tightMarshalString2(element.getMethodName(), dataOut, bs); + tightMarshalString2(element.getFileName(), dataOut, bs); + dataOut.writeInt(element.getLineNumber()); + } + tightMarshalThrowable2(wireFormat, o.getCause(), dataOut, bs); + } + } + } + + protected String tightUnmarshalString(DataInput dataIn, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + if( bs.readBoolean() ) { + int size = dataIn.readShort(); + byte data[] = new byte[size]; + dataIn.readFully(data); + return new String(data,0); // Yes deprecated, but we know what we are doing. + } else { + return dataIn.readUTF(); + } + } else { + return null; + } + } + + protected int tightMarshalString1(String value, BooleanStream bs) throws IOException { + bs.writeBoolean(value!=null); + if( value!=null ) { + + int strlen = value.length(); + int utflen = 0; + char[] charr = new char[strlen]; + int c, count = 0; + boolean isOnlyAscii=true; + + value.getChars(0, strlen, charr, 0); + + for (int i = 0; i < strlen; i++) { + c = charr[i]; + if ((c >= 0x0001) && (c <= 0x007F)) { + utflen++; + } else if (c > 0x07FF) { + utflen += 3; + isOnlyAscii=false; + } else { + isOnlyAscii=false; + utflen += 2; + } + } + + if( utflen >= Short.MAX_VALUE ) + throw new IOException("Encountered a String value that is too long to encode."); + + bs.writeBoolean(isOnlyAscii); + return utflen+2; + + } else { + return 0; + } + } + + protected void tightMarshalString2(String value, DataOutput dataOut, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + // If we verified it only holds ascii values + if( bs.readBoolean() ) { + dataOut.writeShort(value.length()); + dataOut.writeBytes(value); + } else { + dataOut.writeUTF(value); + } + } + } + + protected int tightMarshalObjectArray1(OpenWireFormat wireFormat, DataStructure[] objects, BooleanStream bs) throws IOException { + if( objects != null ) { + int rc=0; + bs.writeBoolean(true); + rc += 2; + for( int i=0; i < objects.length; i++ ) { + rc += tightMarshalNestedObject1(wireFormat,objects[i], bs); + } + return rc; + } else { + bs.writeBoolean(false); + return 0; + } + } + + protected void tightMarshalObjectArray2(OpenWireFormat wireFormat, DataStructure[] objects, DataOutput dataOut, BooleanStream bs) throws IOException { + if( bs.readBoolean() ) { + dataOut.writeShort(objects.length); + for( int i=0; i < objects.length; i++ ) { + tightMarshalNestedObject2(wireFormat,objects[i], dataOut, bs); + } + } + } + + protected int tightMarshalConstByteArray1(byte[] data, BooleanStream bs, int i) throws IOException { + return i; + } + protected void tightMarshalConstByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs, int i) throws IOException { + dataOut.write(data, 0, i); + } + + protected byte[] tightUnmarshalConstByteArray(DataInput dataIn, BooleanStream bs, int i) throws IOException { + byte data[] = new byte[i]; + dataIn.readFully(data); + return data; + } + + protected int tightMarshalByteArray1(byte[] data, BooleanStream bs) throws IOException { + bs.writeBoolean(data!=null); + if( data!=null ){ + return data.length+4; + } else { + return 0; + } + } + + protected void tightMarshalByteArray2(byte[] data, DataOutput dataOut, BooleanStream bs) throws IOException { + if( bs.readBoolean() ){ + dataOut.writeInt(data.length); + dataOut.write(data); + } + } + + protected byte[] tightUnmarshalByteArray(DataInput dataIn, BooleanStream bs) throws IOException { + byte rc[]=null; + if( bs.readBoolean() ) { + int size = dataIn.readInt(); + rc = new byte[size]; + dataIn.readFully(rc); + } + return rc; + } + + protected int tightMarshalByteSequence1(ByteSequence data, BooleanStream bs) throws IOException { + bs.writeBoolean(data!=null); + if( data!=null ){ + return data.getLength()+4; + } else { + return 0; + } + } + + protected void tightMarshalByteSequence2(ByteSequence data, DataOutput dataOut, BooleanStream bs) throws IOException { + if( bs.readBoolean() ){ + dataOut.writeInt(data.getLength()); + dataOut.write(data.getData(), data.getOffset(), data.getLength()); + } + } + + protected ByteSequence tightUnmarshalByteSequence(DataInput dataIn, BooleanStream bs) throws IOException { + ByteSequence rc=null; + if( bs.readBoolean() ) { + int size = dataIn.readInt(); + byte[] t = new byte[size]; + dataIn.readFully(t); + return new ByteSequence(t, 0, size); + } + return rc; + } + + // + // The loose marshaling logic + // + + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + } + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + } + + public void looseMarshalLong(OpenWireFormat wireFormat, long o, DataOutput dataOut) throws IOException { + dataOut.writeLong(o); + } + public long looseUnmarshalLong(OpenWireFormat wireFormat, DataInput dataIn) throws IOException { + return dataIn.readLong(); + } + + protected DataStructure looseUnmarsalNestedObject(OpenWireFormat wireFormat, DataInput dataIn) throws IOException { + return wireFormat.looseUnmarshalNestedObject(dataIn); + } + protected void looseMarshalNestedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut) throws IOException { + wireFormat.looseMarshalNestedObject(o, dataOut); + } + + protected DataStructure looseUnmarsalCachedObject(OpenWireFormat wireFormat, DataInput dataIn) throws IOException { + if( wireFormat.isCacheEnabled() ) { + if( dataIn.readBoolean() ) { + short index = dataIn.readShort(); + DataStructure object = wireFormat.looseUnmarshalNestedObject(dataIn); + wireFormat.setInUnmarshallCache(index, object); + return object; + } else { + short index = dataIn.readShort(); + return wireFormat.getFromUnmarshallCache(index); + } + } else { + return wireFormat.looseUnmarshalNestedObject(dataIn); + } + } + protected void looseMarshalCachedObject(OpenWireFormat wireFormat, DataStructure o, DataOutput dataOut) throws IOException { + if( wireFormat.isCacheEnabled() ) { + Short index = wireFormat.getMarshallCacheIndex(o); + dataOut.writeBoolean(index == null); + if( index == null ) { + index = wireFormat.addToMarshallCache(o); + dataOut.writeShort(index.shortValue()); + wireFormat.looseMarshalNestedObject(o, dataOut); + } else { + dataOut.writeShort(index.shortValue()); + } + } else { + wireFormat.looseMarshalNestedObject(o, dataOut); + } + } + + protected Throwable looseUnmarsalThrowable(OpenWireFormat wireFormat, DataInput dataIn) throws IOException { + if( dataIn.readBoolean() ) { + String clazz = looseUnmarshalString(dataIn); + String message = looseUnmarshalString(dataIn); + Throwable o = createThrowable(clazz, message); + if( wireFormat.isStackTraceEnabled() ) { + if( STACK_TRACE_ELEMENT_CONSTRUCTOR !=null) { + StackTraceElement ss[] = new StackTraceElement[dataIn.readShort()]; + for (int i = 0; i < ss.length; i++) { + try { + ss[i] = (StackTraceElement) STACK_TRACE_ELEMENT_CONSTRUCTOR.newInstance(new Object[]{ + looseUnmarshalString(dataIn), + looseUnmarshalString(dataIn), + looseUnmarshalString(dataIn), + new Integer(dataIn.readInt()) + }); + } catch (IOException e) { + throw e; + } catch (Throwable e) { + } + } + o.setStackTrace(ss); + } else { + short size = dataIn.readShort(); + for (int i = 0; i < size; i++) { + looseUnmarshalString(dataIn); + looseUnmarshalString(dataIn); + looseUnmarshalString(dataIn); + dataIn.readInt(); + } + } + o.initCause(looseUnmarsalThrowable(wireFormat, dataIn)); + + } + return o; + } else { + return null; + } + } + + + protected void looseMarshalThrowable(OpenWireFormat wireFormat, Throwable o, DataOutput dataOut) throws IOException { + dataOut.writeBoolean(o!=null); + if( o!=null ) { + looseMarshalString(o.getClass().getName(), dataOut); + looseMarshalString(o.getMessage(), dataOut); + if( wireFormat.isStackTraceEnabled() ) { + StackTraceElement[] stackTrace = o.getStackTrace(); + dataOut.writeShort(stackTrace.length); + for (int i = 0; i < stackTrace.length; i++) { + StackTraceElement element = stackTrace[i]; + looseMarshalString(element.getClassName(), dataOut); + looseMarshalString(element.getMethodName(), dataOut); + looseMarshalString(element.getFileName(), dataOut); + dataOut.writeInt(element.getLineNumber()); + } + looseMarshalThrowable(wireFormat, o.getCause(), dataOut); + } + } + } + + protected String looseUnmarshalString(DataInput dataIn) throws IOException { + if( dataIn.readBoolean() ) { + return dataIn.readUTF(); + } else { + return null; + } + } + + protected void looseMarshalString(String value, DataOutput dataOut) throws IOException { + dataOut.writeBoolean(value!=null); + if( value!=null ) { + dataOut.writeUTF(value); + } + } + + protected void looseMarshalObjectArray(OpenWireFormat wireFormat, DataStructure[] objects, DataOutput dataOut) throws IOException { + dataOut.writeBoolean(objects!=null); + if( objects!=null ) { + dataOut.writeShort(objects.length); + for( int i=0; i < objects.length; i++ ) { + looseMarshalNestedObject(wireFormat,objects[i], dataOut); + } + } + } + + protected void looseMarshalConstByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut, int i) throws IOException { + dataOut.write(data, 0, i); + } + + protected byte[] looseUnmarshalConstByteArray(DataInput dataIn, int i) throws IOException { + byte data[] = new byte[i]; + dataIn.readFully(data); + return data; + } + + protected void looseMarshalByteArray(OpenWireFormat wireFormat, byte[] data, DataOutput dataOut) throws IOException { + dataOut.writeBoolean(data!=null); + if( data!=null ){ + dataOut.writeInt(data.length); + dataOut.write(data); + } + } + + protected byte[] looseUnmarshalByteArray(DataInput dataIn) throws IOException { + byte rc[]=null; + if( dataIn.readBoolean() ) { + int size = dataIn.readInt(); + rc = new byte[size]; + dataIn.readFully(rc); + } + return rc; + } + + protected void looseMarshalByteSequence(OpenWireFormat wireFormat, ByteSequence data, DataOutput dataOut) throws IOException { + dataOut.writeBoolean(data!=null); + if( data!=null ){ + dataOut.writeInt(data.getLength()); + dataOut.write(data.getData(), data.getOffset(), data.getLength()); + } + } + + protected ByteSequence looseUnmarshalByteSequence(DataInput dataIn) throws IOException { + ByteSequence rc=null; + if( dataIn.readBoolean() ) { + int size = dataIn.readInt(); + byte[] t = new byte[size]; + dataIn.readFully(t); + rc = new ByteSequence(t, 0, size); + } + return rc; + } +} diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java new file mode 100644 index 0000000000..55199093d2 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for BrokerIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class BrokerIdMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return BrokerId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new BrokerId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); BrokerId info = (BrokerId)o; info.setValue(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { BrokerId info = (BrokerId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getValue(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); BrokerId info = (BrokerId)o; tightMarshalString2(info.getValue(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BrokerId info = (BrokerId)o; info.setValue(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { BrokerId info = (BrokerId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getValue(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java new file mode 100644 index 0000000000..d6665670b8 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/BrokerInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for BrokerInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class BrokerInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return BrokerInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new BrokerInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); BrokerInfo info = (BrokerInfo)o; info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrokerURL(tightUnmarshalString(dataIn, bs)); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); } info.setBrokerName(tightUnmarshalString(dataIn, bs)); info.setSlaveBroker(bs.readBoolean()); info.setMasterBroker(bs.readBoolean()); info.setFaultTolerantConfiguration(bs.readBoolean()); info.setDuplexConnection(bs.readBoolean()); info.setNetworkConnection(bs.readBoolean()); info.setConnectionId(tightUnmarshalLong(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { BrokerInfo info = (BrokerInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getBrokerId(), bs); rc += tightMarshalString1(info.getBrokerURL(), bs); rc += tightMarshalObjectArray1(wireFormat, info.getPeerBrokerInfos(), bs); rc += tightMarshalString1(info.getBrokerName(), bs); bs.writeBoolean(info.isSlaveBroker()); bs.writeBoolean(info.isMasterBroker()); bs.writeBoolean(info.isFaultTolerantConfiguration()); bs.writeBoolean(info.isDuplexConnection()); bs.writeBoolean(info.isNetworkConnection()); rc+=tightMarshalLong1(wireFormat, info.getConnectionId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); BrokerInfo info = (BrokerInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getBrokerId(), dataOut, bs); tightMarshalString2(info.getBrokerURL(), dataOut, bs); tightMarshalObjectArray2(wireFormat, info.getPeerBrokerInfos(), dataOut, bs); tightMarshalString2(info.getBrokerName(), dataOut, bs); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); tightMarshalLong2(wireFormat, info.getConnectionId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); BrokerInfo info = (BrokerInfo)o; info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrokerURL(looseUnmarshalString(dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setPeerBrokerInfos(value); } else { info.setPeerBrokerInfos(null); } info.setBrokerName(looseUnmarshalString(dataIn)); info.setSlaveBroker(dataIn.readBoolean()); info.setMasterBroker(dataIn.readBoolean()); info.setFaultTolerantConfiguration(dataIn.readBoolean()); info.setDuplexConnection(dataIn.readBoolean()); info.setNetworkConnection(dataIn.readBoolean()); info.setConnectionId(looseUnmarshalLong(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { BrokerInfo info = (BrokerInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getBrokerId(), dataOut); looseMarshalString(info.getBrokerURL(), dataOut); looseMarshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut); looseMarshalString(info.getBrokerName(), dataOut); dataOut.writeBoolean(info.isSlaveBroker()); dataOut.writeBoolean(info.isMasterBroker()); dataOut.writeBoolean(info.isFaultTolerantConfiguration()); dataOut.writeBoolean(info.isDuplexConnection()); dataOut.writeBoolean(info.isNetworkConnection()); looseMarshalLong(wireFormat, info.getConnectionId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java new file mode 100644 index 0000000000..cd15f1064a --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionControlMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConnectionControlMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConnectionControlMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConnectionControl.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConnectionControl(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConnectionControl info = (ConnectionControl)o; info.setClose(bs.readBoolean()); info.setExit(bs.readBoolean()); info.setFaultTolerant(bs.readBoolean()); info.setResume(bs.readBoolean()); info.setSuspend(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConnectionControl info = (ConnectionControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); bs.writeBoolean(info.isClose()); bs.writeBoolean(info.isExit()); bs.writeBoolean(info.isFaultTolerant()); bs.writeBoolean(info.isResume()); bs.writeBoolean(info.isSuspend()); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConnectionControl info = (ConnectionControl)o; bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConnectionControl info = (ConnectionControl)o; info.setClose(dataIn.readBoolean()); info.setExit(dataIn.readBoolean()); info.setFaultTolerant(dataIn.readBoolean()); info.setResume(dataIn.readBoolean()); info.setSuspend(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConnectionControl info = (ConnectionControl)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeBoolean(info.isClose()); dataOut.writeBoolean(info.isExit()); dataOut.writeBoolean(info.isFaultTolerant()); dataOut.writeBoolean(info.isResume()); dataOut.writeBoolean(info.isSuspend()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java new file mode 100644 index 0000000000..a39f475038 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionErrorMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConnectionErrorMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConnectionErrorMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConnectionError.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConnectionError(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConnectionError info = (ConnectionError)o; info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs)); info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConnectionError info = (ConnectionError)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalThrowable1(wireFormat, info.getException(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConnectionError info = (ConnectionError)o; tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConnectionError info = (ConnectionError)o; info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn)); info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalNestedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConnectionError info = (ConnectionError)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalThrowable(wireFormat, info.getException(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java new file mode 100644 index 0000000000..be337f5582 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConnectionIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConnectionIdMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConnectionId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConnectionId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConnectionId info = (ConnectionId)o; info.setValue(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConnectionId info = (ConnectionId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getValue(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConnectionId info = (ConnectionId)o; tightMarshalString2(info.getValue(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConnectionId info = (ConnectionId)o; info.setValue(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConnectionId info = (ConnectionId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getValue(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java new file mode 100644 index 0000000000..1b85217f1c --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConnectionInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConnectionInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConnectionInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConnectionInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConnectionInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConnectionInfo info = (ConnectionInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setClientId(tightUnmarshalString(dataIn, bs)); info.setPassword(tightUnmarshalString(dataIn, bs)); info.setUserName(tightUnmarshalString(dataIn, bs)); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setBrokerMasterConnector(bs.readBoolean()); info.setManageable(bs.readBoolean()); info.setClientMaster(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConnectionInfo info = (ConnectionInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); rc += tightMarshalString1(info.getClientId(), bs); rc += tightMarshalString1(info.getPassword(), bs); rc += tightMarshalString1(info.getUserName(), bs); rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs); bs.writeBoolean(info.isBrokerMasterConnector()); bs.writeBoolean(info.isManageable()); bs.writeBoolean(info.isClientMaster()); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConnectionInfo info = (ConnectionInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); tightMarshalString2(info.getClientId(), dataOut, bs); tightMarshalString2(info.getPassword(), dataOut, bs); tightMarshalString2(info.getUserName(), dataOut, bs); tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConnectionInfo info = (ConnectionInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setClientId(looseUnmarshalString(dataIn)); info.setPassword(looseUnmarshalString(dataIn)); info.setUserName(looseUnmarshalString(dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setBrokerMasterConnector(dataIn.readBoolean()); info.setManageable(dataIn.readBoolean()); info.setClientMaster(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConnectionInfo info = (ConnectionInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); looseMarshalString(info.getClientId(), dataOut); looseMarshalString(info.getPassword(), dataOut); looseMarshalString(info.getUserName(), dataOut); looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut); dataOut.writeBoolean(info.isBrokerMasterConnector()); dataOut.writeBoolean(info.isManageable()); dataOut.writeBoolean(info.isClientMaster()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java new file mode 100644 index 0000000000..28f052853b --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerControlMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConsumerControlMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConsumerControlMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConsumerControl.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConsumerControl(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConsumerControl info = (ConsumerControl)o; info.setClose(bs.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setPrefetch(dataIn.readInt()); info.setFlush(bs.readBoolean()); info.setStart(bs.readBoolean()); info.setStop(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl)o; int rc = super.tightMarshal1(wireFormat, o, bs); bs.writeBoolean(info.isClose()); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); bs.writeBoolean(info.isFlush()); bs.writeBoolean(info.isStart()); bs.writeBoolean(info.isStop()); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConsumerControl info = (ConsumerControl)o; bs.readBoolean(); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); dataOut.writeInt(info.getPrefetch()); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerControl info = (ConsumerControl)o; info.setClose(dataIn.readBoolean()); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setPrefetch(dataIn.readInt()); info.setFlush(dataIn.readBoolean()); info.setStart(dataIn.readBoolean()); info.setStop(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerControl info = (ConsumerControl)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeBoolean(info.isClose()); looseMarshalNestedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); dataOut.writeInt(info.getPrefetch()); dataOut.writeBoolean(info.isFlush()); dataOut.writeBoolean(info.isStart()); dataOut.writeBoolean(info.isStop()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java new file mode 100644 index 0000000000..bd077bd57d --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConsumerIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConsumerIdMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConsumerId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConsumerId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConsumerId info = (ConsumerId)o; info.setConnectionId(tightUnmarshalString(dataIn, bs)); info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerId info = (ConsumerId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getConnectionId(), bs); rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs); rc+=tightMarshalLong1(wireFormat, info.getValue(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConsumerId info = (ConsumerId)o; tightMarshalString2(info.getConnectionId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerId info = (ConsumerId)o; info.setConnectionId(looseUnmarshalString(dataIn)); info.setSessionId(looseUnmarshalLong(wireFormat, dataIn)); info.setValue(looseUnmarshalLong(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerId info = (ConsumerId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getConnectionId(), dataOut); looseMarshalLong(wireFormat, info.getSessionId(), dataOut); looseMarshalLong(wireFormat, info.getValue(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java new file mode 100644 index 0000000000..de57edc70a --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ConsumerInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ConsumerInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ConsumerInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ConsumerInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ConsumerInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConsumerInfo info = (ConsumerInfo)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setBrowser(bs.readBoolean()); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setPrefetchSize(dataIn.readInt()); info.setMaximumPendingMessageLimit(dataIn.readInt()); info.setDispatchAsync(bs.readBoolean()); info.setSelector(tightUnmarshalString(dataIn, bs)); info.setSubscriptionName(tightUnmarshalString(dataIn, bs)); info.setNoLocal(bs.readBoolean()); info.setExclusive(bs.readBoolean()); info.setRetroactive(bs.readBoolean()); info.setPriority(dataIn.readByte()); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setNetworkSubscription(bs.readBoolean()); info.setOptimizedAcknowledge(bs.readBoolean()); info.setNoRangeAcks(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerInfo info = (ConsumerInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); bs.writeBoolean(info.isBrowser()); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); bs.writeBoolean(info.isDispatchAsync()); rc += tightMarshalString1(info.getSelector(), bs); rc += tightMarshalString1(info.getSubscriptionName(), bs); bs.writeBoolean(info.isNoLocal()); bs.writeBoolean(info.isExclusive()); bs.writeBoolean(info.isRetroactive()); rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getAdditionalPredicate(), bs); bs.writeBoolean(info.isNetworkSubscription()); bs.writeBoolean(info.isOptimizedAcknowledge()); bs.writeBoolean(info.isNoRangeAcks()); return rc + 9; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ConsumerInfo info = (ConsumerInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); bs.readBoolean(); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); dataOut.writeInt(info.getPrefetchSize()); dataOut.writeInt(info.getMaximumPendingMessageLimit()); bs.readBoolean(); tightMarshalString2(info.getSelector(), dataOut, bs); tightMarshalString2(info.getSubscriptionName(), dataOut, bs); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); dataOut.writeByte(info.getPriority()); tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut, bs); bs.readBoolean(); bs.readBoolean(); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ConsumerInfo info = (ConsumerInfo)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setBrowser(dataIn.readBoolean()); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setPrefetchSize(dataIn.readInt()); info.setMaximumPendingMessageLimit(dataIn.readInt()); info.setDispatchAsync(dataIn.readBoolean()); info.setSelector(looseUnmarshalString(dataIn)); info.setSubscriptionName(looseUnmarshalString(dataIn)); info.setNoLocal(dataIn.readBoolean()); info.setExclusive(dataIn.readBoolean()); info.setRetroactive(dataIn.readBoolean()); info.setPriority(dataIn.readByte()); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setNetworkSubscription(dataIn.readBoolean()); info.setOptimizedAcknowledge(dataIn.readBoolean()); info.setNoRangeAcks(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ConsumerInfo info = (ConsumerInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); dataOut.writeBoolean(info.isBrowser()); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); dataOut.writeInt(info.getPrefetchSize()); dataOut.writeInt(info.getMaximumPendingMessageLimit()); dataOut.writeBoolean(info.isDispatchAsync()); looseMarshalString(info.getSelector(), dataOut); looseMarshalString(info.getSubscriptionName(), dataOut); dataOut.writeBoolean(info.isNoLocal()); dataOut.writeBoolean(info.isExclusive()); dataOut.writeBoolean(info.isRetroactive()); dataOut.writeByte(info.getPriority()); looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getAdditionalPredicate(), dataOut); dataOut.writeBoolean(info.isNetworkSubscription()); dataOut.writeBoolean(info.isOptimizedAcknowledge()); dataOut.writeBoolean(info.isNoRangeAcks()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java new file mode 100644 index 0000000000..d62b94db0e --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ControlCommandMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ControlCommandMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ControlCommandMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ControlCommand.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ControlCommand(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ControlCommand info = (ControlCommand)o; info.setCommand(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ControlCommand info = (ControlCommand)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getCommand(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ControlCommand info = (ControlCommand)o; tightMarshalString2(info.getCommand(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ControlCommand info = (ControlCommand)o; info.setCommand(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ControlCommand info = (ControlCommand)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getCommand(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java new file mode 100644 index 0000000000..53801ac76d --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataArrayResponseMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for DataArrayResponseMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class DataArrayResponseMarshaller extends ResponseMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return DataArrayResponse.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new DataArrayResponse(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); DataArrayResponse info = (DataArrayResponse)o; if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setData(value); } else { info.setData(null); } } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { DataArrayResponse info = (DataArrayResponse)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalObjectArray1(wireFormat, info.getData(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); DataArrayResponse info = (DataArrayResponse)o; tightMarshalObjectArray2(wireFormat, info.getData(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); DataArrayResponse info = (DataArrayResponse)o; if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.DataStructure value[] = new org.apache.activemq.command.DataStructure[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setData(value); } else { info.setData(null); } } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { DataArrayResponse info = (DataArrayResponse)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalObjectArray(wireFormat, info.getData(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java new file mode 100644 index 0000000000..b969548d3b --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DataResponseMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for DataResponseMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class DataResponseMarshaller extends ResponseMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return DataResponse.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new DataResponse(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); DataResponse info = (DataResponse)o; info.setData((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { DataResponse info = (DataResponse)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getData(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); DataResponse info = (DataResponse)o; tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); DataResponse info = (DataResponse)o; info.setData((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { DataResponse info = (DataResponse)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getData(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java new file mode 100644 index 0000000000..0e6b95de3b --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DestinationInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for DestinationInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class DestinationInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return DestinationInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new DestinationInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); DestinationInfo info = (DestinationInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setOperationType(dataIn.readByte()); info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs)); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { DestinationInfo info = (DestinationInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs); rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs); return rc + 1; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); DestinationInfo info = (DestinationInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); dataOut.writeByte(info.getOperationType()); tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs); tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); DestinationInfo info = (DestinationInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setOperationType(dataIn.readByte()); info.setTimeout(looseUnmarshalLong(wireFormat, dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { DestinationInfo info = (DestinationInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); dataOut.writeByte(info.getOperationType()); looseMarshalLong(wireFormat, info.getTimeout(), dataOut); looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java new file mode 100644 index 0000000000..9e2f268b29 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/DiscoveryEventMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for DiscoveryEventMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class DiscoveryEventMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return DiscoveryEvent.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new DiscoveryEvent(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); DiscoveryEvent info = (DiscoveryEvent)o; info.setServiceName(tightUnmarshalString(dataIn, bs)); info.setBrokerName(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { DiscoveryEvent info = (DiscoveryEvent)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getServiceName(), bs); rc += tightMarshalString1(info.getBrokerName(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); DiscoveryEvent info = (DiscoveryEvent)o; tightMarshalString2(info.getServiceName(), dataOut, bs); tightMarshalString2(info.getBrokerName(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); DiscoveryEvent info = (DiscoveryEvent)o; info.setServiceName(looseUnmarshalString(dataIn)); info.setBrokerName(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { DiscoveryEvent info = (DiscoveryEvent)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getServiceName(), dataOut); looseMarshalString(info.getBrokerName(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java new file mode 100644 index 0000000000..ad9720c4ce --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ExceptionResponseMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ExceptionResponseMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ExceptionResponseMarshaller extends ResponseMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ExceptionResponse.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ExceptionResponse(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ExceptionResponse info = (ExceptionResponse)o; info.setException((java.lang.Throwable) tightUnmarsalThrowable(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ExceptionResponse info = (ExceptionResponse)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalThrowable1(wireFormat, info.getException(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ExceptionResponse info = (ExceptionResponse)o; tightMarshalThrowable2(wireFormat, info.getException(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ExceptionResponse info = (ExceptionResponse)o; info.setException((java.lang.Throwable) looseUnmarsalThrowable(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ExceptionResponse info = (ExceptionResponse)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalThrowable(wireFormat, info.getException(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java new file mode 100644 index 0000000000..0049fcfe62 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/FlushCommandMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for FlushCommandMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class FlushCommandMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return FlushCommand.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new FlushCommand(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java new file mode 100644 index 0000000000..ae728b0b24 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/IntegerResponseMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for IntegerResponseMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class IntegerResponseMarshaller extends ResponseMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return IntegerResponse.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new IntegerResponse(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); IntegerResponse info = (IntegerResponse)o; info.setResult(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { IntegerResponse info = (IntegerResponse)o; int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); IntegerResponse info = (IntegerResponse)o; dataOut.writeInt(info.getResult()); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); IntegerResponse info = (IntegerResponse)o; info.setResult(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { IntegerResponse info = (IntegerResponse)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getResult()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java new file mode 100644 index 0000000000..735d35a148 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalQueueAckMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for JournalQueueAckMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class JournalQueueAckMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return JournalQueueAck.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new JournalQueueAck(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalQueueAck info = (JournalQueueAck)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setMessageAck((org.apache.activemq.command.MessageAck) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { JournalQueueAck info = (JournalQueueAck)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageAck(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); JournalQueueAck info = (JournalQueueAck)o; tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageAck(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalQueueAck info = (JournalQueueAck)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setMessageAck((org.apache.activemq.command.MessageAck) looseUnmarsalNestedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { JournalQueueAck info = (JournalQueueAck)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageAck(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java new file mode 100644 index 0000000000..7e2d13efc1 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTopicAckMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for JournalTopicAckMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class JournalTopicAckMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return JournalTopicAck.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new JournalTopicAck(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalTopicAck info = (JournalTopicAck)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setMessageSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setSubscritionName(tightUnmarshalString(dataIn, bs)); info.setClientId(tightUnmarshalString(dataIn, bs)); info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { JournalTopicAck info = (JournalTopicAck)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs); rc+=tightMarshalLong1(wireFormat, info.getMessageSequenceId(), bs); rc += tightMarshalString1(info.getSubscritionName(), bs); rc += tightMarshalString1(info.getClientId(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); JournalTopicAck info = (JournalTopicAck)o; tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getMessageSequenceId(), dataOut, bs); tightMarshalString2(info.getSubscritionName(), dataOut, bs); tightMarshalString2(info.getClientId(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalTopicAck info = (JournalTopicAck)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setMessageSequenceId(looseUnmarshalLong(wireFormat, dataIn)); info.setSubscritionName(looseUnmarshalString(dataIn)); info.setClientId(looseUnmarshalString(dataIn)); info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { JournalTopicAck info = (JournalTopicAck)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut); looseMarshalLong(wireFormat, info.getMessageSequenceId(), dataOut); looseMarshalString(info.getSubscritionName(), dataOut); looseMarshalString(info.getClientId(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java new file mode 100644 index 0000000000..0a08092f05 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTraceMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for JournalTraceMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class JournalTraceMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return JournalTrace.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new JournalTrace(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalTrace info = (JournalTrace)o; info.setMessage(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { JournalTrace info = (JournalTrace)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getMessage(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); JournalTrace info = (JournalTrace)o; tightMarshalString2(info.getMessage(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalTrace info = (JournalTrace)o; info.setMessage(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { JournalTrace info = (JournalTrace)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getMessage(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java new file mode 100644 index 0000000000..8327a50ad2 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/JournalTransactionMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for JournalTransactionMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class JournalTransactionMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return JournalTransaction.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new JournalTransaction(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); JournalTransaction info = (JournalTransaction)o; info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setType(dataIn.readByte()); info.setWasPrepared(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { JournalTransaction info = (JournalTransaction)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); bs.writeBoolean(info.getWasPrepared()); return rc + 1; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); JournalTransaction info = (JournalTransaction)o; tightMarshalNestedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); dataOut.writeByte(info.getType()); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); JournalTransaction info = (JournalTransaction)o; info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setType(dataIn.readByte()); info.setWasPrepared(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { JournalTransaction info = (JournalTransaction)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); dataOut.writeByte(info.getType()); dataOut.writeBoolean(info.getWasPrepared()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java new file mode 100644 index 0000000000..3d744ecf45 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/KeepAliveInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for KeepAliveInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class KeepAliveInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return KeepAliveInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new KeepAliveInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java new file mode 100644 index 0000000000..243ad08c16 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LastPartialCommandMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for LastPartialCommandMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class LastPartialCommandMarshaller extends PartialCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return LastPartialCommand.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new LastPartialCommand(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java new file mode 100644 index 0000000000..8a288c819e --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/LocalTransactionIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for LocalTransactionIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class LocalTransactionIdMarshaller extends TransactionIdMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return LocalTransactionId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new LocalTransactionId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); LocalTransactionId info = (LocalTransactionId)o; info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { LocalTransactionId info = (LocalTransactionId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc+=tightMarshalLong1(wireFormat, info.getValue(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); LocalTransactionId info = (LocalTransactionId)o; tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); LocalTransactionId info = (LocalTransactionId)o; info.setValue(looseUnmarshalLong(wireFormat, dataIn)); info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { LocalTransactionId info = (LocalTransactionId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalLong(wireFormat, info.getValue(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java new file mode 100644 index 0000000000..e322dc27fe --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MarshallerFactory.java @@ -0,0 +1,108 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.activemq.openwire.v3; + +import org.apache.activemq.openwire.DataStreamMarshaller; +import org.apache.activemq.openwire.OpenWireFormat; + +/** + * MarshallerFactory for Open Wire Format. + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * @version $Revision$ + */ +public class MarshallerFactory { + + /** + * Creates a Map of command type -> Marshallers + */ + static final private DataStreamMarshaller marshaller[] = new DataStreamMarshaller[256]; + static { + + add(new ActiveMQBlobMessageMarshaller()); + add(new ActiveMQBytesMessageMarshaller()); + add(new ActiveMQMapMessageMarshaller()); + add(new ActiveMQMessageMarshaller()); + add(new ActiveMQObjectMessageMarshaller()); + add(new ActiveMQQueueMarshaller()); + add(new ActiveMQStreamMessageMarshaller()); + add(new ActiveMQTempQueueMarshaller()); + add(new ActiveMQTempTopicMarshaller()); + add(new ActiveMQTextMessageMarshaller()); + add(new ActiveMQTopicMarshaller()); + add(new BrokerIdMarshaller()); + add(new BrokerInfoMarshaller()); + add(new ConnectionControlMarshaller()); + add(new ConnectionErrorMarshaller()); + add(new ConnectionIdMarshaller()); + add(new ConnectionInfoMarshaller()); + add(new ConsumerControlMarshaller()); + add(new ConsumerIdMarshaller()); + add(new ConsumerInfoMarshaller()); + add(new ControlCommandMarshaller()); + add(new DataArrayResponseMarshaller()); + add(new DataResponseMarshaller()); + add(new DestinationInfoMarshaller()); + add(new DiscoveryEventMarshaller()); + add(new ExceptionResponseMarshaller()); + add(new FlushCommandMarshaller()); + add(new IntegerResponseMarshaller()); + add(new JournalQueueAckMarshaller()); + add(new JournalTopicAckMarshaller()); + add(new JournalTraceMarshaller()); + add(new JournalTransactionMarshaller()); + add(new KeepAliveInfoMarshaller()); + add(new LastPartialCommandMarshaller()); + add(new LocalTransactionIdMarshaller()); + add(new MessageAckMarshaller()); + add(new MessageDispatchMarshaller()); + add(new MessageDispatchNotificationMarshaller()); + add(new MessageIdMarshaller()); + add(new MessagePullMarshaller()); + add(new NetworkBridgeFilterMarshaller()); + add(new PartialCommandMarshaller()); + add(new ProducerIdMarshaller()); + add(new ProducerInfoMarshaller()); + add(new RemoveInfoMarshaller()); + add(new RemoveSubscriptionInfoMarshaller()); + add(new ReplayCommandMarshaller()); + add(new ResponseMarshaller()); + add(new SessionIdMarshaller()); + add(new SessionInfoMarshaller()); + add(new ShutdownInfoMarshaller()); + add(new SubscriptionInfoMarshaller()); + add(new TransactionInfoMarshaller()); + add(new WireFormatInfoMarshaller()); + add(new XATransactionIdMarshaller()); + + } + + static private void add(DataStreamMarshaller dsm) { + marshaller[dsm.getDataStructureType()] = dsm; + } + + static public DataStreamMarshaller[] createMarshallerMap(OpenWireFormat wireFormat) { + return marshaller; + } +} diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java new file mode 100644 index 0000000000..fc50b0d40e --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageAckMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for MessageAckMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class MessageAckMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return MessageAck.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new MessageAck(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); MessageAck info = (MessageAck)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setAckType(dataIn.readByte()); info.setFirstMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setLastMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setMessageCount(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { MessageAck info = (MessageAck)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getFirstMessageId(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getLastMessageId(), bs); return rc + 5; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); MessageAck info = (MessageAck)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); dataOut.writeByte(info.getAckType()); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getLastMessageId(), dataOut, bs); dataOut.writeInt(info.getMessageCount()); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); MessageAck info = (MessageAck)o; info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setAckType(dataIn.readByte()); info.setFirstMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setLastMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setMessageCount(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { MessageAck info = (MessageAck)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); dataOut.writeByte(info.getAckType()); looseMarshalNestedObject(wireFormat, (DataStructure)info.getFirstMessageId(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getLastMessageId(), dataOut); dataOut.writeInt(info.getMessageCount()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java new file mode 100644 index 0000000000..4655f5e911 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for MessageDispatchMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class MessageDispatchMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return MessageDispatch.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new MessageDispatch(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); MessageDispatch info = (MessageDispatch)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setMessage((org.apache.activemq.command.Message) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setRedeliveryCounter(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { MessageDispatch info = (MessageDispatch)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessage(), bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); MessageDispatch info = (MessageDispatch)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessage(), dataOut, bs); dataOut.writeInt(info.getRedeliveryCounter()); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); MessageDispatch info = (MessageDispatch)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setMessage((org.apache.activemq.command.Message) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setRedeliveryCounter(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { MessageDispatch info = (MessageDispatch)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessage(), dataOut); dataOut.writeInt(info.getRedeliveryCounter()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java new file mode 100644 index 0000000000..9df76950f9 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for MessageDispatchNotificationMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class MessageDispatchNotificationMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return MessageDispatchNotification.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new MessageDispatchNotification(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); MessageDispatchNotification info = (MessageDispatchNotification)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDeliverySequenceId(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { MessageDispatchNotification info = (MessageDispatchNotification)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc+=tightMarshalLong1(wireFormat, info.getDeliverySequenceId(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); MessageDispatchNotification info = (MessageDispatchNotification)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalLong2(wireFormat, info.getDeliverySequenceId(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); MessageDispatchNotification info = (MessageDispatchNotification)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDeliverySequenceId(looseUnmarshalLong(wireFormat, dataIn)); info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { MessageDispatchNotification info = (MessageDispatchNotification)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalLong(wireFormat, info.getDeliverySequenceId(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java new file mode 100644 index 0000000000..b3546c005c --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for MessageIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class MessageIdMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return MessageId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new MessageId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); MessageId info = (MessageId)o; info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setProducerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setBrokerSequenceId(tightUnmarshalLong(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { MessageId info = (MessageId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs); rc+=tightMarshalLong1(wireFormat, info.getProducerSequenceId(), bs); rc+=tightMarshalLong1(wireFormat, info.getBrokerSequenceId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); MessageId info = (MessageId)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getProducerSequenceId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getBrokerSequenceId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); MessageId info = (MessageId)o; info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setProducerSequenceId(looseUnmarshalLong(wireFormat, dataIn)); info.setBrokerSequenceId(looseUnmarshalLong(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { MessageId info = (MessageId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut); looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut); looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java new file mode 100644 index 0000000000..db920dd59e --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessageMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for MessageMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public abstract class MessageMarshaller extends BaseCommandMarshaller { /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); Message info = (Message)o; info.beforeUnmarshall(wireFormat); info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setMessageId((org.apache.activemq.command.MessageId) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setGroupID(tightUnmarshalString(dataIn, bs)); info.setGroupSequence(dataIn.readInt()); info.setCorrelationId(tightUnmarshalString(dataIn, bs)); info.setPersistent(bs.readBoolean()); info.setExpiration(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setPriority(dataIn.readByte()); info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setTimestamp(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setType(tightUnmarshalString(dataIn, bs)); info.setContent(tightUnmarshalByteSequence(dataIn, bs)); info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); info.setDataStructure((org.apache.activemq.command.DataStructure) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setCompressed(bs.readBoolean()); info.setRedeliveryCounter(dataIn.readInt()); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setArrival(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setUserID(tightUnmarshalString(dataIn, bs)); info.setRecievedByDFBridge(bs.readBoolean()); info.setDroppable(bs.readBoolean()); info.afterUnmarshall(wireFormat); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { Message info = (Message)o; info.beforeMarshall(wireFormat); int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalDestination(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getMessageId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getOriginalTransactionId(), bs); rc += tightMarshalString1(info.getGroupID(), bs); rc += tightMarshalString1(info.getCorrelationId(), bs); bs.writeBoolean(info.isPersistent()); rc+=tightMarshalLong1(wireFormat, info.getExpiration(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getReplyTo(), bs); rc+=tightMarshalLong1(wireFormat, info.getTimestamp(), bs); rc += tightMarshalString1(info.getType(), bs); rc += tightMarshalByteSequence1(info.getContent(), bs); rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs); rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDataStructure(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTargetConsumerId(), bs); bs.writeBoolean(info.isCompressed()); rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs); rc+=tightMarshalLong1(wireFormat, info.getArrival(), bs); rc += tightMarshalString1(info.getUserID(), bs); bs.writeBoolean(info.isRecievedByDFBridge()); bs.writeBoolean(info.isDroppable()); return rc + 9; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); Message info = (Message)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getMessageId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut, bs); tightMarshalString2(info.getGroupID(), dataOut, bs); dataOut.writeInt(info.getGroupSequence()); tightMarshalString2(info.getCorrelationId(), dataOut, bs); bs.readBoolean(); tightMarshalLong2(wireFormat, info.getExpiration(), dataOut, bs); dataOut.writeByte(info.getPriority()); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getReplyTo(), dataOut, bs); tightMarshalLong2(wireFormat, info.getTimestamp(), dataOut, bs); tightMarshalString2(info.getType(), dataOut, bs); tightMarshalByteSequence2(info.getContent(), dataOut, bs); tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs); tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDataStructure(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut, bs); bs.readBoolean(); dataOut.writeInt(info.getRedeliveryCounter()); tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs); tightMarshalLong2(wireFormat, info.getArrival(), dataOut, bs); tightMarshalString2(info.getUserID(), dataOut, bs); bs.readBoolean(); bs.readBoolean(); info.afterMarshall(wireFormat); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); Message info = (Message)o; info.beforeUnmarshall(wireFormat); info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setMessageId((org.apache.activemq.command.MessageId) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setGroupID(looseUnmarshalString(dataIn)); info.setGroupSequence(dataIn.readInt()); info.setCorrelationId(looseUnmarshalString(dataIn)); info.setPersistent(dataIn.readBoolean()); info.setExpiration(looseUnmarshalLong(wireFormat, dataIn)); info.setPriority(dataIn.readByte()); info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setTimestamp(looseUnmarshalLong(wireFormat, dataIn)); info.setType(looseUnmarshalString(dataIn)); info.setContent(looseUnmarshalByteSequence(dataIn)); info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn)); info.setDataStructure((org.apache.activemq.command.DataStructure) looseUnmarsalNestedObject(wireFormat, dataIn)); info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setCompressed(dataIn.readBoolean()); info.setRedeliveryCounter(dataIn.readInt()); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setArrival(looseUnmarshalLong(wireFormat, dataIn)); info.setUserID(looseUnmarshalString(dataIn)); info.setRecievedByDFBridge(dataIn.readBoolean()); info.setDroppable(dataIn.readBoolean()); info.afterUnmarshall(wireFormat); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { Message info = (Message)o; info.beforeMarshall(wireFormat); super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalDestination(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getOriginalTransactionId(), dataOut); looseMarshalString(info.getGroupID(), dataOut); dataOut.writeInt(info.getGroupSequence()); looseMarshalString(info.getCorrelationId(), dataOut); dataOut.writeBoolean(info.isPersistent()); looseMarshalLong(wireFormat, info.getExpiration(), dataOut); dataOut.writeByte(info.getPriority()); looseMarshalNestedObject(wireFormat, (DataStructure)info.getReplyTo(), dataOut); looseMarshalLong(wireFormat, info.getTimestamp(), dataOut); looseMarshalString(info.getType(), dataOut); looseMarshalByteSequence(wireFormat, info.getContent(), dataOut); looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut); looseMarshalNestedObject(wireFormat, (DataStructure)info.getDataStructure(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getTargetConsumerId(), dataOut); dataOut.writeBoolean(info.isCompressed()); dataOut.writeInt(info.getRedeliveryCounter()); looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut); looseMarshalLong(wireFormat, info.getArrival(), dataOut); looseMarshalString(info.getUserID(), dataOut); dataOut.writeBoolean(info.isRecievedByDFBridge()); dataOut.writeBoolean(info.isDroppable()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java new file mode 100644 index 0000000000..6f741c73fd --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/MessagePullMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for MessagePullMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class MessagePullMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return MessagePull.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new MessagePull(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); MessagePull info = (MessagePull)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { MessagePull info = (MessagePull)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConsumerId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc+=tightMarshalLong1(wireFormat, info.getTimeout(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); MessagePull info = (MessagePull)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); MessagePull info = (MessagePull)o; info.setConsumerId((org.apache.activemq.command.ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setTimeout(looseUnmarshalLong(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { MessagePull info = (MessagePull)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConsumerId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalLong(wireFormat, info.getTimeout(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java new file mode 100644 index 0000000000..497920835e --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for NetworkBridgeFilterMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class NetworkBridgeFilterMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return NetworkBridgeFilter.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new NetworkBridgeFilter(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); NetworkBridgeFilter info = (NetworkBridgeFilter)o; info.setNetworkTTL(dataIn.readInt()); info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { NetworkBridgeFilter info = (NetworkBridgeFilter)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getNetworkBrokerId(), bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); NetworkBridgeFilter info = (NetworkBridgeFilter)o; dataOut.writeInt(info.getNetworkTTL()); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); NetworkBridgeFilter info = (NetworkBridgeFilter)o; info.setNetworkTTL(dataIn.readInt()); info.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { NetworkBridgeFilter info = (NetworkBridgeFilter)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getNetworkTTL()); looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java new file mode 100644 index 0000000000..d3d6f7097e --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/PartialCommandMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for PartialCommandMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class PartialCommandMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return PartialCommand.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new PartialCommand(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); PartialCommand info = (PartialCommand)o; info.setCommandId(dataIn.readInt()); info.setData(tightUnmarshalByteArray(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { PartialCommand info = (PartialCommand)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalByteArray1(info.getData(), bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); PartialCommand info = (PartialCommand)o; dataOut.writeInt(info.getCommandId()); tightMarshalByteArray2(info.getData(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); PartialCommand info = (PartialCommand)o; info.setCommandId(dataIn.readInt()); info.setData(looseUnmarshalByteArray(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { PartialCommand info = (PartialCommand)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getCommandId()); looseMarshalByteArray(wireFormat, info.getData(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java new file mode 100644 index 0000000000..995f71554b --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ProducerIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ProducerIdMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ProducerId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ProducerId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ProducerId info = (ProducerId)o; info.setConnectionId(tightUnmarshalString(dataIn, bs)); info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs)); info.setSessionId(tightUnmarshalLong(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ProducerId info = (ProducerId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getConnectionId(), bs); rc+=tightMarshalLong1(wireFormat, info.getValue(), bs); rc+=tightMarshalLong1(wireFormat, info.getSessionId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ProducerId info = (ProducerId)o; tightMarshalString2(info.getConnectionId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs); tightMarshalLong2(wireFormat, info.getSessionId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ProducerId info = (ProducerId)o; info.setConnectionId(looseUnmarshalString(dataIn)); info.setValue(looseUnmarshalLong(wireFormat, dataIn)); info.setSessionId(looseUnmarshalLong(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ProducerId info = (ProducerId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getConnectionId(), dataOut); looseMarshalLong(wireFormat, info.getValue(), dataOut); looseMarshalLong(wireFormat, info.getSessionId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java new file mode 100644 index 0000000000..60dc336aec --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ProducerInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ProducerInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ProducerInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ProducerInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ProducerInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ProducerInfo info = (ProducerInfo)o; info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); if (bs.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setDispatchAsync(bs.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ProducerInfo info = (ProducerInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getProducerId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalObjectArray1(wireFormat, info.getBrokerPath(), bs); bs.writeBoolean(info.isDispatchAsync()); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ProducerInfo info = (ProducerInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalObjectArray2(wireFormat, info.getBrokerPath(), dataOut, bs); bs.readBoolean(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ProducerInfo info = (ProducerInfo)o; info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); if (dataIn.readBoolean()) { short size = dataIn.readShort(); org.apache.activemq.command.BrokerId value[] = new org.apache.activemq.command.BrokerId[size]; for( int i=0; i < size; i++ ) { value[i] = (org.apache.activemq.command.BrokerId) looseUnmarsalNestedObject(wireFormat,dataIn); } info.setBrokerPath(value); } else { info.setBrokerPath(null); } info.setDispatchAsync(dataIn.readBoolean()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ProducerInfo info = (ProducerInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalObjectArray(wireFormat, info.getBrokerPath(), dataOut); dataOut.writeBoolean(info.isDispatchAsync()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java new file mode 100644 index 0000000000..f7a61450f0 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for RemoveInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class RemoveInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return RemoveInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new RemoveInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); RemoveInfo info = (RemoveInfo)o; info.setObjectId((org.apache.activemq.command.DataStructure) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { RemoveInfo info = (RemoveInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); RemoveInfo info = (RemoveInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getObjectId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); RemoveInfo info = (RemoveInfo)o; info.setObjectId((org.apache.activemq.command.DataStructure) looseUnmarsalCachedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { RemoveInfo info = (RemoveInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getObjectId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java new file mode 100644 index 0000000000..0193d91401 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new RemoveSubscriptionInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setSubcriptionName(tightUnmarshalString(dataIn, bs)); info.setClientId(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); rc += tightMarshalString1(info.getSubcriptionName(), bs); rc += tightMarshalString1(info.getClientId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); tightMarshalString2(info.getSubcriptionName(), dataOut, bs); tightMarshalString2(info.getClientId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setSubcriptionName(looseUnmarshalString(dataIn)); info.setClientId(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); looseMarshalString(info.getSubcriptionName(), dataOut); looseMarshalString(info.getClientId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java new file mode 100644 index 0000000000..fe50414fe6 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ReplayCommandMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ReplayCommandMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ReplayCommandMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ReplayCommand.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ReplayCommand(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ReplayCommand info = (ReplayCommand)o; info.setFirstNakNumber(dataIn.readInt()); info.setLastNakNumber(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ReplayCommand info = (ReplayCommand)o; int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 8; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); ReplayCommand info = (ReplayCommand)o; dataOut.writeInt(info.getFirstNakNumber()); dataOut.writeInt(info.getLastNakNumber()); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ReplayCommand info = (ReplayCommand)o; info.setFirstNakNumber(dataIn.readInt()); info.setLastNakNumber(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { ReplayCommand info = (ReplayCommand)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getFirstNakNumber()); dataOut.writeInt(info.getLastNakNumber()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java new file mode 100644 index 0000000000..a5b5d419ff --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ResponseMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ResponseMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ResponseMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return Response.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new Response(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); Response info = (Response)o; info.setCorrelationId(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { Response info = (Response)o; int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); Response info = (Response)o; dataOut.writeInt(info.getCorrelationId()); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); Response info = (Response)o; info.setCorrelationId(dataIn.readInt()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { Response info = (Response)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getCorrelationId()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java new file mode 100644 index 0000000000..e35388f8f0 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for SessionIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class SessionIdMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return SessionId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new SessionId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); SessionId info = (SessionId)o; info.setConnectionId(tightUnmarshalString(dataIn, bs)); info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { SessionId info = (SessionId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getConnectionId(), bs); rc+=tightMarshalLong1(wireFormat, info.getValue(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); SessionId info = (SessionId)o; tightMarshalString2(info.getConnectionId(), dataOut, bs); tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); SessionId info = (SessionId)o; info.setConnectionId(looseUnmarshalString(dataIn)); info.setValue(looseUnmarshalLong(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { SessionId info = (SessionId)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getConnectionId(), dataOut); looseMarshalLong(wireFormat, info.getValue(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java new file mode 100644 index 0000000000..7bc8c27616 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SessionInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for SessionInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class SessionInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return SessionInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new SessionInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); SessionInfo info = (SessionInfo)o; info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { SessionInfo info = (SessionInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); SessionInfo info = (SessionInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); SessionInfo info = (SessionInfo)o; info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { SessionInfo info = (SessionInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java new file mode 100644 index 0000000000..26ec3149f8 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/ShutdownInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for ShutdownInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class ShutdownInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return ShutdownInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new ShutdownInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java new file mode 100644 index 0000000000..3a7293c9ce --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/SubscriptionInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return SubscriptionInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new SubscriptionInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); SubscriptionInfo info = (SubscriptionInfo)o; info.setClientId(tightUnmarshalString(dataIn, bs)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setSelector(tightUnmarshalString(dataIn, bs)); info.setSubcriptionName(tightUnmarshalString(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { SubscriptionInfo info = (SubscriptionInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalString1(info.getClientId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); rc += tightMarshalString1(info.getSelector(), bs); rc += tightMarshalString1(info.getSubcriptionName(), bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); SubscriptionInfo info = (SubscriptionInfo)o; tightMarshalString2(info.getClientId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); tightMarshalString2(info.getSelector(), dataOut, bs); tightMarshalString2(info.getSubcriptionName(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); SubscriptionInfo info = (SubscriptionInfo)o; info.setClientId(looseUnmarshalString(dataIn)); info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setSelector(looseUnmarshalString(dataIn)); info.setSubcriptionName(looseUnmarshalString(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { SubscriptionInfo info = (SubscriptionInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalString(info.getClientId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); looseMarshalString(info.getSelector(), dataOut); looseMarshalString(info.getSubcriptionName(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java new file mode 100644 index 0000000000..29eeb6f954 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for TransactionIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller { /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { int rc = super.tightMarshal1(wireFormat, o, bs); return rc + 0; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { super.looseMarshal(wireFormat, o, dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java new file mode 100644 index 0000000000..9c1b16dc90 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/TransactionInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for TransactionInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class TransactionInfoMarshaller extends BaseCommandMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return TransactionInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new TransactionInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); TransactionInfo info = (TransactionInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setType(dataIn.readByte()); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { TransactionInfo info = (TransactionInfo)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); return rc + 1; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); TransactionInfo info = (TransactionInfo)o; tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); dataOut.writeByte(info.getType()); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); TransactionInfo info = (TransactionInfo)o; info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setType(dataIn.readByte()); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { TransactionInfo info = (TransactionInfo)o; super.looseMarshal(wireFormat, o, dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); dataOut.writeByte(info.getType()); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java new file mode 100644 index 0000000000..d7637d7679 --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/WireFormatInfoMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for WireFormatInfoMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return WireFormatInfo.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new WireFormatInfo(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); WireFormatInfo info = (WireFormatInfo)o; info.beforeUnmarshall(wireFormat); info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8)); info.setVersion(dataIn.readInt()); info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); info.afterUnmarshall(wireFormat); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { WireFormatInfo info = (WireFormatInfo)o; info.beforeMarshall(wireFormat); int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8); rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); WireFormatInfo info = (WireFormatInfo)o; tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8); dataOut.writeInt(info.getVersion()); tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs); info.afterMarshall(wireFormat); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); WireFormatInfo info = (WireFormatInfo)o; info.beforeUnmarshall(wireFormat); info.setMagic(looseUnmarshalConstByteArray(dataIn, 8)); info.setVersion(dataIn.readInt()); info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn)); info.afterUnmarshall(wireFormat); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { WireFormatInfo info = (WireFormatInfo)o; info.beforeMarshall(wireFormat); super.looseMarshal(wireFormat, o, dataOut); looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8); dataOut.writeInt(info.getVersion()); looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java new file mode 100644 index 0000000000..32e2d6f8ca --- /dev/null +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/v3/XATransactionIdMarshaller.java @@ -0,0 +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.v3; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.*; import org.apache.activemq.command.*; /** * Marshalling code for Open Wire Format for XATransactionIdMarshaller * * * NOTE!: This file is auto generated - do not modify! * if you need to make a change, please see the modify the groovy scripts in the * under src/gram/script and then use maven openwire:generate to regenerate * this file. * * @version $Revision$ */ public class XATransactionIdMarshaller extends TransactionIdMarshaller { /** * Return the type of Data Structure we marshal * @return short representation of the type data structure */ public byte getDataStructureType() { return XATransactionId.DATA_STRUCTURE_TYPE; } /** * @return a new object instance */ public DataStructure createObject() { return new XATransactionId(); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); XATransactionId info = (XATransactionId)o; info.setFormatId(dataIn.readInt()); info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs)); info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs)); } /** * Write the booleans that this object uses to a BooleanStream */ public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { XATransactionId info = (XATransactionId)o; int rc = super.tightMarshal1(wireFormat, o, bs); rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs); rc += tightMarshalByteArray1(info.getBranchQualifier(), bs); return rc + 4; } /** * Write a object instance to data output stream * * @param o the instance to be marshaled * @param dataOut the output stream * @throws IOException thrown if an error occurs */ public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); XATransactionId info = (XATransactionId)o; dataOut.writeInt(info.getFormatId()); tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs); tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs); } /** * Un-marshal an object instance from the data input stream * * @param o the object to un-marshal * @param dataIn the data input stream to build the object from * @throws IOException */ public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); XATransactionId info = (XATransactionId)o; info.setFormatId(dataIn.readInt()); info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn)); info.setBranchQualifier(looseUnmarshalByteArray(dataIn)); } /** * Write the booleans that this object uses to a BooleanStream */ public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { XATransactionId info = (XATransactionId)o; super.looseMarshal(wireFormat, o, dataOut); dataOut.writeInt(info.getFormatId()); looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut); looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java new file mode 100644 index 0000000000..2e1e9152ff --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.openwire.v3; + +import org.apache.activemq.openwire.DataFileGeneratorTestSupport; +import org.apache.activemq.command.BaseCommand; + +/** + * Test case for the OpenWire marshalling for BaseCommand + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * @version $Revision: $ + */ +public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport { + + + protected void populateObject(Object object) throws Exception { + super.populateObject(object); + BaseCommand info = (BaseCommand) object; + info.setCommandId(1); + info.setResponseRequired(true); + + } + } diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java new file mode 100644 index 0000000000..378947fc89 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java new file mode 100644 index 0000000000..ec775361fa --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BrokerInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java new file mode 100644 index 0000000000..aed4026e75 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionControlTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java new file mode 100644 index 0000000000..3be9a3c9a6 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionErrorTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java new file mode 100644 index 0000000000..718ae59ea9 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java new file mode 100644 index 0000000000..4d5ef67d69 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConnectionInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java new file mode 100644 index 0000000000..b9fb7a695a --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerControlTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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.setClose(true); info.setConsumerId(createConsumerId("ConsumerId:1")); info.setPrefetch(1); info.setFlush(false); info.setStart(true); info.setStop(false); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java new file mode 100644 index 0000000000..d5942daa97 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java new file mode 100644 index 0000000000..29c6ce8b88 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ConsumerInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java new file mode 100644 index 0000000000..9900c7dcbf --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ControlCommandTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java new file mode 100644 index 0000000000..a3a5a19d39 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataArrayResponseTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java new file mode 100644 index 0000000000..13806ed3fd --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DataResponseTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java new file mode 100644 index 0000000000..e2dbb501d6 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DestinationInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java new file mode 100644 index 0000000000..03802dcc40 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/DiscoveryEventTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java new file mode 100644 index 0000000000..0128fa1f83 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ExceptionResponseTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java new file mode 100644 index 0000000000..5b85773ab8 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/FlushCommandTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java new file mode 100644 index 0000000000..aeb589d4cc --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/IntegerResponseTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java new file mode 100644 index 0000000000..e8d05417d1 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalQueueAckTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java new file mode 100644 index 0000000000..ada779a4da --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTopicAckTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java new file mode 100644 index 0000000000..92ac68fc23 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTraceTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java new file mode 100644 index 0000000000..86d6aed0a1 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/JournalTransactionTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java new file mode 100644 index 0000000000..02ff04f566 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/KeepAliveInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java new file mode 100644 index 0000000000..4ee21d36f1 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LastPartialCommandTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java new file mode 100644 index 0000000000..431414f817 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/LocalTransactionIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java new file mode 100644 index 0000000000..66c1bc647f --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageAckTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java new file mode 100644 index 0000000000..612bc523e9 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchNotificationTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java new file mode 100644 index 0000000000..a67d76426b --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageDispatchTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java new file mode 100644 index 0000000000..87285a1594 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java new file mode 100644 index 0000000000..5b85af72de --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessagePullTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java new file mode 100644 index 0000000000..6407f9bbfa --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/MessageTestSupport.java @@ -0,0 +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.v3; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.activemq.openwire.*; 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java new file mode 100644 index 0000000000..5f42a76dc5 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/NetworkBridgeFilterTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java new file mode 100644 index 0000000000..a24296dd85 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/PartialCommandTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java new file mode 100644 index 0000000000..41ef9976ad --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java new file mode 100644 index 0000000000..a8593b4478 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ProducerInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java new file mode 100644 index 0000000000..0701131a89 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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")); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java new file mode 100644 index 0000000000..9db4cc642b --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/RemoveSubscriptionInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java new file mode 100644 index 0000000000..4cf748598c --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ReplayCommandTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java new file mode 100644 index 0000000000..5692dd2c10 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ResponseTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java new file mode 100644 index 0000000000..4b8185dd15 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java new file mode 100644 index 0000000000..c3ef6b8ab4 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SessionInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java new file mode 100644 index 0000000000..fd5d2fa1b5 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/ShutdownInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java new file mode 100644 index 0000000000..e4f799d8ae --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/SubscriptionInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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"); } } \ No newline at end of file diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java new file mode 100644 index 0000000000..75633236ba --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionIdTestSupport.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java new file mode 100644 index 0000000000..b7fd68106c --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/TransactionInfoTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java new file mode 100644 index 0000000000..02dc431614 --- /dev/null +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/v3/XATransactionIdTest.java @@ -0,0 +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.v3; import java.io.DataInputStream; import 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. * * @version $Revision: $ */ 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 diff --git a/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java b/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java index 60db4f5c6f..e3754f1ea1 100644 --- a/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java +++ b/activemq-openwire-generator/src/main/java/org/apache/activemq/openwire/tool/MultiSourceGenerator.java @@ -17,6 +17,12 @@ */ package org.apache.activemq.openwire.tool; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.FixCRLF; +import org.codehaus.jam.JClass; +import org.codehaus.jam.JProperty; +import org.codehaus.jam.JamClassIterator; + import java.io.File; import java.io.FileWriter; import java.io.PrintWriter; @@ -25,12 +31,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.taskdefs.FixCRLF; -import org.codehaus.jam.JClass; -import org.codehaus.jam.JProperty; -import org.codehaus.jam.JamClassIterator; - /** * * @version $Revision: 386442 $ @@ -159,8 +159,9 @@ public abstract class MultiSourceGenerator extends OpenWireGenerator { protected void initialiseManuallyMaintainedClasses() { String[] names = { "ActiveMQDestination", "ActiveMQTempDestination", "ActiveMQQueue", "ActiveMQTopic", "ActiveMQTempQueue", "ActiveMQTempTopic", - "BaseCommand", "ActiveMQMessage", "ActiveMQTextMessage", "ActiveMQMapMessage", "ActiveMQBytesMessage", "ActiveMQStreamMessage", - "ActiveMQStreamMessage", "DataStructureSupport", "WireFormatInfo", "ActiveMQObjectMessage" }; + "BaseCommand", + "ActiveMQMessage", "ActiveMQTextMessage", "ActiveMQMapMessage", "ActiveMQBytesMessage", "ActiveMQStreamMessage", + "ActiveMQBlobMessage", "DataStructureSupport", "WireFormatInfo", "ActiveMQObjectMessage" }; for (int i = 0; i < names.length; i++) { manuallyMaintainedClasses.add(names[i]);