mirror of https://github.com/apache/activemq.git
Resolved merge conflict
This commit is contained in:
commit
3870aa9447
|
@ -21,6 +21,8 @@ activemq-unit-tests/networkedBroker
|
|||
activemq-unit-tests/shared
|
||||
activemq-data
|
||||
activemq-leveldb-store/.cache
|
||||
activemq-leveldb-store/.cache-main
|
||||
activemq-leveldb-store/.cache-tests
|
||||
activemq-runtime-config/src/main/resources/activemq.xsd
|
||||
activemq-amqp/amqp-trace.txt
|
||||
data/
|
||||
|
|
|
@ -38,7 +38,7 @@ public class AmqpSupport {
|
|||
public static final Symbol JMS_SELECTOR_NAME = Symbol.valueOf("apache.org:selector-filter:string");
|
||||
public static final Object[] JMS_SELECTOR_FILTER_IDS = new Object[] { JMS_SELECTOR_CODE, JMS_SELECTOR_NAME };
|
||||
public static final UnsignedLong NO_LOCAL_CODE = UnsignedLong.valueOf(0x0000468C00000003L);
|
||||
public static final Symbol NO_LOCAL_NAME = Symbol.valueOf("apache.org:selector-filter:string");
|
||||
public static final Symbol NO_LOCAL_NAME = Symbol.valueOf("apache.org:no-local-filter:list");
|
||||
public static final Object[] NO_LOCAL_FILTER_IDS = new Object[] { NO_LOCAL_CODE, NO_LOCAL_NAME };
|
||||
|
||||
// Capabilities used to identify destination type in some requests.
|
||||
|
@ -54,6 +54,9 @@ public class AmqpSupport {
|
|||
public static final Symbol QUEUE_PREFIX = Symbol.valueOf("queue-prefix");
|
||||
public static final Symbol TOPIC_PREFIX = Symbol.valueOf("topic-prefix");
|
||||
public static final Symbol CONNECTION_OPEN_FAILED = Symbol.valueOf("amqp:connection-establishment-failed");
|
||||
public static final Symbol PRODUCT = Symbol.valueOf("product");
|
||||
public static final Symbol VERSION = Symbol.valueOf("version");
|
||||
public static final Symbol PLATFORM = Symbol.valueOf("platform");
|
||||
|
||||
// Symbols used in configuration of newly opened links.
|
||||
public static final Symbol COPY = Symbol.getSymbol("copy");
|
||||
|
|
|
@ -49,7 +49,7 @@ public class AmqpWireFormat implements WireFormat {
|
|||
private int connectAttemptTimeout = DEFAULT_CONNECTION_TIMEOUT;
|
||||
private int idelTimeout = DEFAULT_IDLE_TIMEOUT;
|
||||
private int producerCredit = DEFAULT_PRODUCER_CREDIT;
|
||||
private String transformer = InboundTransformer.TRANSFORMER_NATIVE;
|
||||
private String transformer = InboundTransformer.TRANSFORMER_JMS;
|
||||
|
||||
private boolean magicRead = false;
|
||||
private ResetListener resetListener;
|
||||
|
|
|
@ -20,13 +20,19 @@ import static org.apache.activemq.transport.amqp.AmqpSupport.ANONYMOUS_RELAY;
|
|||
import static org.apache.activemq.transport.amqp.AmqpSupport.CONNECTION_OPEN_FAILED;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.CONTAINER_ID;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.INVALID_FIELD;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.PLATFORM;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.PRODUCT;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.QUEUE_PREFIX;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.TEMP_QUEUE_CAPABILITY;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.TEMP_TOPIC_CAPABILITY;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.TOPIC_PREFIX;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.VERSION;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.contains;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
@ -54,11 +60,13 @@ import org.apache.activemq.command.ConsumerId;
|
|||
import org.apache.activemq.command.ConsumerInfo;
|
||||
import org.apache.activemq.command.DestinationInfo;
|
||||
import org.apache.activemq.command.ExceptionResponse;
|
||||
import org.apache.activemq.command.LocalTransactionId;
|
||||
import org.apache.activemq.command.MessageDispatch;
|
||||
import org.apache.activemq.command.RemoveInfo;
|
||||
import org.apache.activemq.command.Response;
|
||||
import org.apache.activemq.command.SessionId;
|
||||
import org.apache.activemq.command.ShutdownInfo;
|
||||
import org.apache.activemq.command.TransactionId;
|
||||
import org.apache.activemq.transport.InactivityIOException;
|
||||
import org.apache.activemq.transport.amqp.AmqpHeader;
|
||||
import org.apache.activemq.transport.amqp.AmqpInactivityMonitor;
|
||||
|
@ -102,6 +110,25 @@ public class AmqpConnection implements AmqpProtocolConverter {
|
|||
private static final Logger TRACE_FRAMES = AmqpTransportFilter.TRACE_FRAMES;
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmqpConnection.class);
|
||||
private static final int CHANNEL_MAX = 32767;
|
||||
private static final String BROKER_VERSION;
|
||||
private static final String BROKER_PLATFORM;
|
||||
|
||||
static {
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
|
||||
BROKER_PLATFORM = "Java/" + (javaVersion == null ? "unknown" : javaVersion);
|
||||
|
||||
InputStream in = null;
|
||||
String version = "5.12.0";
|
||||
if ((in = AmqpConnection.class.getResourceAsStream("/org/apache/activemq/version.txt")) != null) {
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
||||
try {
|
||||
version = reader.readLine();
|
||||
} catch(Exception e) {
|
||||
}
|
||||
}
|
||||
BROKER_VERSION = version;
|
||||
}
|
||||
|
||||
private final Transport protonTransport = Proton.transport();
|
||||
private final Connection protonConnection = Proton.connection();
|
||||
|
@ -117,10 +144,12 @@ public class AmqpConnection implements AmqpProtocolConverter {
|
|||
private final ConnectionInfo connectionInfo = new ConnectionInfo();
|
||||
private long nextSessionId;
|
||||
private long nextTempDestinationId;
|
||||
private long nextTransactionId;
|
||||
private boolean closing;
|
||||
private boolean closedSocket;
|
||||
private AmqpAuthenticator authenticator;
|
||||
|
||||
private final Map<TransactionId, AmqpTransactionCoordinator> transactions = new HashMap<TransactionId, AmqpTransactionCoordinator>();
|
||||
private final ConcurrentMap<Integer, ResponseHandler> resposeHandlers = new ConcurrentHashMap<Integer, ResponseHandler>();
|
||||
private final ConcurrentMap<ConsumerId, AmqpSender> subscriptionsByConsumerId = new ConcurrentHashMap<ConsumerId, AmqpSender>();
|
||||
|
||||
|
@ -170,6 +199,9 @@ public class AmqpConnection implements AmqpProtocolConverter {
|
|||
|
||||
properties.put(QUEUE_PREFIX, "queue://");
|
||||
properties.put(TOPIC_PREFIX, "topic://");
|
||||
properties.put(PRODUCT, "ActiveMQ");
|
||||
properties.put(VERSION, BROKER_VERSION);
|
||||
properties.put(PLATFORM, BROKER_PLATFORM);
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
@ -639,6 +671,22 @@ public class AmqpConnection implements AmqpProtocolConverter {
|
|||
subscriptionsByConsumerId.remove(consumerId);
|
||||
}
|
||||
|
||||
void registerTransaction(TransactionId txId, AmqpTransactionCoordinator coordinator) {
|
||||
transactions.put(txId, coordinator);
|
||||
}
|
||||
|
||||
void unregisterTransaction(TransactionId txId) {
|
||||
transactions.remove(txId);
|
||||
}
|
||||
|
||||
AmqpTransactionCoordinator getTxCoordinator(TransactionId txId) {
|
||||
return transactions.get(txId);
|
||||
}
|
||||
|
||||
LocalTransactionId getNextTransactionId() {
|
||||
return new LocalTransactionId(getConnectionId(), ++nextTransactionId);
|
||||
}
|
||||
|
||||
ConsumerInfo lookupSubscription(String subscriptionName) throws AmqpProtocolException {
|
||||
ConsumerInfo result = null;
|
||||
RegionBroker regionBroker;
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.apache.activemq.command.ProducerId;
|
|||
import org.apache.activemq.command.ProducerInfo;
|
||||
import org.apache.activemq.command.RemoveInfo;
|
||||
import org.apache.activemq.command.Response;
|
||||
import org.apache.activemq.command.TransactionId;
|
||||
import org.apache.activemq.transport.amqp.AmqpProtocolConverter;
|
||||
import org.apache.activemq.transport.amqp.ResponseHandler;
|
||||
import org.apache.activemq.transport.amqp.message.AMQPNativeInboundTransformer;
|
||||
|
@ -205,9 +206,10 @@ public class AmqpReceiver extends AmqpAbstractReceiver {
|
|||
|
||||
final DeliveryState remoteState = delivery.getRemoteState();
|
||||
if (remoteState != null && remoteState instanceof TransactionalState) {
|
||||
TransactionalState s = (TransactionalState) remoteState;
|
||||
long txid = toLong(s.getTxnId());
|
||||
message.setTransactionId(new LocalTransactionId(session.getConnection().getConnectionId(), txid));
|
||||
TransactionalState txState = (TransactionalState) remoteState;
|
||||
TransactionId txId = new LocalTransactionId(session.getConnection().getConnectionId(), toLong(txState.getTxnId()));
|
||||
session.enlist(txId);
|
||||
message.setTransactionId(txId);
|
||||
}
|
||||
|
||||
message.onSend();
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.apache.activemq.command.MessagePull;
|
|||
import org.apache.activemq.command.RemoveInfo;
|
||||
import org.apache.activemq.command.RemoveSubscriptionInfo;
|
||||
import org.apache.activemq.command.Response;
|
||||
import org.apache.activemq.command.TransactionId;
|
||||
import org.apache.activemq.transport.amqp.AmqpProtocolConverter;
|
||||
import org.apache.activemq.transport.amqp.ResponseHandler;
|
||||
import org.apache.activemq.transport.amqp.message.ActiveMQJMSVendor;
|
||||
|
@ -447,14 +448,13 @@ public class AmqpSender extends AmqpAbstractLink<Sender> {
|
|||
|
||||
DeliveryState remoteState = delivery.getRemoteState();
|
||||
if (remoteState != null && remoteState instanceof TransactionalState) {
|
||||
TransactionalState s = (TransactionalState) remoteState;
|
||||
long txid = toLong(s.getTxnId());
|
||||
LocalTransactionId localTxId = new LocalTransactionId(session.getConnection().getConnectionId(), txid);
|
||||
ack.setTransactionId(localTxId);
|
||||
TransactionalState txState = (TransactionalState) remoteState;
|
||||
TransactionId txId = new LocalTransactionId(session.getConnection().getConnectionId(), toLong(txState.getTxnId()));
|
||||
ack.setTransactionId(txId);
|
||||
|
||||
// Store the message sent in this TX we might need to
|
||||
// re-send on rollback
|
||||
md.getMessage().setTransactionId(localTxId);
|
||||
// Store the message sent in this TX we might need to re-send on rollback
|
||||
session.enlist(txId);
|
||||
md.getMessage().setTransactionId(txId);
|
||||
dispatchedInTx.addFirst(md);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ import org.apache.activemq.command.RemoveInfo;
|
|||
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.selector.SelectorParser;
|
||||
import org.apache.activemq.transport.amqp.AmqpProtocolConverter;
|
||||
import org.apache.activemq.transport.amqp.AmqpProtocolException;
|
||||
|
@ -72,6 +73,7 @@ public class AmqpSession implements AmqpResource {
|
|||
private final Session protonSession;
|
||||
private final SessionId sessionId;
|
||||
|
||||
private boolean enlisted;
|
||||
private long nextProducerId = 0;
|
||||
private long nextConsumerId = 0;
|
||||
|
||||
|
@ -122,6 +124,8 @@ public class AmqpSession implements AmqpResource {
|
|||
for (AmqpSender consumer : consumers.values()) {
|
||||
consumer.commit();
|
||||
}
|
||||
|
||||
enlisted = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,6 +137,8 @@ public class AmqpSession implements AmqpResource {
|
|||
for (AmqpSender consumer : consumers.values()) {
|
||||
consumer.rollback();
|
||||
}
|
||||
|
||||
enlisted = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -367,6 +373,13 @@ public class AmqpSession implements AmqpResource {
|
|||
connection.unregisterSender(consumerId);
|
||||
}
|
||||
|
||||
public void enlist(TransactionId txId) {
|
||||
if (!enlisted) {
|
||||
connection.getTxCoordinator(txId).enlist(this);
|
||||
enlisted = true;
|
||||
}
|
||||
}
|
||||
|
||||
//----- Configuration accessors ------------------------------------------//
|
||||
|
||||
public AmqpConnection getConnection() {
|
||||
|
|
|
@ -20,6 +20,8 @@ import static org.apache.activemq.transport.amqp.AmqpSupport.toBytes;
|
|||
import static org.apache.activemq.transport.amqp.AmqpSupport.toLong;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.activemq.command.ActiveMQDestination;
|
||||
import org.apache.activemq.command.ConnectionId;
|
||||
|
@ -54,7 +56,7 @@ public class AmqpTransactionCoordinator extends AmqpAbstractReceiver {
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AmqpTransactionCoordinator.class);
|
||||
|
||||
private long nextTransactionId;
|
||||
private final Set<AmqpSession> txSessions = new HashSet<AmqpSession>();
|
||||
|
||||
/**
|
||||
* Creates a new Transaction coordinator used to manage AMQP transactions.
|
||||
|
@ -82,7 +84,7 @@ public class AmqpTransactionCoordinator extends AmqpAbstractReceiver {
|
|||
}
|
||||
|
||||
final AmqpSession session = (AmqpSession) getEndpoint().getSession().getContext();
|
||||
ConnectionId connectionId = session.getConnection().getConnectionId();
|
||||
final ConnectionId connectionId = session.getConnection().getConnectionId();
|
||||
final Object action = ((AmqpValue) message.getBody()).getValue();
|
||||
|
||||
LOG.debug("COORDINATOR received: {}, [{}]", action, deliveryBytes);
|
||||
|
@ -92,35 +94,41 @@ public class AmqpTransactionCoordinator extends AmqpAbstractReceiver {
|
|||
throw new Exception("don't know how to handle a declare /w a set GlobalId");
|
||||
}
|
||||
|
||||
long txid = getNextTransactionId();
|
||||
TransactionInfo txinfo = new TransactionInfo(connectionId, new LocalTransactionId(connectionId, txid), TransactionInfo.BEGIN);
|
||||
sendToActiveMQ(txinfo, null);
|
||||
LOG.trace("started transaction {}", txid);
|
||||
LocalTransactionId txId = session.getConnection().getNextTransactionId();
|
||||
TransactionInfo txInfo = new TransactionInfo(connectionId, txId, TransactionInfo.BEGIN);
|
||||
session.getConnection().registerTransaction(txId, this);
|
||||
sendToActiveMQ(txInfo, null);
|
||||
LOG.trace("started transaction {}", txId.getValue());
|
||||
|
||||
Declared declared = new Declared();
|
||||
declared.setTxnId(new Binary(toBytes(txid)));
|
||||
declared.setTxnId(new Binary(toBytes(txId.getValue())));
|
||||
delivery.disposition(declared);
|
||||
delivery.settle();
|
||||
} else if (action instanceof Discharge) {
|
||||
Discharge discharge = (Discharge) action;
|
||||
long txid = toLong(discharge.getTxnId());
|
||||
|
||||
final Discharge discharge = (Discharge) action;
|
||||
final LocalTransactionId txId = new LocalTransactionId(connectionId, toLong(discharge.getTxnId()));
|
||||
final byte operation;
|
||||
|
||||
if (discharge.getFail()) {
|
||||
LOG.trace("rollback transaction {}", txid);
|
||||
LOG.trace("rollback transaction {}", txId.getValue());
|
||||
operation = TransactionInfo.ROLLBACK;
|
||||
} else {
|
||||
LOG.trace("commit transaction {}", txid);
|
||||
LOG.trace("commit transaction {}", txId.getValue());
|
||||
operation = TransactionInfo.COMMIT_ONE_PHASE;
|
||||
}
|
||||
|
||||
if (operation == TransactionInfo.ROLLBACK) {
|
||||
session.rollback();
|
||||
} else {
|
||||
session.commit();
|
||||
for (AmqpSession txSession : txSessions) {
|
||||
if (operation == TransactionInfo.ROLLBACK) {
|
||||
txSession.rollback();
|
||||
} else {
|
||||
txSession.commit();
|
||||
}
|
||||
}
|
||||
|
||||
TransactionInfo txinfo = new TransactionInfo(connectionId, new LocalTransactionId(connectionId, txid), operation);
|
||||
txSessions.clear();
|
||||
session.getConnection().unregisterTransaction(txId);
|
||||
|
||||
TransactionInfo txinfo = new TransactionInfo(connectionId, txId, operation);
|
||||
sendToActiveMQ(txinfo, new ResponseHandler() {
|
||||
@Override
|
||||
public void onResponse(AmqpProtocolConverter converter, Response response) throws IOException {
|
||||
|
@ -132,6 +140,7 @@ public class AmqpTransactionCoordinator extends AmqpAbstractReceiver {
|
|||
} else {
|
||||
delivery.disposition(Accepted.getInstance());
|
||||
}
|
||||
|
||||
LOG.debug("TX: {} settling {}", operation, action);
|
||||
delivery.settle();
|
||||
session.pumpProtonToSocket();
|
||||
|
@ -157,10 +166,6 @@ public class AmqpTransactionCoordinator extends AmqpAbstractReceiver {
|
|||
}
|
||||
}
|
||||
|
||||
private long getNextTransactionId() {
|
||||
return ++nextTransactionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActiveMQDestination getDestination() {
|
||||
return null;
|
||||
|
@ -169,4 +174,8 @@ public class AmqpTransactionCoordinator extends AmqpAbstractReceiver {
|
|||
@Override
|
||||
public void setDestination(ActiveMQDestination destination) {
|
||||
}
|
||||
|
||||
public void enlist(AmqpSession session) {
|
||||
txSessions.add(session);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.junit.Test;
|
|||
|
||||
public class AMQ4563Test extends AmqpTestSupport {
|
||||
|
||||
public static final String KAHADB_DIRECTORY = "target/activemq-data/kahadb-amq4563";
|
||||
public static final String KAHADB_DIRECTORY = "./target/activemq-data/kahadb-amq4563";
|
||||
|
||||
@Test(timeout = 60000)
|
||||
public void testMessagesAreAckedAMQProducer() throws Exception {
|
||||
|
@ -224,7 +224,7 @@ public class AMQ4563Test extends AmqpTestSupport {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected int getstoreOpenWireVersion() {
|
||||
protected int getStoreOpenWireVersion() {
|
||||
return 10;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public class AmqpTestSupport {
|
|||
KahaDBStore kaha = new KahaDBStore();
|
||||
kaha.setDirectory(new File(KAHADB_DIRECTORY + getTestName()));
|
||||
brokerService.setPersistenceAdapter(kaha);
|
||||
brokerService.setStoreOpenWireVersion(getstoreOpenWireVersion());
|
||||
brokerService.setStoreOpenWireVersion(getStoreOpenWireVersion());
|
||||
}
|
||||
brokerService.setSchedulerSupport(false);
|
||||
brokerService.setAdvisorySupport(false);
|
||||
|
@ -188,8 +188,8 @@ public class AmqpTestSupport {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected int getstoreOpenWireVersion() {
|
||||
return OpenWireFormat.DEFAULT_VERSION;
|
||||
protected int getStoreOpenWireVersion() {
|
||||
return OpenWireFormat.DEFAULT_WIRE_VERSION;
|
||||
}
|
||||
|
||||
protected boolean isUseOpenWireConnector() {
|
||||
|
|
|
@ -28,6 +28,8 @@ public class IDERunner {
|
|||
|
||||
private static final String AMQP_TRANSFORMER = "jms";
|
||||
private static final boolean TRANSPORT_TRACE = true;
|
||||
private static final boolean PERSISTENT = true;
|
||||
private static final boolean CLIENT_CONNECT = false;
|
||||
|
||||
public static void main(String[]args) throws Exception {
|
||||
BrokerService brokerService = new BrokerService();
|
||||
|
@ -40,15 +42,23 @@ public class IDERunner {
|
|||
KahaDBStore store = new KahaDBStore();
|
||||
store.setDirectory(new File("target/activemq-data/kahadb"));
|
||||
|
||||
brokerService.setStoreOpenWireVersion(10);
|
||||
brokerService.setPersistenceAdapter(store);
|
||||
if (PERSISTENT) {
|
||||
brokerService.setStoreOpenWireVersion(10);
|
||||
brokerService.setPersistenceAdapter(store);
|
||||
brokerService.deleteAllMessages();
|
||||
} else {
|
||||
brokerService.setPersistent(false);
|
||||
}
|
||||
|
||||
brokerService.setUseJmx(false);
|
||||
brokerService.deleteAllMessages();
|
||||
brokerService.setAdvisorySupport(false);
|
||||
|
||||
brokerService.start();
|
||||
|
||||
Connection connection = JMSClientContext.INSTANCE.createConnection(connector.getPublishableConnectURI());
|
||||
connection.start();
|
||||
if (CLIENT_CONNECT) {
|
||||
Connection connection = JMSClientContext.INSTANCE.createConnection(connector.getPublishableConnectURI());
|
||||
connection.start();
|
||||
}
|
||||
|
||||
brokerService.waitUntilStopped();
|
||||
}
|
||||
|
|
|
@ -43,6 +43,38 @@ public class JMSClientTransactionTest extends JMSClientTestSupport {
|
|||
|
||||
private final int MSG_COUNT = 1000;
|
||||
|
||||
@Test(timeout = 60000)
|
||||
public void testProduceOneConsumeOneInTx() throws Exception {
|
||||
connection = createConnection();
|
||||
connection.start();
|
||||
|
||||
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
|
||||
Destination queue = session.createQueue(getTestName());
|
||||
MessageProducer messageProducer = session.createProducer(queue);
|
||||
|
||||
messageProducer.send(session.createMessage());
|
||||
session.rollback();
|
||||
|
||||
QueueViewMBean queueView = getProxyToQueue(getTestName());
|
||||
assertEquals(0, queueView.getQueueSize());
|
||||
|
||||
messageProducer.send(session.createMessage());
|
||||
session.commit();
|
||||
|
||||
assertEquals(1, queueView.getQueueSize());
|
||||
|
||||
MessageConsumer messageConsumer = session.createConsumer(queue);
|
||||
assertNotNull(messageConsumer.receive(5000));
|
||||
session.rollback();
|
||||
|
||||
assertEquals(1, queueView.getQueueSize());
|
||||
|
||||
assertNotNull(messageConsumer.receive(5000));
|
||||
session.commit();
|
||||
|
||||
assertEquals(0, queueView.getQueueSize());
|
||||
}
|
||||
|
||||
@Test(timeout = 60000)
|
||||
public void testSingleConsumedMessagePerTxCase() throws Exception {
|
||||
connection = createConnection();
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
package org.apache.activemq.transport.amqp.interop;
|
||||
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.CONNECTION_OPEN_FAILED;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.PLATFORM;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.PRODUCT;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.VERSION;
|
||||
import static org.apache.activemq.transport.amqp.AmqpSupport.contains;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
@ -81,6 +84,20 @@ public class AmqpConnectionsTest extends AmqpClientTestSupport {
|
|||
if (!properties.containsKey(TOPIC_PREFIX)) {
|
||||
markAsInvalid("Broker did not send a queue prefix value");
|
||||
}
|
||||
|
||||
if (!properties.containsKey(PRODUCT)) {
|
||||
markAsInvalid("Broker did not send a queue product name value");
|
||||
}
|
||||
|
||||
if (!properties.containsKey(VERSION)) {
|
||||
markAsInvalid("Broker did not send a queue version value");
|
||||
}
|
||||
|
||||
if (!properties.containsKey(PLATFORM)) {
|
||||
markAsInvalid("Broker did not send a queue platform name value");
|
||||
} else {
|
||||
LOG.info("Broker platform = {}", properties.get(PLATFORM));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.apache.activemq.transport.amqp.interop;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -86,23 +87,29 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
|
|||
AmqpConnection connection = client.connect();
|
||||
AmqpSession session = connection.createSession();
|
||||
|
||||
AmqpMessage message = new AmqpMessage();
|
||||
AmqpMessage message1 = new AmqpMessage();
|
||||
message1.setGroupId("abcdefg");
|
||||
message1.setApplicationProperty("sn", 100);
|
||||
|
||||
message.setGroupId("abcdefg");
|
||||
message.setApplicationProperty("sn", 100);
|
||||
AmqpMessage message2 = new AmqpMessage();
|
||||
message2.setGroupId("hijklm");
|
||||
message2.setApplicationProperty("sn", 200);
|
||||
|
||||
AmqpSender sender = session.createSender("queue://" + getTestName());
|
||||
sender.send(message);
|
||||
sender.send(message1);
|
||||
sender.send(message2);
|
||||
sender.close();
|
||||
|
||||
AmqpReceiver receiver = session.createReceiver("queue://" + getTestName(), "sn = 100");
|
||||
receiver.flow(1);
|
||||
receiver.flow(2);
|
||||
AmqpMessage received = receiver.receive(5, TimeUnit.SECONDS);
|
||||
assertNotNull(received);
|
||||
assertEquals(100, received.getApplicationProperty("sn"));
|
||||
assertEquals("abcdefg", received.getGroupId());
|
||||
received.accept();
|
||||
|
||||
assertNull(receiver.receive(1, TimeUnit.SECONDS));
|
||||
|
||||
receiver.close();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ import org.apache.activemq.broker.BrokerFilter;
|
|||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
import org.apache.activemq.broker.ProducerBrokerExchange;
|
||||
import org.apache.activemq.broker.TransportConnector;
|
||||
import org.apache.activemq.broker.region.BaseDestination;
|
||||
import org.apache.activemq.broker.region.Destination;
|
||||
import org.apache.activemq.broker.region.DurableTopicSubscription;
|
||||
import org.apache.activemq.broker.region.MessageReference;
|
||||
|
@ -350,7 +352,9 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
if (!messageReference.isAdvisory()) {
|
||||
ActiveMQTopic topic = AdvisorySupport.getExpiredMessageTopic(messageReference.getMessage().getDestination());
|
||||
Message payload = messageReference.getMessage().copy();
|
||||
payload.clearBody();
|
||||
if (!isIncludeBodyForAdvisory(messageReference.getMessage().getDestination())) {
|
||||
payload.clearBody();
|
||||
}
|
||||
ActiveMQMessage advisoryMessage = new ActiveMQMessage();
|
||||
advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_MESSAGE_ID, payload.getMessageId().toString());
|
||||
fireAdvisory(context, topic, payload, null, advisoryMessage);
|
||||
|
@ -367,7 +371,9 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
if (!messageReference.isAdvisory()) {
|
||||
ActiveMQTopic topic = AdvisorySupport.getMessageConsumedAdvisoryTopic(messageReference.getMessage().getDestination());
|
||||
Message payload = messageReference.getMessage().copy();
|
||||
payload.clearBody();
|
||||
if (!isIncludeBodyForAdvisory(messageReference.getMessage().getDestination())) {
|
||||
payload.clearBody();
|
||||
}
|
||||
ActiveMQMessage advisoryMessage = new ActiveMQMessage();
|
||||
advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_MESSAGE_ID, payload.getMessageId().toString());
|
||||
ActiveMQDestination destination = payload.getDestination();
|
||||
|
@ -388,7 +394,9 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
if (!messageReference.isAdvisory()) {
|
||||
ActiveMQTopic topic = AdvisorySupport.getMessageDeliveredAdvisoryTopic(messageReference.getMessage().getDestination());
|
||||
Message payload = messageReference.getMessage().copy();
|
||||
payload.clearBody();
|
||||
if (!isIncludeBodyForAdvisory(messageReference.getMessage().getDestination())) {
|
||||
payload.clearBody();
|
||||
}
|
||||
ActiveMQMessage advisoryMessage = new ActiveMQMessage();
|
||||
advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_MESSAGE_ID, payload.getMessageId().toString());
|
||||
ActiveMQDestination destination = payload.getDestination();
|
||||
|
@ -409,7 +417,9 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
if (!messageReference.isAdvisory()) {
|
||||
ActiveMQTopic topic = AdvisorySupport.getMessageDiscardedAdvisoryTopic(messageReference.getMessage().getDestination());
|
||||
Message payload = messageReference.getMessage().copy();
|
||||
payload.clearBody();
|
||||
if (!isIncludeBodyForAdvisory(messageReference.getMessage().getDestination())) {
|
||||
payload.clearBody();
|
||||
}
|
||||
ActiveMQMessage advisoryMessage = new ActiveMQMessage();
|
||||
if (sub instanceof TopicSubscription) {
|
||||
advisoryMessage.setIntProperty(AdvisorySupport.MSG_PROPERTY_DISCARDED_COUNT, ((TopicSubscription) sub).discarded());
|
||||
|
@ -498,7 +508,9 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
if (!messageReference.isAdvisory()) {
|
||||
ActiveMQTopic topic = AdvisorySupport.getMessageDLQdAdvisoryTopic(messageReference.getMessage().getDestination());
|
||||
Message payload = messageReference.getMessage().copy();
|
||||
payload.clearBody();
|
||||
if (!isIncludeBodyForAdvisory(messageReference.getMessage().getDestination())) {
|
||||
payload.clearBody();
|
||||
}
|
||||
fireAdvisory(context, topic, payload);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -551,6 +563,12 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
}
|
||||
}
|
||||
|
||||
protected boolean isIncludeBodyForAdvisory(ActiveMQDestination activemqDestination) {
|
||||
Destination destination = next.getDestinationMap(activemqDestination).get(activemqDestination);
|
||||
return (destination instanceof BaseDestination &&
|
||||
((BaseDestination) destination).isIncludeBodyForAdvisory()) ? true : false;
|
||||
}
|
||||
|
||||
private void handleFireFailure(String message, Throwable cause) {
|
||||
LOG.warn("Failed to fire {} advisory, reason: {}", message, cause);
|
||||
LOG.debug("{} detail: {}", message, cause);
|
||||
|
@ -610,7 +628,12 @@ public class AdvisoryBroker extends BrokerFilter {
|
|||
advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_ORIGIN_BROKER_ID, id);
|
||||
|
||||
String url = getBrokerService().getVmConnectorURI().toString();
|
||||
if (getBrokerService().getDefaultSocketURIString() != null) {
|
||||
//try and find the URL on the transport connector and use if it exists else
|
||||
//try and find a default URL
|
||||
if (context.getConnector() instanceof TransportConnector
|
||||
&& ((TransportConnector) context.getConnector()).getPublishableConnectString() != null) {
|
||||
url = ((TransportConnector) context.getConnector()).getPublishableConnectString();
|
||||
} else if (getBrokerService().getDefaultSocketURIString() != null) {
|
||||
url = getBrokerService().getDefaultSocketURIString();
|
||||
}
|
||||
advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_ORIGIN_BROKER_URL, url);
|
||||
|
|
|
@ -229,6 +229,7 @@ public class BrokerService implements Service {
|
|||
private ThreadPoolExecutor executor;
|
||||
private int schedulePeriodForDestinationPurge= 0;
|
||||
private int maxPurgedDestinationsPerSweep = 0;
|
||||
private int schedulePeriodForDiskUsageCheck = 0;
|
||||
private BrokerContext brokerContext;
|
||||
private boolean networkConnectorStartAsync = false;
|
||||
private boolean allowTempAutoCreationOnSend;
|
||||
|
@ -404,11 +405,7 @@ public class BrokerService implements Service {
|
|||
*/
|
||||
public NetworkConnector addNetworkConnector(NetworkConnector connector) throws Exception {
|
||||
connector.setBrokerService(this);
|
||||
URI uri = getVmConnectorURI();
|
||||
Map<String, String> map = new HashMap<String, String>(URISupport.parseParameters(uri));
|
||||
map.put("network", "true");
|
||||
uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
|
||||
connector.setLocalUri(uri);
|
||||
connector.setLocalUri(getVmConnectorURI());
|
||||
// Set a connection filter so that the connector does not establish loop
|
||||
// back connections.
|
||||
connector.setConnectionFilter(new ConnectionFilter() {
|
||||
|
@ -1957,17 +1954,12 @@ public class BrokerService implements Service {
|
|||
}
|
||||
}
|
||||
|
||||
protected void checkSystemUsageLimits() throws IOException {
|
||||
SystemUsage usage = getSystemUsage();
|
||||
long memLimit = usage.getMemoryUsage().getLimit();
|
||||
long jvmLimit = Runtime.getRuntime().maxMemory();
|
||||
|
||||
if (memLimit > jvmLimit) {
|
||||
usage.getMemoryUsage().setPercentOfJvmHeap(70);
|
||||
LOG.warn("Memory Usage for the Broker (" + memLimit / (1024 * 1024) +
|
||||
" mb) is more than the maximum available for the JVM: " +
|
||||
jvmLimit / (1024 * 1024) + " mb - resetting to 70% of maximum available: " + (usage.getMemoryUsage().getLimit() / (1024 * 1024)) + " mb");
|
||||
}
|
||||
/**
|
||||
* Check that the store usage limit is not greater than max usable
|
||||
* space and adjust if it is
|
||||
*/
|
||||
protected void checkStoreUsageLimits() throws IOException {
|
||||
final SystemUsage usage = getSystemUsage();
|
||||
|
||||
if (getPersistenceAdapter() != null) {
|
||||
PersistenceAdapter adapter = getPersistenceAdapter();
|
||||
|
@ -2011,6 +2003,14 @@ public class BrokerService implements Service {
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that temporary usage limit is not greater than max usable
|
||||
* space and adjust if it is
|
||||
*/
|
||||
protected void checkTmpStoreUsageLimits() throws IOException {
|
||||
final SystemUsage usage = getSystemUsage();
|
||||
|
||||
File tmpDir = getTmpDataDirectory();
|
||||
if (tmpDir != null) {
|
||||
|
@ -2051,6 +2051,54 @@ public class BrokerService implements Service {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Schedules a periodic task based on schedulePeriodForDiskLimitCheck to
|
||||
* update store and temporary store limits if the amount of available space
|
||||
* plus current store size is less than the existin configured limit
|
||||
*/
|
||||
protected void scheduleDiskUsageLimitsCheck() throws IOException {
|
||||
if (schedulePeriodForDiskUsageCheck > 0 &&
|
||||
(getPersistenceAdapter() != null || getTmpDataDirectory() != null)) {
|
||||
Runnable diskLimitCheckTask = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
checkStoreUsageLimits();
|
||||
} catch (IOException e) {
|
||||
LOG.error("Failed to check persistent disk usage limits", e);
|
||||
}
|
||||
|
||||
try {
|
||||
checkTmpStoreUsageLimits();
|
||||
} catch (IOException e) {
|
||||
LOG.error("Failed to check temporary store usage limits", e);
|
||||
}
|
||||
}
|
||||
};
|
||||
scheduler.executePeriodically(diskLimitCheckTask, schedulePeriodForDiskUsageCheck);
|
||||
}
|
||||
}
|
||||
|
||||
protected void checkSystemUsageLimits() throws IOException {
|
||||
final SystemUsage usage = getSystemUsage();
|
||||
long memLimit = usage.getMemoryUsage().getLimit();
|
||||
long jvmLimit = Runtime.getRuntime().maxMemory();
|
||||
|
||||
if (memLimit > jvmLimit) {
|
||||
usage.getMemoryUsage().setPercentOfJvmHeap(70);
|
||||
LOG.warn("Memory Usage for the Broker (" + memLimit / (1024 * 1024) +
|
||||
" mb) is more than the maximum available for the JVM: " +
|
||||
jvmLimit / (1024 * 1024) + " mb - resetting to 70% of maximum available: " + (usage.getMemoryUsage().getLimit() / (1024 * 1024)) + " mb");
|
||||
}
|
||||
|
||||
//Check the persistent store and temp store limits if they exist
|
||||
//and schedule a periodic check to update disk limits if
|
||||
//schedulePeriodForDiskLimitCheck is set
|
||||
checkStoreUsageLimits();
|
||||
checkTmpStoreUsageLimits();
|
||||
scheduleDiskUsageLimitsCheck();
|
||||
|
||||
if (getJobSchedulerStore() != null) {
|
||||
JobSchedulerStore scheduler = getJobSchedulerStore();
|
||||
|
@ -2499,7 +2547,6 @@ public class BrokerService implements Service {
|
|||
this.slave = false;
|
||||
URI uri = getVmConnectorURI();
|
||||
Map<String, String> map = new HashMap<String, String>(URISupport.parseParameters(uri));
|
||||
map.put("network", "true");
|
||||
map.put("async", "false");
|
||||
uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
|
||||
|
||||
|
@ -2842,6 +2889,11 @@ public class BrokerService implements Service {
|
|||
this.schedulePeriodForDestinationPurge = schedulePeriodForDestinationPurge;
|
||||
}
|
||||
|
||||
public void setSchedulePeriodForDiskUsageCheck(
|
||||
int schedulePeriodForDiskUsageCheck) {
|
||||
this.schedulePeriodForDiskUsageCheck = schedulePeriodForDiskUsageCheck;
|
||||
}
|
||||
|
||||
public int getMaxPurgedDestinationsPerSweep() {
|
||||
return this.maxPurgedDestinationsPerSweep;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import java.net.UnknownHostException;
|
|||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.apache.activemq.transport.vm.VMTransport;
|
||||
import org.apache.activemq.util.InetAddressUtil;
|
||||
|
||||
/**
|
||||
|
@ -69,6 +70,10 @@ public class PublishedAddressPolicy {
|
|||
}
|
||||
|
||||
String scheme = connectorURI.getScheme();
|
||||
if ("vm".equals(scheme)) {
|
||||
return connectorURI;
|
||||
}
|
||||
|
||||
String userInfo = getPublishedUserInfoValue(connectorURI.getUserInfo());
|
||||
String host = getPublishedHostValue(connectorURI.getHost());
|
||||
int port = connectorURI.getPort();
|
||||
|
@ -193,14 +198,14 @@ public class PublishedAddressPolicy {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param publishedHostStrategy the publishedHostStrategy to set
|
||||
* @param strategy the publishedHostStrategy to set
|
||||
*/
|
||||
public void setPublishedHostStrategy(PublishedHostStrategy strategy) {
|
||||
this.publishedHostStrategy = strategy;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param publishedHostStrategy the publishedHostStrategy to set
|
||||
* @param strategy the publishedHostStrategy to set
|
||||
*/
|
||||
public void setPublishedHostStrategy(String strategy) {
|
||||
this.publishedHostStrategy = PublishedHostStrategy.getValue(strategy);
|
||||
|
|
|
@ -95,7 +95,7 @@ public class ManagementContext implements Service {
|
|||
private boolean allowRemoteAddressInMBeanNames = true;
|
||||
private String brokerName;
|
||||
private String suppressMBean;
|
||||
private List<Map.Entry<String,String>> suppressMBeanList;
|
||||
private List<ObjectName> suppressMBeanList;
|
||||
|
||||
public ManagementContext() {
|
||||
this(null);
|
||||
|
@ -106,7 +106,7 @@ public class ManagementContext implements Service {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void start() throws IOException {
|
||||
public void start() throws Exception {
|
||||
// lets force the MBeanServer to be created if needed
|
||||
if (started.compareAndSet(false, true)) {
|
||||
|
||||
|
@ -168,27 +168,11 @@ public class ManagementContext implements Service {
|
|||
}
|
||||
}
|
||||
|
||||
private void populateMBeanSuppressionMap() {
|
||||
private void populateMBeanSuppressionMap() throws Exception {
|
||||
if (suppressMBean != null) {
|
||||
suppressMBeanList = new LinkedList<>();
|
||||
for (String pair : suppressMBean.split(",")) {
|
||||
final String[] keyValue = pair.split("=");
|
||||
suppressMBeanList.add(new Map.Entry<String, String>() {
|
||||
@Override
|
||||
public String getKey() {
|
||||
return keyValue[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue() {
|
||||
return keyValue[1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String setValue(String value) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
suppressMBeanList.add(new ObjectName(jmxDomainName + ":*," + pair));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -293,7 +277,7 @@ public class ManagementContext implements Service {
|
|||
*
|
||||
* @return the MBeanServer
|
||||
*/
|
||||
protected MBeanServer getMBeanServer() {
|
||||
public MBeanServer getMBeanServer() {
|
||||
if (this.beanServer == null) {
|
||||
this.beanServer = findMBeanServer();
|
||||
}
|
||||
|
@ -430,8 +414,8 @@ public class ManagementContext implements Service {
|
|||
private boolean isAllowedToRegister(ObjectName name) {
|
||||
boolean result = true;
|
||||
if (suppressMBean != null && suppressMBeanList != null) {
|
||||
for (Map.Entry<String,String> attr : suppressMBeanList) {
|
||||
if (attr.getValue().equals(name.getKeyProperty(attr.getKey()))) {
|
||||
for (ObjectName attr : suppressMBeanList) {
|
||||
if (attr.apply(name)) {
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,10 @@ import java.util.Set;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import javax.jms.IllegalStateException;
|
||||
import javax.jms.JMSException;
|
||||
|
||||
import org.apache.activemq.advisory.AdvisorySupport;
|
||||
import org.apache.activemq.broker.ConnectionContext;
|
||||
import org.apache.activemq.broker.ConsumerBrokerExchange;
|
||||
import org.apache.activemq.DestinationDoesNotExistException;
|
||||
|
@ -64,6 +67,7 @@ public abstract class AbstractRegion implements Region {
|
|||
protected final SystemUsage usageManager;
|
||||
protected final DestinationFactory destinationFactory;
|
||||
protected final DestinationStatistics destinationStatistics;
|
||||
protected final RegionStatistics regionStatistics = new RegionStatistics();
|
||||
protected final RegionBroker broker;
|
||||
protected boolean autoCreateDestinations = true;
|
||||
protected final TaskRunnerFactory taskRunnerFactory;
|
||||
|
@ -120,7 +124,16 @@ public abstract class AbstractRegion implements Region {
|
|||
} finally {
|
||||
destinationsLock.readLock().unlock();
|
||||
}
|
||||
destinations.clear();
|
||||
|
||||
destinationsLock.writeLock().lock();
|
||||
try {
|
||||
destinations.clear();
|
||||
regionStatistics.getAdvisoryDestinations().reset();
|
||||
regionStatistics.getDestinations().reset();
|
||||
regionStatistics.getAllDestinations().reset();
|
||||
} finally {
|
||||
destinationsLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public Destination addDestination(ConnectionContext context, ActiveMQDestination destination,
|
||||
|
@ -131,6 +144,10 @@ public abstract class AbstractRegion implements Region {
|
|||
Destination dest = destinations.get(destination);
|
||||
if (dest == null) {
|
||||
if (destination.isTemporary() == false || createIfTemporary) {
|
||||
// Limit the number of destinations that can be created if
|
||||
// maxDestinations has been set on a policy
|
||||
validateMaxDestinations(destination);
|
||||
|
||||
LOG.debug("{} adding destination: {}", broker.getBrokerName(), destination);
|
||||
dest = createDestination(context, destination);
|
||||
// intercept if there is a valid interceptor defined
|
||||
|
@ -140,6 +157,7 @@ public abstract class AbstractRegion implements Region {
|
|||
}
|
||||
dest.start();
|
||||
destinations.put(destination, dest);
|
||||
updateRegionDestCounts(destination, 1);
|
||||
destinationMap.put(destination, dest);
|
||||
addSubscriptionsForDestination(context, dest);
|
||||
}
|
||||
|
@ -157,6 +175,61 @@ public abstract class AbstractRegion implements Region {
|
|||
return subscriptions;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Updates the counts in RegionStatistics based on whether or not the destination
|
||||
* is an Advisory Destination or not
|
||||
*
|
||||
* @param destination the destination being used to determine which counters to update
|
||||
* @param count the count to add to the counters
|
||||
*/
|
||||
protected void updateRegionDestCounts(ActiveMQDestination destination, int count) {
|
||||
if (destination != null) {
|
||||
if (AdvisorySupport.isAdvisoryTopic(destination)) {
|
||||
regionStatistics.getAdvisoryDestinations().add(count);
|
||||
} else {
|
||||
regionStatistics.getDestinations().add(count);
|
||||
}
|
||||
regionStatistics.getAllDestinations().add(count);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks whether or not the destination can be created based on
|
||||
* {@link PolicyEntry#getMaxDestinations}, if it has been set. Advisory
|
||||
* topics are ignored.
|
||||
*
|
||||
* @param destination
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void validateMaxDestinations(ActiveMQDestination destination)
|
||||
throws Exception {
|
||||
if (broker.getDestinationPolicy() != null) {
|
||||
PolicyEntry entry = broker.getDestinationPolicy().getEntryFor(destination);
|
||||
// Make sure the destination is not an advisory topic
|
||||
if (entry != null && entry.getMaxDestinations() >= 0
|
||||
&& !AdvisorySupport.isAdvisoryTopic(destination)) {
|
||||
// If there is an entry for this destination, look up the set of
|
||||
// destinations associated with this policy
|
||||
// If a destination isn't specified, then just count up
|
||||
// non-advisory destinations (ie count all destinations)
|
||||
int destinationSize = (int) (entry.getDestination() != null ?
|
||||
destinationMap.get(entry.getDestination()).size() : regionStatistics.getDestinations().getCount());
|
||||
if (destinationSize >= entry.getMaxDestinations()) {
|
||||
if (entry.getDestination() != null) {
|
||||
throw new IllegalStateException(
|
||||
"The maxmimum number of destinations allowed ("+ entry.getMaxDestinations() +
|
||||
") for the policy " + entry.getDestination() + " has already been reached.");
|
||||
// No destination has been set (default policy)
|
||||
} else {
|
||||
throw new IllegalStateException("The maxmimum number of destinations allowed ("
|
||||
+ entry.getMaxDestinations() + ") has already been reached.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected List<Subscription> addSubscriptionsForDestination(ConnectionContext context, Destination dest)
|
||||
throws Exception {
|
||||
|
||||
|
@ -210,6 +283,8 @@ public abstract class AbstractRegion implements Region {
|
|||
try {
|
||||
Destination dest = destinations.remove(destination);
|
||||
if (dest != null) {
|
||||
updateRegionDestCounts(destination, -1);
|
||||
|
||||
// timeout<0 or we timed out, we now force any remaining
|
||||
// subscriptions to un-subscribe.
|
||||
for (Iterator<Subscription> iter = subscriptions.values().iterator(); iter.hasNext();) {
|
||||
|
@ -620,7 +695,10 @@ public abstract class AbstractRegion implements Region {
|
|||
destination = destinationInterceptor.intercept(destination);
|
||||
}
|
||||
getDestinationMap().put(key, destination);
|
||||
destinations.put(key, destination);
|
||||
Destination prev = destinations.put(key, destination);
|
||||
if (prev == null) {
|
||||
updateRegionDestCounts(key, 1);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
destinationsLock.writeLock().unlock();
|
||||
|
|
|
@ -84,6 +84,7 @@ public abstract class BaseDestination implements Destination {
|
|||
private boolean advisoryForDelivery;
|
||||
private boolean advisoryForConsumed;
|
||||
private boolean sendAdvisoryIfNoConsumers;
|
||||
private boolean includeBodyForAdvisory;
|
||||
protected final DestinationStatistics destinationStatistics = new DestinationStatistics();
|
||||
protected final BrokerService brokerService;
|
||||
protected final Broker regionBroker;
|
||||
|
@ -466,6 +467,14 @@ public abstract class BaseDestination implements Destination {
|
|||
this.sendAdvisoryIfNoConsumers = sendAdvisoryIfNoConsumers;
|
||||
}
|
||||
|
||||
public boolean isIncludeBodyForAdvisory() {
|
||||
return includeBodyForAdvisory;
|
||||
}
|
||||
|
||||
public void setIncludeBodyForAdvisory(boolean includeBodyForAdvisory) {
|
||||
this.includeBodyForAdvisory = includeBodyForAdvisory;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the dead letter strategy
|
||||
*/
|
||||
|
|
|
@ -824,6 +824,7 @@ public class Queue extends BaseDestination implements Task, UsageListener, Index
|
|||
try {
|
||||
message.getMessageId().setBrokerSequenceId(getDestinationSequenceId());
|
||||
if (store != null && message.isPersistent()) {
|
||||
message.getMessageId().setFutureOrSequenceLong(null);
|
||||
try {
|
||||
if (messages.isCacheEnabled()) {
|
||||
result = store.asyncAddQueueMessage(context, message, isOptimizeStorage());
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.broker.region;
|
||||
|
||||
import org.apache.activemq.management.CountStatisticImpl;
|
||||
import org.apache.activemq.management.StatsImpl;
|
||||
|
||||
/**
|
||||
* The J2EE Statistics for the Connection.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class RegionStatistics extends StatsImpl {
|
||||
|
||||
private CountStatisticImpl advisoryDestinations;
|
||||
private CountStatisticImpl destinations;
|
||||
private CountStatisticImpl allDestinations;
|
||||
|
||||
public RegionStatistics() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
public RegionStatistics(boolean enabled) {
|
||||
|
||||
advisoryDestinations = new CountStatisticImpl("advisoryTopics", "The number of advisory destinations in the region");
|
||||
destinations = new CountStatisticImpl("destinations", "The number of regular (non-adivsory) destinations in the region");
|
||||
allDestinations = new CountStatisticImpl("allDestinations", "The total number of destinations, including advisory destinations, in the region");
|
||||
|
||||
addStatistic("advisoryDestinations", advisoryDestinations);
|
||||
addStatistic("destinations", destinations);
|
||||
addStatistic("allDestinations", allDestinations);
|
||||
|
||||
this.setEnabled(enabled);
|
||||
}
|
||||
|
||||
public CountStatisticImpl getAdvisoryDestinations() {
|
||||
return advisoryDestinations;
|
||||
}
|
||||
|
||||
public CountStatisticImpl getDestinations() {
|
||||
return destinations;
|
||||
}
|
||||
|
||||
public CountStatisticImpl getAllDestinations() {
|
||||
return allDestinations;
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
super.reset();
|
||||
advisoryDestinations.reset();
|
||||
destinations.reset();
|
||||
allDestinations.reset();
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
super.setEnabled(enabled);
|
||||
advisoryDestinations.setEnabled(enabled);
|
||||
destinations.setEnabled(enabled);
|
||||
allDestinations.setEnabled(enabled);
|
||||
}
|
||||
|
||||
public void setParent(RegionStatistics parent) {
|
||||
if (parent != null) {
|
||||
advisoryDestinations.setParent(parent.getAdvisoryDestinations());
|
||||
destinations.setParent(parent.getDestinations());
|
||||
allDestinations.setParent(parent.getAllDestinations());
|
||||
} else {
|
||||
advisoryDestinations.setParent(null);
|
||||
destinations.setParent(null);
|
||||
allDestinations.setParent(null);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -39,6 +39,7 @@ import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy;
|
|||
import org.apache.activemq.broker.region.policy.SubscriptionRecoveryPolicy;
|
||||
import org.apache.activemq.broker.util.InsertionCountList;
|
||||
import org.apache.activemq.command.ActiveMQDestination;
|
||||
import org.apache.activemq.command.ConsumerInfo;
|
||||
import org.apache.activemq.command.ExceptionResponse;
|
||||
import org.apache.activemq.command.Message;
|
||||
import org.apache.activemq.command.MessageAck;
|
||||
|
@ -209,6 +210,17 @@ public class Topic extends BaseDestination implements Task {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean hasDurableSubChanged(SubscriptionInfo info1, ConsumerInfo info2) {
|
||||
if (info1.getSelector() != null ^ info2.getSelector() != null) {
|
||||
return true;
|
||||
}
|
||||
if (info1.getSelector() != null && !info1.getSelector().equals(info2.getSelector())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void activate(ConnectionContext context, final DurableTopicSubscription subscription) throws Exception {
|
||||
// synchronize with dispatch method so that no new messages are sent
|
||||
// while we are recovering a subscription to avoid out of order messages.
|
||||
|
@ -222,12 +234,10 @@ public class Topic extends BaseDestination implements Task {
|
|||
// Recover the durable subscription.
|
||||
String clientId = subscription.getSubscriptionKey().getClientId();
|
||||
String subscriptionName = subscription.getSubscriptionKey().getSubscriptionName();
|
||||
String selector = subscription.getConsumerInfo().getSelector();
|
||||
SubscriptionInfo info = topicStore.lookupSubscription(clientId, subscriptionName);
|
||||
if (info != null) {
|
||||
// Check to see if selector changed.
|
||||
String s1 = info.getSelector();
|
||||
if (s1 == null ^ selector == null || (s1 != null && !s1.equals(selector))) {
|
||||
if (hasDurableSubChanged(info, subscription.getConsumerInfo())) {
|
||||
// Need to delete the subscription
|
||||
topicStore.deleteSubscription(clientId, subscriptionName);
|
||||
info = null;
|
||||
|
@ -247,9 +257,10 @@ public class Topic extends BaseDestination implements Task {
|
|||
if (info == null) {
|
||||
info = new SubscriptionInfo();
|
||||
info.setClientId(clientId);
|
||||
info.setSelector(selector);
|
||||
info.setSelector(subscription.getConsumerInfo().getSelector());
|
||||
info.setSubscriptionName(subscriptionName);
|
||||
info.setDestination(getActiveMQDestination());
|
||||
info.setNoLocal(subscription.getConsumerInfo().isNoLocal());
|
||||
// This destination is an actual destination id.
|
||||
info.setSubscribedDestination(subscription.getConsumerInfo().getDestination());
|
||||
// This destination might be a pattern
|
||||
|
@ -816,17 +827,6 @@ public class Topic extends BaseDestination implements Task {
|
|||
}
|
||||
}
|
||||
|
||||
private void rollback(MessageId poisoned) {
|
||||
dispatchLock.readLock().lock();
|
||||
try {
|
||||
for (DurableTopicSubscription durableTopicSubscription : durableSubscribers.values()) {
|
||||
durableTopicSubscription.getPending().rollback(poisoned);
|
||||
}
|
||||
} finally {
|
||||
dispatchLock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public Map<SubscriptionKey, DurableTopicSubscription> getDurableTopicSubs() {
|
||||
return durableSubscribers;
|
||||
}
|
||||
|
|
|
@ -136,7 +136,7 @@ public class TopicRegion extends AbstractRegion {
|
|||
destinationsLock.readLock().lock();
|
||||
try {
|
||||
for (Destination dest : destinations.values()) {
|
||||
//Account for virtual destinations
|
||||
// Account for virtual destinations
|
||||
if (dest instanceof Topic){
|
||||
Topic topic = (Topic)dest;
|
||||
topic.deleteSubscription(context, key);
|
||||
|
@ -301,6 +301,7 @@ public class TopicRegion extends AbstractRegion {
|
|||
rc.setSubscriptionName(info.getSubscriptionName());
|
||||
rc.setDestination(info.getSubscribedDestination());
|
||||
rc.setConsumerId(createConsumerId());
|
||||
rc.setNoLocal(info.isNoLocal());
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,15 +58,15 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
this.batchList = new OrderedPendingList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public final synchronized void start() throws Exception{
|
||||
if (!isStarted()) {
|
||||
super.start();
|
||||
resetBatch();
|
||||
resetSize();
|
||||
setCacheEnabled(size==0&&useCache);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void resetSize() {
|
||||
|
@ -84,7 +84,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
gc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public final boolean recoverMessage(Message message) throws Exception {
|
||||
return recoverMessage(message,false);
|
||||
}
|
||||
|
@ -148,12 +148,12 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
clearIterator(true);
|
||||
size();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public synchronized void release() {
|
||||
clearIterator(false);
|
||||
}
|
||||
|
||||
|
||||
private synchronized void clearIterator(boolean ensureIterator) {
|
||||
boolean haveIterator = this.iterator != null;
|
||||
this.iterator=null;
|
||||
|
@ -161,7 +161,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
ensureIterator();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private synchronized void ensureIterator() {
|
||||
if(this.iterator==null) {
|
||||
this.iterator=this.batchList.iterator();
|
||||
|
@ -171,8 +171,8 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
|
||||
public final void finished() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public final synchronized boolean hasNext() {
|
||||
if (batchList.isEmpty()) {
|
||||
try {
|
||||
|
@ -185,8 +185,8 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
ensureIterator();
|
||||
return this.iterator.hasNext();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public final synchronized MessageReference next() {
|
||||
MessageReference result = null;
|
||||
if (!this.batchList.isEmpty()&&this.iterator.hasNext()) {
|
||||
|
@ -198,7 +198,7 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public synchronized boolean addMessageLast(MessageReference node) throws Exception {
|
||||
boolean disableCache = false;
|
||||
if (hasSpace()) {
|
||||
|
@ -314,23 +314,31 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
}
|
||||
|
||||
private void setLastCachedId(final int index, MessageId candidate) {
|
||||
if (lastCachedIds[index] == null || lastCachedIds[index].getFutureOrSequenceLong() == null) { // possibly null for topics
|
||||
lastCachedIds[index] = candidate;
|
||||
} else if (Long.compare(((Long) candidate.getFutureOrSequenceLong()), ((Long) lastCachedIds[index].getFutureOrSequenceLong())) > 0) {
|
||||
MessageId lastCacheId = lastCachedIds[index];
|
||||
if (lastCacheId == null) {
|
||||
lastCachedIds[index] = candidate;
|
||||
} else {
|
||||
Object lastCacheFutureOrSequenceLong = lastCacheId.getFutureOrSequenceLong();
|
||||
Object candidateOrSequenceLong = candidate.getFutureOrSequenceLong();
|
||||
if (lastCacheFutureOrSequenceLong == null) { // possibly null for topics
|
||||
lastCachedIds[index] = candidate;
|
||||
} else if (candidateOrSequenceLong != null &&
|
||||
Long.compare(((Long) candidateOrSequenceLong), ((Long) lastCacheFutureOrSequenceLong)) > 0) {
|
||||
lastCachedIds[index] = candidate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void setBatch(MessageId messageId) throws Exception {
|
||||
}
|
||||
|
||||
|
||||
|
||||
public synchronized void addMessageFirst(MessageReference node) throws Exception {
|
||||
setCacheEnabled(false);
|
||||
size++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public final synchronized void remove() {
|
||||
size--;
|
||||
if (iterator!=null) {
|
||||
|
@ -341,20 +349,20 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public final synchronized void remove(MessageReference node) {
|
||||
if (batchList.remove(node) != null) {
|
||||
size--;
|
||||
setCacheEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public final synchronized void clear() {
|
||||
gc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public synchronized void gc() {
|
||||
for (MessageReference msg : batchList) {
|
||||
rollback(msg.getMessageId());
|
||||
|
@ -385,14 +393,14 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public final synchronized boolean isEmpty() {
|
||||
// negative means more messages added to store through queue.send since last reset
|
||||
return size == 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public final synchronized boolean hasMessagesBufferedToDeliver() {
|
||||
return !batchList.isEmpty();
|
||||
}
|
||||
|
@ -413,13 +421,13 @@ public abstract class AbstractStoreCursor extends AbstractPendingMessageCursor i
|
|||
+ ",lastSyncCachedId:" + lastCachedIds[SYNC_ADD] + ",lastSyncCachedId-seq:" + (lastCachedIds[SYNC_ADD] != null ? lastCachedIds[SYNC_ADD].getFutureOrSequenceLong() : "null")
|
||||
+ ",lastAsyncCachedId:" + lastCachedIds[ASYNC_ADD] + ",lastAsyncCachedId-seq:" + (lastCachedIds[ASYNC_ADD] != null ? lastCachedIds[ASYNC_ADD].getFutureOrSequenceLong() : "null");
|
||||
}
|
||||
|
||||
|
||||
protected abstract void doFillBatch() throws Exception;
|
||||
|
||||
|
||||
protected abstract void resetBatch();
|
||||
|
||||
protected abstract int getStoreSize();
|
||||
|
||||
|
||||
protected abstract boolean isStoreEmpty();
|
||||
|
||||
public Subscription getSubscription() {
|
||||
|
|
|
@ -81,6 +81,7 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
private boolean advisoryWhenFull;
|
||||
private boolean advisoryForDelivery;
|
||||
private boolean advisoryForConsumed;
|
||||
private boolean includeBodyForAdvisory;
|
||||
private long expireMessagesPeriod = BaseDestination.EXPIRE_MESSAGE_PERIOD;
|
||||
private int maxExpirePageSize = BaseDestination.MAX_BROWSE_PAGE_SIZE;
|
||||
private int queuePrefetch=ActiveMQPrefetchPolicy.DEFAULT_QUEUE_PREFETCH;
|
||||
|
@ -99,6 +100,8 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
private boolean reduceMemoryFootprint;
|
||||
private NetworkBridgeFilterFactory networkBridgeFilterFactory;
|
||||
private boolean doOptimzeMessageStorage = true;
|
||||
private int maxDestinations = -1;
|
||||
|
||||
/*
|
||||
* percentage of in-flight messages above which optimize message store is disabled
|
||||
*/
|
||||
|
@ -198,6 +201,7 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
destination.setAdvisoryForSlowConsumers(isAdvisoryForSlowConsumers());
|
||||
destination.setAdvisoryForFastProducers(isAdvisoryForFastProducers());
|
||||
destination.setAdvisoryWhenFull(isAdvisoryWhenFull());
|
||||
destination.setIncludeBodyForAdvisory(isIncludeBodyForAdvisory());
|
||||
destination.setSendAdvisoryIfNoConsumers(isSendAdvisoryIfNoConsumers());
|
||||
}
|
||||
|
||||
|
@ -738,6 +742,26 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
this.advisoryForFastProducers = advisoryForFastProducers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the original message body should be included when applicable
|
||||
* for advisory messages
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean isIncludeBodyForAdvisory() {
|
||||
return includeBodyForAdvisory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if the original message body should be included when applicable
|
||||
* for advisory messages
|
||||
*
|
||||
* @param includeBodyForAdvisory
|
||||
*/
|
||||
public void setIncludeBodyForAdvisory(boolean includeBodyForAdvisory) {
|
||||
this.includeBodyForAdvisory = includeBodyForAdvisory;
|
||||
}
|
||||
|
||||
public void setMaxExpirePageSize(int maxExpirePageSize) {
|
||||
this.maxExpirePageSize = maxExpirePageSize;
|
||||
}
|
||||
|
@ -962,4 +986,19 @@ public class PolicyEntry extends DestinationMapEntry {
|
|||
public boolean isPersistJMSRedelivered() {
|
||||
return persistJMSRedelivered;
|
||||
}
|
||||
|
||||
public int getMaxDestinations() {
|
||||
return maxDestinations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the maximum number of destinations that can be created
|
||||
*
|
||||
* @param maxDestinations
|
||||
* maximum number of destinations
|
||||
*/
|
||||
public void setMaxDestinations(int maxDestinations) {
|
||||
this.maxDestinations = maxDestinations;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -475,6 +475,9 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
|||
if (configuration.isDuplex()) {
|
||||
// separate in-bound channel for forwards so we don't
|
||||
// contend with out-bound dispatch on same connection
|
||||
remoteBrokerInfo.setNetworkConnection(true);
|
||||
duplexInboundLocalBroker.oneway(remoteBrokerInfo);
|
||||
|
||||
ConnectionInfo duplexLocalConnectionInfo = new ConnectionInfo();
|
||||
duplexLocalConnectionInfo.setConnectionId(new ConnectionId(idGenerator.generateId()));
|
||||
duplexLocalConnectionInfo.setClientId(configuration.getName() + "_" + remoteBrokerName + "_inbound_duplex_"
|
||||
|
@ -616,8 +619,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
|||
LOG.trace("{} duplex command type: {}", configuration.getBrokerName(), command.getDataStructureType());
|
||||
if (command.isMessage()) {
|
||||
final ActiveMQMessage message = (ActiveMQMessage) command;
|
||||
if (AdvisorySupport.isConsumerAdvisoryTopic(message.getDestination())
|
||||
|| AdvisorySupport.isDestinationAdvisoryTopic(message.getDestination())) {
|
||||
if (NetworkBridgeFilter.isAdvisoryInterpretedByNetworkBridge(message)) {
|
||||
serviceRemoteConsumerAdvisory(message.getDataStructure());
|
||||
ackAdvisory(message);
|
||||
} else {
|
||||
|
@ -986,7 +988,7 @@ public abstract class DemandForwardingBridgeSupport implements NetworkBridge, Br
|
|||
configuration.getBrokerName(), remoteBrokerName, (LOG.isTraceEnabled() ? message : message.getMessageId()), md.getConsumerId(), message.getDestination(), Arrays.toString(message.getBrokerPath()), message
|
||||
});
|
||||
|
||||
if (isDuplex() && AdvisorySupport.ADIVSORY_MESSAGE_TYPE.equals(message.getType())) {
|
||||
if (isDuplex() && NetworkBridgeFilter.isAdvisoryInterpretedByNetworkBridge(message)) {
|
||||
try {
|
||||
// never request b/c they are eventually acked async
|
||||
remoteBroker.oneway(message);
|
||||
|
|
|
@ -32,19 +32,6 @@ public final class NetworkBridgeFactory {
|
|||
|
||||
private NetworkBridgeFactory() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a network bridge
|
||||
*
|
||||
* @param config
|
||||
* @param localTransport
|
||||
* @param remoteTransport
|
||||
* @return the NetworkBridge
|
||||
*/
|
||||
public static DemandForwardingBridge createBridge(NetworkBridgeConfiguration config,
|
||||
Transport localTransport, Transport remoteTransport) {
|
||||
return createBridge(config, localTransport, remoteTransport, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* create a network bridge
|
||||
|
@ -74,7 +61,6 @@ public final class NetworkBridgeFactory {
|
|||
public static Transport createLocalTransport(Broker broker) throws Exception {
|
||||
URI uri = broker.getVmConnectorURI();
|
||||
HashMap<String, String> map = new HashMap<String, String>(URISupport.parseParameters(uri));
|
||||
map.put("network", "true");
|
||||
map.put("async", "true");
|
||||
map.put("create", "false"); // we don't want a vm connect during shutdown to trigger a broker create
|
||||
uri = URISupport.createURIWithQuery(uri, URISupport.createQueryString(map));
|
||||
|
|
|
@ -49,7 +49,6 @@ public class VMTransport implements Transport, Task {
|
|||
protected VMTransport peer;
|
||||
protected TransportListener transportListener;
|
||||
protected boolean marshal;
|
||||
protected boolean network;
|
||||
protected boolean async = true;
|
||||
protected int asyncQueueDepth = 2000;
|
||||
protected final URI location;
|
||||
|
@ -358,14 +357,6 @@ public class VMTransport implements Transport, Task {
|
|||
this.marshal = marshal;
|
||||
}
|
||||
|
||||
public boolean isNetwork() {
|
||||
return network;
|
||||
}
|
||||
|
||||
public void setNetwork(boolean network) {
|
||||
this.network = network;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return location + "#" + id;
|
||||
|
|
|
@ -55,7 +55,6 @@ public final class BrokerSupport {
|
|||
message.setDestination(deadLetterDestination);
|
||||
message.setTransactionId(null);
|
||||
message.setMemoryUsage(null);
|
||||
message.getMessageId().setFutureOrSequenceLong(null);
|
||||
message.setRedeliveryCounter(0);
|
||||
boolean originalFlowControl = context.isProducerFlowControl();
|
||||
try {
|
||||
|
|
|
@ -16,14 +16,18 @@
|
|||
*/
|
||||
package org.apache.activemq.util.osgi;
|
||||
|
||||
import static org.osgi.framework.wiring.BundleRevision.PACKAGE_NAMESPACE;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
|
@ -38,6 +42,9 @@ import org.osgi.framework.BundleActivator;
|
|||
import org.osgi.framework.BundleContext;
|
||||
import org.osgi.framework.BundleEvent;
|
||||
import org.osgi.framework.SynchronousBundleListener;
|
||||
import org.osgi.framework.wiring.BundleCapability;
|
||||
import org.osgi.framework.wiring.BundleWire;
|
||||
import org.osgi.framework.wiring.BundleWiring;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -50,9 +57,10 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob
|
|||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
|
||||
|
||||
private final ConcurrentMap<String, Class> serviceCache = new ConcurrentHashMap<String, Class>();
|
||||
private final ConcurrentMap<String, Class<?>> serviceCache = new ConcurrentHashMap<String, Class<?>>();
|
||||
private final ConcurrentMap<Long, BundleWrapper> bundleWrappers = new ConcurrentHashMap<Long, BundleWrapper>();
|
||||
private BundleContext bundleContext;
|
||||
private Set<BundleCapability> packageCapabilities = new HashSet<BundleCapability>();
|
||||
|
||||
// ================================================================
|
||||
// BundleActivator interface impl
|
||||
|
@ -67,6 +75,9 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob
|
|||
|
||||
debug("activating");
|
||||
this.bundleContext = bundleContext;
|
||||
|
||||
cachePackageCapabilities(Service.class, Transport.class, DiscoveryAgent.class, PersistenceAdapter.class);
|
||||
|
||||
debug("checking existing bundles");
|
||||
bundleContext.addBundleListener(this);
|
||||
for (Bundle bundle : bundleContext.getBundles()) {
|
||||
|
@ -78,6 +89,27 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob
|
|||
debug("activated");
|
||||
}
|
||||
|
||||
/**
|
||||
* Caches the package capabilities that are needed for a set of interface classes
|
||||
*
|
||||
* @param classes interfaces we want to track
|
||||
*/
|
||||
private void cachePackageCapabilities(Class<?> ... classes) {
|
||||
BundleWiring ourWiring = bundleContext.getBundle().adapt(BundleWiring.class);
|
||||
Set<String> packageNames = new HashSet<String>();
|
||||
for (Class<?> clazz: classes) {
|
||||
packageNames.add(clazz.getPackage().getName());
|
||||
}
|
||||
|
||||
List<BundleCapability> ourExports = ourWiring.getCapabilities(PACKAGE_NAMESPACE);
|
||||
for (BundleCapability ourExport : ourExports) {
|
||||
String ourPkgName = (String) ourExport.getAttributes().get(PACKAGE_NAMESPACE);
|
||||
if (packageNames.contains(ourPkgName)) {
|
||||
packageCapabilities.add(ourExport);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized void stop(BundleContext bundleContext) throws Exception {
|
||||
|
@ -105,11 +137,14 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob
|
|||
|
||||
protected void register(final Bundle bundle) {
|
||||
debug("checking bundle " + bundle.getBundleId());
|
||||
if( !isImportingUs(bundle) ) {
|
||||
debug("The bundle does not import us: "+ bundle.getBundleId());
|
||||
return;
|
||||
if (isOurBundle(bundle) || isImportingUs(bundle) ) {
|
||||
debug("Registering bundle for extension resolution: "+ bundle.getBundleId());
|
||||
bundleWrappers.put(bundle.getBundleId(), new BundleWrapper(bundle));
|
||||
}
|
||||
bundleWrappers.put(bundle.getBundleId(), new BundleWrapper(bundle));
|
||||
}
|
||||
|
||||
private boolean isOurBundle(final Bundle bundle) {
|
||||
return bundle.getBundleId() == bundleContext.getBundle().getBundleId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -137,7 +172,7 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob
|
|||
|
||||
@Override
|
||||
public Object create(String path) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException {
|
||||
Class clazz = serviceCache.get(path);
|
||||
Class<?> clazz = serviceCache.get(path);
|
||||
if (clazz == null) {
|
||||
StringBuffer warnings = new StringBuffer();
|
||||
// We need to look for a bundle that has that class.
|
||||
|
@ -205,19 +240,22 @@ public class Activator implements BundleActivator, SynchronousBundleListener, Ob
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* We consider a bundle to be a candidate for objects if it imports at least
|
||||
* one of the packages of our interfaces
|
||||
*
|
||||
* @param bundle
|
||||
* @return
|
||||
*/
|
||||
private boolean isImportingUs(Bundle bundle) {
|
||||
return isImportingClass(bundle, Service.class)
|
||||
|| isImportingClass(bundle, Transport.class)
|
||||
|| isImportingClass(bundle, DiscoveryAgent.class)
|
||||
|| isImportingClass(bundle, PersistenceAdapter.class);
|
||||
}
|
||||
|
||||
private boolean isImportingClass(Bundle bundle, Class clazz) {
|
||||
try {
|
||||
return bundle.loadClass(clazz.getName())==clazz;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
BundleWiring wiring = bundle.adapt(BundleWiring.class);
|
||||
List<BundleWire> imports = wiring.getRequiredWires(PACKAGE_NAMESPACE);
|
||||
for (BundleWire importWire : imports) {
|
||||
if (packageCapabilities.contains(importWire.getCapability())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class BundleWrapper {
|
||||
|
|
|
@ -252,37 +252,37 @@
|
|||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>
|
||||
javacc-maven-plugin
|
||||
</artifactId>
|
||||
<versionRange>[2.6,)</versionRange>
|
||||
<goals>
|
||||
<goal>javacc</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>
|
||||
javacc-maven-plugin
|
||||
</artifactId>
|
||||
<versionRange>[2.6,)</versionRange>
|
||||
<goals>
|
||||
<goal>javacc</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<execute>
|
||||
<runOnIncremental>true</runOnIncremental>
|
||||
</execute>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
|
@ -308,7 +308,7 @@
|
|||
<tasks>
|
||||
<echo>Running OpenWire Generator</echo>
|
||||
<taskdef name="generate" classname="org.apache.activemq.openwire.tool.JavaGeneratorTask" classpathref="maven.compile.classpath" />
|
||||
<generate version="10" basedir="${basedir}" generateTests="false" />
|
||||
<generate version="11" basedir="${basedir}" generateTests="false" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
|
|
|
@ -200,6 +200,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
}
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ActiveMQSession.class);
|
||||
private static final Object REDELIVERY_GUARD = new Object();
|
||||
private final ThreadPoolExecutor connectionExecutor;
|
||||
|
||||
protected int acknowledgementMode;
|
||||
|
@ -717,7 +718,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
if (!closed) {
|
||||
|
||||
try {
|
||||
executor.stop();
|
||||
executor.close();
|
||||
|
||||
for (Iterator<ActiveMQMessageConsumer> iter = consumers.iterator(); iter.hasNext();) {
|
||||
ActiveMQMessageConsumer consumer = iter.next();
|
||||
|
@ -916,105 +917,163 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
lastDeliveredSequenceId = message.getMessageId().getBrokerSequenceId();
|
||||
|
||||
final MessageAck ack = new MessageAck(md, MessageAck.STANDARD_ACK_TYPE, 1);
|
||||
try {
|
||||
ack.setFirstMessageId(md.getMessage().getMessageId());
|
||||
doStartTransaction();
|
||||
ack.setTransactionId(getTransactionContext().getTransactionId());
|
||||
if (ack.getTransactionId() != null) {
|
||||
getTransactionContext().addSynchronization(new Synchronization() {
|
||||
|
||||
final int clearRequestCount = (clearRequestsCounter.get() == Integer.MAX_VALUE ? clearRequestsCounter.incrementAndGet() : clearRequestsCounter.get());
|
||||
@Override
|
||||
public void beforeEnd() throws Exception {
|
||||
// validate our consumer so we don't push stale acks that get ignored
|
||||
if (ack.getTransactionId().isXATransaction() && !connection.hasDispatcher(ack.getConsumerId())) {
|
||||
LOG.debug("forcing rollback - {} consumer no longer active on {}", ack, connection);
|
||||
throw new TransactionRolledBackException("consumer " + ack.getConsumerId() + " no longer active on " + connection);
|
||||
}
|
||||
LOG.trace("beforeEnd ack {}", ack);
|
||||
sendAck(ack);
|
||||
}
|
||||
final AtomicBoolean afterDeliveryError = new AtomicBoolean(false);
|
||||
/*
|
||||
* The redelivery guard is to allow the endpoint lifecycle to complete before the messsage is dispatched.
|
||||
* We dont want the after deliver being called after the redeliver as it may cause some weird stuff.
|
||||
* */
|
||||
synchronized (REDELIVERY_GUARD) {
|
||||
try {
|
||||
ack.setFirstMessageId(md.getMessage().getMessageId());
|
||||
doStartTransaction();
|
||||
ack.setTransactionId(getTransactionContext().getTransactionId());
|
||||
if (ack.getTransactionId() != null) {
|
||||
getTransactionContext().addSynchronization(new Synchronization() {
|
||||
|
||||
@Override
|
||||
public void afterRollback() throws Exception {
|
||||
LOG.trace("rollback {}", ack, new Throwable("here"));
|
||||
// ensure we don't filter this as a duplicate
|
||||
connection.rollbackDuplicate(ActiveMQSession.this, md.getMessage());
|
||||
final int clearRequestCount = (clearRequestsCounter.get() == Integer.MAX_VALUE ? clearRequestsCounter.incrementAndGet() : clearRequestsCounter.get());
|
||||
|
||||
// don't redeliver if we have been interrupted b/c the broker will redeliver on reconnect
|
||||
if (clearRequestsCounter.get() > clearRequestCount) {
|
||||
LOG.debug("No redelivery of {} on rollback of {} due to failover of {}", md, ack.getTransactionId(), connection.getTransport());
|
||||
return;
|
||||
}
|
||||
|
||||
// validate our consumer so we don't push stale acks that get ignored or redeliver what will be redispatched
|
||||
if (ack.getTransactionId().isXATransaction() && !connection.hasDispatcher(ack.getConsumerId())) {
|
||||
LOG.debug("No local redelivery of {} on rollback of {} because consumer is no longer active on {}", md, ack.getTransactionId(), connection.getTransport());
|
||||
return;
|
||||
}
|
||||
|
||||
RedeliveryPolicy redeliveryPolicy = connection.getRedeliveryPolicy();
|
||||
int redeliveryCounter = md.getMessage().getRedeliveryCounter();
|
||||
if (redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES
|
||||
&& redeliveryCounter >= redeliveryPolicy.getMaximumRedeliveries()) {
|
||||
// We need to NACK the messages so that they get
|
||||
// sent to the
|
||||
// DLQ.
|
||||
// Acknowledge the last message.
|
||||
MessageAck ack = new MessageAck(md, MessageAck.POSION_ACK_TYPE, 1);
|
||||
ack.setFirstMessageId(md.getMessage().getMessageId());
|
||||
ack.setPoisonCause(new Throwable("Exceeded ra redelivery policy limit:" + redeliveryPolicy));
|
||||
asyncSendPacket(ack);
|
||||
|
||||
} else {
|
||||
|
||||
MessageAck ack = new MessageAck(md, MessageAck.REDELIVERED_ACK_TYPE, 1);
|
||||
ack.setFirstMessageId(md.getMessage().getMessageId());
|
||||
asyncSendPacket(ack);
|
||||
|
||||
// Figure out how long we should wait to resend
|
||||
// this message.
|
||||
long redeliveryDelay = redeliveryPolicy.getInitialRedeliveryDelay();
|
||||
for (int i = 0; i < redeliveryCounter; i++) {
|
||||
redeliveryDelay = redeliveryPolicy.getNextRedeliveryDelay(redeliveryDelay);
|
||||
@Override
|
||||
public void beforeEnd() throws Exception {
|
||||
// validate our consumer so we don't push stale acks that get ignored
|
||||
if (ack.getTransactionId().isXATransaction() && !connection.hasDispatcher(ack.getConsumerId())) {
|
||||
LOG.debug("forcing rollback - {} consumer no longer active on {}", ack, connection);
|
||||
throw new TransactionRolledBackException("consumer " + ack.getConsumerId() + " no longer active on " + connection);
|
||||
}
|
||||
connection.getScheduler().executeAfterDelay(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
((ActiveMQDispatcher)md.getConsumer()).dispatch(md);
|
||||
}
|
||||
}, redeliveryDelay);
|
||||
LOG.trace("beforeEnd ack {}", ack);
|
||||
sendAck(ack);
|
||||
}
|
||||
md.getMessage().onMessageRolledBack();
|
||||
|
||||
@Override
|
||||
public void afterRollback() throws Exception {
|
||||
LOG.trace("rollback {}", ack, new Throwable("here"));
|
||||
// ensure we don't filter this as a duplicate
|
||||
connection.rollbackDuplicate(ActiveMQSession.this, md.getMessage());
|
||||
|
||||
// don't redeliver if we have been interrupted b/c the broker will redeliver on reconnect
|
||||
if (clearRequestsCounter.get() > clearRequestCount) {
|
||||
LOG.debug("No redelivery of {} on rollback of {} due to failover of {}", md, ack.getTransactionId(), connection.getTransport());
|
||||
return;
|
||||
}
|
||||
|
||||
// validate our consumer so we don't push stale acks that get ignored or redeliver what will be redispatched
|
||||
if (ack.getTransactionId().isXATransaction() && !connection.hasDispatcher(ack.getConsumerId())) {
|
||||
LOG.debug("No local redelivery of {} on rollback of {} because consumer is no longer active on {}", md, ack.getTransactionId(), connection.getTransport());
|
||||
return;
|
||||
}
|
||||
|
||||
RedeliveryPolicy redeliveryPolicy = connection.getRedeliveryPolicy();
|
||||
int redeliveryCounter = md.getMessage().getRedeliveryCounter();
|
||||
if (redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES
|
||||
&& redeliveryCounter >= redeliveryPolicy.getMaximumRedeliveries()) {
|
||||
// We need to NACK the messages so that they get
|
||||
// sent to the
|
||||
// DLQ.
|
||||
// Acknowledge the last message.
|
||||
MessageAck ack = new MessageAck(md, MessageAck.POSION_ACK_TYPE, 1);
|
||||
ack.setFirstMessageId(md.getMessage().getMessageId());
|
||||
ack.setPoisonCause(new Throwable("Exceeded ra redelivery policy limit:" + redeliveryPolicy));
|
||||
asyncSendPacket(ack);
|
||||
|
||||
} else {
|
||||
|
||||
MessageAck ack = new MessageAck(md, MessageAck.REDELIVERED_ACK_TYPE, 1);
|
||||
ack.setFirstMessageId(md.getMessage().getMessageId());
|
||||
asyncSendPacket(ack);
|
||||
|
||||
// Figure out how long we should wait to resend
|
||||
// this message.
|
||||
long redeliveryDelay = redeliveryPolicy.getInitialRedeliveryDelay();
|
||||
for (int i = 0; i < redeliveryCounter; i++) {
|
||||
redeliveryDelay = redeliveryPolicy.getNextRedeliveryDelay(redeliveryDelay);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are a non blocking delivery then we need to stop the executor to avoid more
|
||||
* messages being delivered, once the message is redelivered we can restart it.
|
||||
* */
|
||||
if (!connection.isNonBlockingRedelivery()) {
|
||||
LOG.debug("Blocking session until re-delivery...");
|
||||
executor.stop();
|
||||
}
|
||||
|
||||
connection.getScheduler().executeAfterDelay(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
/*
|
||||
* wait for the first delivery to be complete, i.e. after delivery has been called.
|
||||
* */
|
||||
synchronized (REDELIVERY_GUARD) {
|
||||
/*
|
||||
* If its non blocking then we can just dispatch in a new session.
|
||||
* */
|
||||
if (connection.isNonBlockingRedelivery()) {
|
||||
((ActiveMQDispatcher) md.getConsumer()).dispatch(md);
|
||||
} else {
|
||||
/*
|
||||
* If there has been an error thrown during afterDelivery then the
|
||||
* endpoint will be marked as dead so redelivery will fail (and eventually
|
||||
* the session marked as stale), in this case we can only call dispatch
|
||||
* which will create a new session with a new endpoint.
|
||||
* */
|
||||
if (afterDeliveryError.get()) {
|
||||
((ActiveMQDispatcher) md.getConsumer()).dispatch(md);
|
||||
} else {
|
||||
executor.executeFirst(md);
|
||||
executor.start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, redeliveryDelay);
|
||||
}
|
||||
md.getMessage().onMessageRolledBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
LOG.trace("{} onMessage({})", this, message.getMessageId());
|
||||
messageListener.onMessage(message);
|
||||
|
||||
} catch (Throwable e) {
|
||||
LOG.error("error dispatching message: ", e);
|
||||
|
||||
// A problem while invoking the MessageListener does not
|
||||
// in general indicate a problem with the connection to the broker, i.e.
|
||||
// it will usually be sufficient to let the afterDelivery() method either
|
||||
// commit or roll back in order to deal with the exception.
|
||||
// However, we notify any registered client internal exception listener
|
||||
// of the problem.
|
||||
connection.onClientInternalException(e);
|
||||
} finally {
|
||||
if (ack.getTransactionId() == null) {
|
||||
try {
|
||||
asyncSendPacket(ack);
|
||||
} catch (Throwable e) {
|
||||
connection.onClientInternalException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
LOG.trace("{} onMessage({})", this, message.getMessageId());
|
||||
messageListener.onMessage(message);
|
||||
|
||||
} catch (Throwable e) {
|
||||
LOG.error("error dispatching message: ", e);
|
||||
// A problem while invoking the MessageListener does not
|
||||
// in general indicate a problem with the connection to the broker, i.e.
|
||||
// it will usually be sufficient to let the afterDelivery() method either
|
||||
// commit or roll back in order to deal with the exception.
|
||||
// However, we notify any registered client internal exception listener
|
||||
// of the problem.
|
||||
connection.onClientInternalException(e);
|
||||
} finally {
|
||||
if (ack.getTransactionId() == null) {
|
||||
if (deliveryListener != null) {
|
||||
try {
|
||||
asyncSendPacket(ack);
|
||||
} catch (Throwable e) {
|
||||
connection.onClientInternalException(e);
|
||||
deliveryListener.afterDelivery(this, message);
|
||||
} catch (Throwable t) {
|
||||
LOG.debug("Unable to call after delivery", t);
|
||||
afterDeliveryError.set(true);
|
||||
throw new RuntimeException(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (deliveryListener != null) {
|
||||
deliveryListener.afterDelivery(this, message);
|
||||
/*
|
||||
* this can be outside the try/catch as if an exception is thrown then this session will be marked as stale anyway.
|
||||
* It also needs to be outside the redelivery guard.
|
||||
* */
|
||||
try {
|
||||
executor.waitForQueueRestart();
|
||||
} catch (InterruptedException ex) {
|
||||
connection.onClientInternalException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2099,7 +2158,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ActiveMQSession {id=" + info.getSessionId() + ",started=" + started.get() + "}";
|
||||
return "ActiveMQSession {id=" + info.getSessionId() + ",started=" + started.get() + "} " + sendMutex;
|
||||
}
|
||||
|
||||
public void checkMessageListener() throws JMSException {
|
||||
|
|
|
@ -207,4 +207,15 @@ public class ActiveMQSessionExecutor implements Task {
|
|||
List<MessageDispatch> getUnconsumedMessages() {
|
||||
return messageQueue.removeAll();
|
||||
}
|
||||
|
||||
void waitForQueueRestart() throws InterruptedException {
|
||||
synchronized (messageQueue.getMutex()) {
|
||||
while (messageQueue.isRunning() == false) {
|
||||
if (messageQueue.isClosed()) {
|
||||
break;
|
||||
}
|
||||
messageQueue.getMutex().wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,13 +18,13 @@ package org.apache.activemq.command;
|
|||
|
||||
/**
|
||||
* Holds the command id constants used by the command objects.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface CommandTypes {
|
||||
|
||||
// What is the latest version of the openwire protocol
|
||||
byte PROTOCOL_VERSION = 10;
|
||||
byte PROTOCOL_VERSION = 11;
|
||||
|
||||
// What is the latest version of the openwire protocol used in the stores
|
||||
byte PROTOCOL_STORE_VERSION = 6;
|
||||
|
|
|
@ -97,7 +97,7 @@ public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
|||
}
|
||||
|
||||
if (message.isAdvisory()) {
|
||||
if (consumerInfo != null && consumerInfo.isNetworkSubscription() && advisoryIsInterpretedByNetworkBridge(message)) {
|
||||
if (consumerInfo != null && consumerInfo.isNetworkSubscription() && isAdvisoryInterpretedByNetworkBridge(message)) {
|
||||
// they will be interpreted by the bridge leading to dup commands
|
||||
if (LOG.isTraceEnabled()) {
|
||||
LOG.trace("not propagating advisory to network sub: " + consumerInfo.getConsumerId() + ", message: "+ message);
|
||||
|
@ -124,7 +124,7 @@ public class NetworkBridgeFilter implements DataStructure, BooleanExpression {
|
|||
return true;
|
||||
}
|
||||
|
||||
private boolean advisoryIsInterpretedByNetworkBridge(Message message) {
|
||||
public static boolean isAdvisoryInterpretedByNetworkBridge(Message message) {
|
||||
return AdvisorySupport.isConsumerAdvisoryTopic(message.getDestination()) || AdvisorySupport.isTempDestinationAdvisoryTopic(message.getDestination());
|
||||
}
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ import org.apache.activemq.util.IntrospectionSupport;
|
|||
|
||||
/**
|
||||
* Used to represent a durable subscription.
|
||||
*
|
||||
*
|
||||
* @openwire:marshaller code="55"
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class SubscriptionInfo implements DataStructure {
|
||||
|
||||
|
@ -33,6 +33,7 @@ public class SubscriptionInfo implements DataStructure {
|
|||
protected String clientId;
|
||||
protected String subscriptionName;
|
||||
protected String selector;
|
||||
protected boolean noLocal;
|
||||
|
||||
public SubscriptionInfo() {}
|
||||
|
||||
|
@ -41,6 +42,7 @@ public class SubscriptionInfo implements DataStructure {
|
|||
this.subscriptionName = subscriptionName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getDataStructureType() {
|
||||
return DATA_STRUCTURE_TYPE;
|
||||
}
|
||||
|
@ -59,7 +61,7 @@ public class SubscriptionInfo implements DataStructure {
|
|||
/**
|
||||
* This is the a resolved destination that the subscription is receiving
|
||||
* messages from. This will never be a pattern or a composite destination.
|
||||
*
|
||||
*
|
||||
* @openwire:property version=1 cache=true
|
||||
*/
|
||||
public ActiveMQDestination getDestination() {
|
||||
|
@ -103,6 +105,7 @@ public class SubscriptionInfo implements DataStructure {
|
|||
this.subscriptionName = subscriptionName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMarshallAware() {
|
||||
return false;
|
||||
}
|
||||
|
@ -139,10 +142,10 @@ public class SubscriptionInfo implements DataStructure {
|
|||
* The destination the client originally subscribed to.. This may not match
|
||||
* the {@see getDestination} method if the subscribed destination uses
|
||||
* patterns or composites.
|
||||
*
|
||||
*
|
||||
* If the subscribed destinationis not set, this just ruturns the
|
||||
* desitination.
|
||||
*
|
||||
*
|
||||
* @openwire:property version=3
|
||||
*/
|
||||
public ActiveMQDestination getSubscribedDestination() {
|
||||
|
@ -156,4 +159,14 @@ public class SubscriptionInfo implements DataStructure {
|
|||
this.subscribedDestination = subscribedDestination;
|
||||
}
|
||||
|
||||
/**
|
||||
* @openwire:property version=11
|
||||
*/
|
||||
public boolean isNoLocal() {
|
||||
return noLocal;
|
||||
}
|
||||
|
||||
public void setNoLocal(boolean noLocal) {
|
||||
this.noLocal = noLocal;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,644 @@
|
|||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import org.apache.activemq.command.DataStructure;
|
||||
import org.apache.activemq.openwire.BooleanStream;
|
||||
import org.apache.activemq.openwire.DataStreamMarshaller;
|
||||
import org.apache.activemq.openwire.OpenWireFormat;
|
||||
import org.apache.activemq.util.ByteSequence;
|
||||
|
||||
public abstract class BaseDataStreamMarshaller implements DataStreamMarshaller {
|
||||
|
||||
public static final 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;
|
||||
}
|
||||
|
||||
public abstract byte getDataStructureType();
|
||||
|
||||
public abstract 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),
|
||||
Integer.valueOf(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 = Class.forName(className, false, 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
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);
|
||||
// Yes deprecated, but we know what we are doing.
|
||||
// This allows us to create a String from a ASCII byte array. (no UTF-8 decoding)
|
||||
return new String(data, 0);
|
||||
} 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 = 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),
|
||||
Integer.valueOf(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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,206 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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));
|
||||
info.setBrokerUploadUrl(tightUnmarshalString(dataIn, bs));
|
||||
info.setNetworkProperties(tightUnmarshalString(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);
|
||||
rc += tightMarshalString1(info.getBrokerUploadUrl(), bs);
|
||||
rc += tightMarshalString1(info.getNetworkProperties(), 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);
|
||||
tightMarshalString2(info.getBrokerUploadUrl(), dataOut, bs);
|
||||
tightMarshalString2(info.getNetworkProperties(), 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));
|
||||
info.setBrokerUploadUrl(looseUnmarshalString(dataIn));
|
||||
info.setNetworkProperties(looseUnmarshalString(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);
|
||||
looseMarshalString(info.getBrokerUploadUrl(), dataOut);
|
||||
looseMarshalString(info.getNetworkProperties(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
info.setConnectedBrokers(tightUnmarshalString(dataIn, bs));
|
||||
info.setReconnectTo(tightUnmarshalString(dataIn, bs));
|
||||
info.setRebalanceConnection(bs.readBoolean());
|
||||
info.setToken(tightUnmarshalByteArray(dataIn, bs));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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());
|
||||
rc += tightMarshalString1(info.getConnectedBrokers(), bs);
|
||||
rc += tightMarshalString1(info.getReconnectTo(), bs);
|
||||
bs.writeBoolean(info.isRebalanceConnection());
|
||||
rc += tightMarshalByteArray1(info.getToken(), 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);
|
||||
|
||||
ConnectionControl info = (ConnectionControl)o;
|
||||
bs.readBoolean();
|
||||
bs.readBoolean();
|
||||
bs.readBoolean();
|
||||
bs.readBoolean();
|
||||
bs.readBoolean();
|
||||
tightMarshalString2(info.getConnectedBrokers(), dataOut, bs);
|
||||
tightMarshalString2(info.getReconnectTo(), dataOut, bs);
|
||||
bs.readBoolean();
|
||||
tightMarshalByteArray2(info.getToken(), 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);
|
||||
|
||||
ConnectionControl info = (ConnectionControl)o;
|
||||
info.setClose(dataIn.readBoolean());
|
||||
info.setExit(dataIn.readBoolean());
|
||||
info.setFaultTolerant(dataIn.readBoolean());
|
||||
info.setResume(dataIn.readBoolean());
|
||||
info.setSuspend(dataIn.readBoolean());
|
||||
info.setConnectedBrokers(looseUnmarshalString(dataIn));
|
||||
info.setReconnectTo(looseUnmarshalString(dataIn));
|
||||
info.setRebalanceConnection(dataIn.readBoolean());
|
||||
info.setToken(looseUnmarshalByteArray(dataIn));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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());
|
||||
looseMarshalString(info.getConnectedBrokers(), dataOut);
|
||||
looseMarshalString(info.getReconnectTo(), dataOut);
|
||||
dataOut.writeBoolean(info.isRebalanceConnection());
|
||||
looseMarshalByteArray(wireFormat, info.getToken(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,201 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
info.setFaultTolerant(bs.readBoolean());
|
||||
info.setFailoverReconnect(bs.readBoolean());
|
||||
info.setClientIp(tightUnmarshalString(dataIn, bs));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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());
|
||||
bs.writeBoolean(info.isFaultTolerant());
|
||||
bs.writeBoolean(info.isFailoverReconnect());
|
||||
rc += tightMarshalString1(info.getClientIp(), 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);
|
||||
|
||||
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();
|
||||
bs.readBoolean();
|
||||
bs.readBoolean();
|
||||
tightMarshalString2(info.getClientIp(), 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);
|
||||
|
||||
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());
|
||||
info.setFaultTolerant(dataIn.readBoolean());
|
||||
info.setFailoverReconnect(dataIn.readBoolean());
|
||||
info.setClientIp(looseUnmarshalString(dataIn));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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());
|
||||
dataOut.writeBoolean(info.isFaultTolerant());
|
||||
dataOut.writeBoolean(info.isFailoverReconnect());
|
||||
looseMarshalString(info.getClientIp(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
|
||||
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);
|
||||
rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getDestination(), 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;
|
||||
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
|
||||
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.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
|
||||
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);
|
||||
looseMarshalNestedObject(wireFormat, (DataStructure)info.getDestination(), 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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,260 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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.setClientId(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());
|
||||
|
||||
if (bs.readBoolean()) {
|
||||
short size = dataIn.readShort();
|
||||
org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
|
||||
for( int i=0; i < size; i++ ) {
|
||||
value[i] = (org.apache.activemq.command.ConsumerId) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
|
||||
}
|
||||
info.setNetworkConsumerPath(value);
|
||||
}
|
||||
else {
|
||||
info.setNetworkConsumerPath(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.getClientId(), 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());
|
||||
rc += tightMarshalObjectArray1(wireFormat, info.getNetworkConsumerPath(), bs);
|
||||
|
||||
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.getClientId(), 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();
|
||||
tightMarshalObjectArray2(wireFormat, info.getNetworkConsumerPath(), 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);
|
||||
|
||||
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.setClientId(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());
|
||||
|
||||
if (dataIn.readBoolean()) {
|
||||
short size = dataIn.readShort();
|
||||
org.apache.activemq.command.ConsumerId value[] = new org.apache.activemq.command.ConsumerId[size];
|
||||
for( int i=0; i < size; i++ ) {
|
||||
value[i] = (org.apache.activemq.command.ConsumerId) looseUnmarsalNestedObject(wireFormat,dataIn);
|
||||
}
|
||||
info.setNetworkConsumerPath(value);
|
||||
}
|
||||
else {
|
||||
info.setNetworkConsumerPath(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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.getClientId(), 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());
|
||||
looseMarshalObjectArray(wireFormat, info.getNetworkConsumerPath(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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 ProducerAckMarshaller());
|
||||
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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
info.setPoisonCause((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 {
|
||||
|
||||
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);
|
||||
rc += tightMarshalThrowable1(wireFormat, info.getPoisonCause(), 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());
|
||||
tightMarshalThrowable2(wireFormat, info.getPoisonCause(), 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);
|
||||
|
||||
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());
|
||||
info.setPoisonCause((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 {
|
||||
|
||||
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());
|
||||
looseMarshalThrowable(wireFormat, info.getPoisonCause(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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.setTextView(tightUnmarshalString(dataIn, bs));
|
||||
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 += tightMarshalString1(info.getTextView(), 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;
|
||||
tightMarshalString2(info.getTextView(), dataOut, bs);
|
||||
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.setTextView(looseUnmarshalString(dataIn));
|
||||
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);
|
||||
looseMarshalString(info.getTextView(), dataOut);
|
||||
looseMarshalCachedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
|
||||
looseMarshalLong(wireFormat, info.getProducerSequenceId(), dataOut);
|
||||
looseMarshalLong(wireFormat, info.getBrokerSequenceId(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,316 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
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.setCluster(value);
|
||||
}
|
||||
else {
|
||||
info.setCluster(null);
|
||||
}
|
||||
info.setBrokerInTime(tightUnmarshalLong(wireFormat, dataIn, bs));
|
||||
info.setBrokerOutTime(tightUnmarshalLong(wireFormat, dataIn, bs));
|
||||
info.setJMSXGroupFirstForConsumer(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());
|
||||
rc += tightMarshalObjectArray1(wireFormat, info.getCluster(), bs);
|
||||
rc+=tightMarshalLong1(wireFormat, info.getBrokerInTime(), bs);
|
||||
rc+=tightMarshalLong1(wireFormat, info.getBrokerOutTime(), bs);
|
||||
bs.writeBoolean(info.isJMSXGroupFirstForConsumer());
|
||||
|
||||
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();
|
||||
tightMarshalObjectArray2(wireFormat, info.getCluster(), dataOut, bs);
|
||||
tightMarshalLong2(wireFormat, info.getBrokerInTime(), dataOut, bs);
|
||||
tightMarshalLong2(wireFormat, info.getBrokerOutTime(), dataOut, bs);
|
||||
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());
|
||||
|
||||
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.setCluster(value);
|
||||
}
|
||||
else {
|
||||
info.setCluster(null);
|
||||
}
|
||||
info.setBrokerInTime(looseUnmarshalLong(wireFormat, dataIn));
|
||||
info.setBrokerOutTime(looseUnmarshalLong(wireFormat, dataIn));
|
||||
info.setJMSXGroupFirstForConsumer(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());
|
||||
looseMarshalObjectArray(wireFormat, info.getCluster(), dataOut);
|
||||
looseMarshalLong(wireFormat, info.getBrokerInTime(), dataOut);
|
||||
looseMarshalLong(wireFormat, info.getBrokerOutTime(), dataOut);
|
||||
dataOut.writeBoolean(info.isJMSXGroupFirstForConsumer());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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));
|
||||
info.setCorrelationId(tightUnmarshalString(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 {
|
||||
|
||||
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);
|
||||
rc += tightMarshalString1(info.getCorrelationId(), 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);
|
||||
|
||||
MessagePull info = (MessagePull)o;
|
||||
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConsumerId(), dataOut, bs);
|
||||
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs);
|
||||
tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
|
||||
tightMarshalString2(info.getCorrelationId(), 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);
|
||||
|
||||
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));
|
||||
info.setCorrelationId(looseUnmarshalString(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 {
|
||||
|
||||
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);
|
||||
looseMarshalString(info.getCorrelationId(), dataOut);
|
||||
looseMarshalNestedObject(wireFormat, (DataStructure)info.getMessageId(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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.setNetworkBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
|
||||
info.setMessageTTL(dataIn.readInt());
|
||||
info.setConsumerTTL(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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 + 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);
|
||||
|
||||
NetworkBridgeFilter info = (NetworkBridgeFilter)o;
|
||||
tightMarshalCachedObject2(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut, bs);
|
||||
dataOut.writeInt(info.getMessageTTL());
|
||||
dataOut.writeInt(info.getConsumerTTL());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.setNetworkBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
|
||||
info.setMessageTTL(dataIn.readInt());
|
||||
info.setConsumerTTL(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
looseMarshalCachedObject(wireFormat, (DataStructure)info.getNetworkBrokerId(), dataOut);
|
||||
dataOut.writeInt(info.getMessageTTL());
|
||||
dataOut.writeInt(info.getConsumerTTL());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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 ProducerAckMarshaller
|
||||
*
|
||||
*
|
||||
* NOTE!: This file is auto generated - do not modify!
|
||||
* if you need to make a change, please see the modify the groovy scripts in the
|
||||
* under src/gram/script and then use maven openwire:generate to regenerate
|
||||
* this file.
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ProducerAckMarshaller extends BaseCommandMarshaller {
|
||||
|
||||
/**
|
||||
* Return the type of Data Structure we marshal
|
||||
* @return short representation of the type data structure
|
||||
*/
|
||||
public byte getDataStructureType() {
|
||||
return ProducerAck.DATA_STRUCTURE_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new object instance
|
||||
*/
|
||||
public DataStructure createObject() {
|
||||
return new ProducerAck();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
ProducerAck info = (ProducerAck)o;
|
||||
info.setProducerId((org.apache.activemq.command.ProducerId) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
|
||||
info.setSize(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Write the booleans that this object uses to a BooleanStream
|
||||
*/
|
||||
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
|
||||
|
||||
ProducerAck info = (ProducerAck)o;
|
||||
|
||||
int rc = super.tightMarshal1(wireFormat, o, bs);
|
||||
rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getProducerId(), 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);
|
||||
|
||||
ProducerAck info = (ProducerAck)o;
|
||||
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getProducerId(), dataOut, bs);
|
||||
dataOut.writeInt(info.getSize());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
ProducerAck info = (ProducerAck)o;
|
||||
info.setProducerId((org.apache.activemq.command.ProducerId) looseUnmarsalNestedObject(wireFormat, dataIn));
|
||||
info.setSize(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Write the booleans that this object uses to a BooleanStream
|
||||
*/
|
||||
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
|
||||
|
||||
ProducerAck info = (ProducerAck)o;
|
||||
|
||||
super.looseMarshal(wireFormat, o, dataOut);
|
||||
looseMarshalNestedObject(wireFormat, (DataStructure)info.getProducerId(), dataOut);
|
||||
dataOut.writeInt(info.getSize());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
info.setWindowSize(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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 + 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);
|
||||
|
||||
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();
|
||||
dataOut.writeInt(info.getWindowSize());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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());
|
||||
info.setWindowSize(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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());
|
||||
dataOut.writeInt(info.getWindowSize());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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));
|
||||
info.setLastDeliveredSequenceId(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 {
|
||||
|
||||
RemoveInfo info = (RemoveInfo)o;
|
||||
|
||||
int rc = super.tightMarshal1(wireFormat, o, bs);
|
||||
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getObjectId(), bs);
|
||||
rc+=tightMarshalLong1(wireFormat, info.getLastDeliveredSequenceId(), 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);
|
||||
tightMarshalLong2(wireFormat, info.getLastDeliveredSequenceId(), 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));
|
||||
info.setLastDeliveredSequenceId(looseUnmarshalLong(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);
|
||||
looseMarshalLong(wireFormat, info.getLastDeliveredSequenceId(), dataOut);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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));
|
||||
info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
|
||||
info.setNoLocal(bs.readBoolean());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs);
|
||||
bs.writeBoolean(info.isNoLocal());
|
||||
|
||||
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);
|
||||
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), 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);
|
||||
|
||||
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));
|
||||
info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn));
|
||||
info.setNoLocal(dataIn.readBoolean());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 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);
|
||||
looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut);
|
||||
dataOut.writeBoolean(info.isNoLocal());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
/**
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.activemq.openwire.v11;
|
||||
|
||||
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.
|
||||
*
|
||||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue