You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2011/04/27 19:33:09 UTC
svn commit: r1097189 [38/42] - in /activemq/activemq-apollo/trunk: ./
apollo-openwire/ apollo-openwire/src/ apollo-openwire/src/main/
apollo-openwire/src/main/resources/
apollo-openwire/src/main/resources/META-INF/
apollo-openwire/src/main/resources/ME...
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerControl.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerControl.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerControl.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerControl.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,146 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * Used to start and stop transports as well as terminating clients.
+ *
+ * @openwire:marshaller code="17"
+ * @version $Revision: 1.1 $
+ */
+public class ConsumerControl extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_CONTROL;
+
+ protected ConsumerId consumerId;
+ protected boolean close;
+ protected boolean stop;
+ protected boolean start;
+ protected boolean flush;
+ protected int prefetch;
+ protected ActiveMQDestination destination;
+
+ /**
+ * @openwire:property version=6
+ * @return Returns the destination.
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(org.apache.activemq.apollo.openwire.support.state.CommandVisitor visitor) throws Exception {
+ return visitor.processConsumerControl(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the close.
+ */
+ public boolean isClose() {
+ return close;
+ }
+
+ /**
+ * @param close The close to set.
+ */
+ public void setClose(boolean close) {
+ this.close = close;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the consumerId.
+ */
+ public ConsumerId getConsumerId() {
+ return consumerId;
+ }
+
+ /**
+ * @param consumerId The consumerId to set.
+ */
+ public void setConsumerId(ConsumerId consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the prefetch.
+ */
+ public int getPrefetch() {
+ return prefetch;
+ }
+
+ /**
+ * @param prefetch The prefetch to set.
+ */
+ public void setPrefetch(int prefetch) {
+ this.prefetch = prefetch;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the flush
+ */
+ public boolean isFlush() {
+ return this.flush;
+ }
+
+ /**
+ * @param flush the flush to set
+ */
+ public void setFlush(boolean flush) {
+ this.flush = flush;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the start
+ */
+ public boolean isStart() {
+ return this.start;
+ }
+
+ /**
+ * @param start the start to set
+ */
+ public void setStart(boolean start) {
+ this.start = start;
+ }
+
+ /**
+ * @openwire:property version=2
+ * @return the stop
+ */
+ public boolean isStop() {
+ return this.stop;
+ }
+
+ /**
+ * @param stop the stop to set
+ */
+ public void setStop(boolean stop) {
+ this.stop = stop;
+ }
+}
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerId.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerId.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerId.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerId.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,121 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * @openwire:marshaller code="122"
+ */
+public class ConsumerId implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_ID;
+
+ protected String connectionId;
+ protected long sessionId;
+ protected long value;
+
+ protected transient int hashCode;
+ protected transient String key;
+ protected transient SessionId parentId;
+
+ public ConsumerId() {
+ }
+
+ public ConsumerId(SessionId sessionId, long consumerId) {
+ this.connectionId = sessionId.getConnectionId();
+ this.sessionId = sessionId.getValue();
+ this.value = consumerId;
+ }
+
+ public ConsumerId(ConsumerId id) {
+ this.connectionId = id.getConnectionId();
+ this.sessionId = id.getSessionId();
+ this.value = id.getValue();
+ }
+
+ public SessionId getParentId() {
+ if (parentId == null) {
+ parentId = new SessionId(this);
+ }
+ return parentId;
+ }
+
+ public int hashCode() {
+ if (hashCode == 0) {
+ hashCode = connectionId.hashCode() ^ (int)sessionId ^ (int)value;
+ }
+ return hashCode;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || o.getClass() != ConsumerId.class) {
+ return false;
+ }
+ ConsumerId id = (ConsumerId)o;
+ return sessionId == id.sessionId && value == id.value && connectionId.equals(id.connectionId);
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public String toString() {
+ if (key == null) {
+ key = connectionId + ":" + sessionId + ":" + value;
+ }
+ return key;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(String connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getSessionId() {
+ return sessionId;
+ }
+
+ public void setSessionId(long sessionId) {
+ this.sessionId = sessionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getValue() {
+ return value;
+ }
+
+ public void setValue(long consumerId) {
+ this.value = consumerId;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerId.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerInfo.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerInfo.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerInfo.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerInfo.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,470 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.activemq.apollo.filter.BooleanExpression;
+
+/**
+ * @openwire:marshaller code="5"
+ * @version $Revision: 1.20 $
+ */
+public class ConsumerInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONSUMER_INFO;
+
+ public static final byte HIGH_PRIORITY = 10;
+ public static final byte NORMAL_PRIORITY = 0;
+ public static final byte NETWORK_CONSUMER_PRIORITY = -5;
+ public static final byte LOW_PRIORITY = -10;
+
+ protected ConsumerId consumerId;
+ protected ActiveMQDestination destination;
+ protected int prefetchSize;
+ protected int maximumPendingMessageLimit;
+ protected boolean browser;
+ protected boolean dispatchAsync;
+ protected String selector;
+ protected String subscriptionName;
+ protected boolean noLocal;
+ protected boolean exclusive;
+ protected boolean retroactive;
+ protected byte priority;
+ protected BrokerId[] brokerPath;
+ protected boolean optimizedAcknowledge;
+ // used by the broker
+ protected transient int currentPrefetchSize;
+ // if true, the consumer will not send range
+ protected boolean noRangeAcks;
+ // acks.
+
+ protected BooleanExpression additionalPredicate;
+ protected transient boolean networkSubscription; // this subscription
+ protected transient List<ConsumerId> networkConsumerIds; // the original consumerId
+
+ // not marshalled, populated from RemoveInfo, the last message delivered, used
+ // to suppress redelivery on prefetched messages after close
+ private transient long lastDeliveredSequenceId;
+
+ // originated from a
+ // network connection
+
+ public ConsumerInfo() {
+ }
+
+ public ConsumerInfo(ConsumerId consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ public ConsumerInfo(SessionInfo sessionInfo, long consumerId) {
+ this.consumerId = new ConsumerId(sessionInfo.getSessionId(), consumerId);
+ }
+
+ public ConsumerInfo copy() {
+ ConsumerInfo info = new ConsumerInfo();
+ copy(info);
+ return info;
+ }
+
+ public void copy(ConsumerInfo info) {
+ super.copy(info);
+ info.consumerId = consumerId;
+ info.destination = destination;
+ info.prefetchSize = prefetchSize;
+ info.maximumPendingMessageLimit = maximumPendingMessageLimit;
+ info.browser = browser;
+ info.dispatchAsync = dispatchAsync;
+ info.selector = selector;
+ info.subscriptionName = subscriptionName;
+ info.noLocal = noLocal;
+ info.exclusive = exclusive;
+ info.retroactive = retroactive;
+ info.priority = priority;
+ info.brokerPath = brokerPath;
+ info.networkSubscription = networkSubscription;
+ if (networkConsumerIds != null) {
+ if (info.networkConsumerIds==null){
+ info.networkConsumerIds=new ArrayList<ConsumerId>();
+ }
+ info.networkConsumerIds.addAll(networkConsumerIds);
+ }
+ }
+
+ public boolean isDurable() {
+ return subscriptionName != null;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * Is used to uniquely identify the consumer to the broker.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public ConsumerId getConsumerId() {
+ return consumerId;
+ }
+
+ public void setConsumerId(ConsumerId consumerId) {
+ this.consumerId = consumerId;
+ }
+
+ /**
+ * Is this consumer a queue browser?
+ *
+ * @openwire:property version=1
+ */
+ public boolean isBrowser() {
+ return browser;
+ }
+
+ public void setBrowser(boolean browser) {
+ this.browser = browser;
+ }
+
+ /**
+ * The destination that the consumer is interested in receiving messages
+ * from. This destination could be a composite destination.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * How many messages a broker will send to the client without receiving an
+ * ack before he stops dispatching messages to the client.
+ *
+ * @openwire:property version=1
+ */
+ public int getPrefetchSize() {
+ return prefetchSize;
+ }
+
+ public void setPrefetchSize(int prefetchSize) {
+ this.prefetchSize = prefetchSize;
+ this.currentPrefetchSize = prefetchSize;
+ }
+
+ /**
+ * How many messages a broker will keep around, above the prefetch limit,
+ * for non-durable topics before starting to discard older messages.
+ *
+ * @openwire:property version=1
+ */
+ public int getMaximumPendingMessageLimit() {
+ return maximumPendingMessageLimit;
+ }
+
+ public void setMaximumPendingMessageLimit(int maximumPendingMessageLimit) {
+ this.maximumPendingMessageLimit = maximumPendingMessageLimit;
+ }
+
+ /**
+ * Should the broker dispatch a message to the consumer async? If he does it
+ * async, then he uses a more SEDA style of processing while if it is not
+ * done async, then he broker use a STP style of processing. STP is more
+ * appropriate in high bandwidth situations or when being used by and in vm
+ * transport.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isDispatchAsync() {
+ return dispatchAsync;
+ }
+
+ public void setDispatchAsync(boolean dispatchAsync) {
+ this.dispatchAsync = dispatchAsync;
+ }
+
+ /**
+ * The JMS selector used to filter out messages that this consumer is
+ * interested in.
+ *
+ * @openwire:property version=1
+ */
+ public String getSelector() {
+ return selector;
+ }
+
+ public void setSelector(String selector) {
+ this.selector = selector;
+ }
+
+ /**
+ * Used to identify the name of a durable subscription.
+ *
+ * @openwire:property version=1
+ */
+ public String getSubscriptionName() {
+ return subscriptionName;
+ }
+
+ public void setSubscriptionName(String durableSubscriptionId) {
+ this.subscriptionName = durableSubscriptionId;
+ }
+
+ /**
+ * @deprecated
+ * @return
+ * @see getSubscriptionName
+ */
+ public String getSubcriptionName() {
+ return subscriptionName;
+ }
+
+ /**
+ * @deprecated
+ * @see setSubscriptionName
+ * @param durableSubscriptionId
+ */
+ public void setSubcriptionName(String durableSubscriptionId) {
+ this.subscriptionName = durableSubscriptionId;
+ }
+
+ /**
+ * Set noLocal to true to avoid receiving messages that were published
+ * locally on the same connection.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isNoLocal() {
+ return noLocal;
+ }
+
+ public void setNoLocal(boolean noLocal) {
+ this.noLocal = noLocal;
+ }
+
+ /**
+ * An exclusive consumer locks out other consumers from being able to
+ * receive messages from the destination. If there are multiple exclusive
+ * consumers for a destination, the first one created will be the exclusive
+ * consumer of the destination.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isExclusive() {
+ return exclusive;
+ }
+
+ public void setExclusive(boolean exclusive) {
+ this.exclusive = exclusive;
+ }
+
+ /**
+ * A retroactive consumer only has meaning for Topics. It allows a consumer
+ * to retroactively see messages sent prior to the consumer being created.
+ * If the consumer is not durable, it will be delivered the last message
+ * published to the topic. If the consumer is durable then it will receive
+ * all persistent messages that are still stored in persistent storage for
+ * that topic.
+ *
+ * @openwire:property version=1
+ */
+ public boolean isRetroactive() {
+ return retroactive;
+ }
+
+ public void setRetroactive(boolean retroactive) {
+ this.retroactive = retroactive;
+ }
+
+ public RemoveInfo createRemoveCommand() {
+ RemoveInfo command = new RemoveInfo(getConsumerId());
+ command.setResponseRequired(isResponseRequired());
+ return command;
+ }
+
+ /**
+ * The broker will avoid dispatching to a lower priority consumer if there
+ * are other higher priority consumers available to dispatch to. This allows
+ * letting the broker to have an affinity to higher priority consumers.
+ * Default priority is 0.
+ *
+ * @openwire:property version=1
+ */
+ public byte getPriority() {
+ return priority;
+ }
+
+ public void setPriority(byte priority) {
+ this.priority = priority;
+ }
+
+ /**
+ * The route of brokers the command has moved through.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public BrokerId[] getBrokerPath() {
+ return brokerPath;
+ }
+
+ public void setBrokerPath(BrokerId[] brokerPath) {
+ this.brokerPath = brokerPath;
+ }
+
+ /**
+ * A transient additional predicate that can be used it inject additional
+ * predicates into the selector on the fly. Handy if if say a Security
+ * Broker interceptor wants to filter out messages based on security level
+ * of the consumer.
+ *
+ * @openwire:property version=1
+ */
+ public BooleanExpression getAdditionalPredicate() {
+ return additionalPredicate;
+ }
+
+ public void setAdditionalPredicate(BooleanExpression additionalPredicate) {
+ this.additionalPredicate = additionalPredicate;
+ }
+
+ public Response visit(org.apache.activemq.apollo.openwire.support.state.CommandVisitor visitor) throws Exception {
+ return visitor.processAddConsumer(this);
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the networkSubscription.
+ */
+ public boolean isNetworkSubscription() {
+ return networkSubscription;
+ }
+
+ /**
+ * @param networkSubscription The networkSubscription to set.
+ */
+ public void setNetworkSubscription(boolean networkSubscription) {
+ this.networkSubscription = networkSubscription;
+ }
+
+ /**
+ * @openwire:property version=1
+ * @return Returns the optimizedAcknowledge.
+ */
+ public boolean isOptimizedAcknowledge() {
+ return optimizedAcknowledge;
+ }
+
+ /**
+ * @param optimizedAcknowledge The optimizedAcknowledge to set.
+ */
+ public void setOptimizedAcknowledge(boolean optimizedAcknowledge) {
+ this.optimizedAcknowledge = optimizedAcknowledge;
+ }
+
+ /**
+ * @return Returns the currentPrefetchSize.
+ */
+ public int getCurrentPrefetchSize() {
+ return currentPrefetchSize;
+ }
+
+ /**
+ * @param currentPrefetchSize The currentPrefetchSize to set.
+ */
+ public void setCurrentPrefetchSize(int currentPrefetchSize) {
+ this.currentPrefetchSize = currentPrefetchSize;
+ }
+
+ /**
+ * The broker may be able to optimize it's processing or provides better QOS
+ * if it knows the consumer will not be sending ranged acks.
+ *
+ * @return true if the consumer will not send range acks.
+ * @openwire:property version=1
+ */
+ public boolean isNoRangeAcks() {
+ return noRangeAcks;
+ }
+
+ public void setNoRangeAcks(boolean noRangeAcks) {
+ this.noRangeAcks = noRangeAcks;
+ }
+
+ public synchronized void addNetworkConsumerId(ConsumerId networkConsumerId) {
+ if (networkConsumerIds == null) {
+ networkConsumerIds = new ArrayList<ConsumerId>();
+ }
+ networkConsumerIds.add(networkConsumerId);
+ }
+
+ public synchronized void removeNetworkConsumerId(ConsumerId networkConsumerId) {
+ if (networkConsumerIds != null) {
+ networkConsumerIds.remove(networkConsumerId);
+ if (networkConsumerIds.isEmpty()) {
+ networkConsumerIds=null;
+ }
+ }
+ }
+
+ public synchronized boolean isNetworkConsumersEmpty() {
+ return networkConsumerIds == null || networkConsumerIds.isEmpty();
+ }
+
+ public synchronized List<ConsumerId> getNetworkConsumerIds(){
+ List<ConsumerId> result = new ArrayList<ConsumerId>();
+ if (networkConsumerIds != null) {
+ result.addAll(networkConsumerIds);
+ }
+ return result;
+ }
+
+ /**
+ * Tracks the original subscription id that causes a subscription to
+ * percolate through a network when networkTTL > 1. Tracking the original
+ * subscription allows duplicate suppression.
+ *
+ * @return array of the current subscription path
+ * @openwire:property version=4
+ */
+ public ConsumerId[] getNetworkConsumerPath() {
+ ConsumerId[] result = null;
+ if (networkConsumerIds != null) {
+ result = networkConsumerIds.toArray(new ConsumerId[0]);
+ }
+ return result;
+ }
+
+ public void setNetworkConsumerPath(ConsumerId[] consumerPath) {
+ if (consumerPath != null) {
+ for (int i=0; i<consumerPath.length; i++) {
+ addNetworkConsumerId(consumerPath[i]);
+ }
+ }
+ }
+
+ public void setLastDeliveredSequenceId(long lastDeliveredSequenceId) {
+ this.lastDeliveredSequenceId = lastDeliveredSequenceId;
+ }
+
+ public long getLastDeliveredSequenceId() {
+ return lastDeliveredSequenceId;
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ConsumerInfo.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ControlCommand.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ControlCommand.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ControlCommand.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ControlCommand.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.openwire.support.state.CommandVisitor;
+
+/**
+ * Used to start and stop transports as well as terminating clients.
+ *
+ * @openwire:marshaller code="14"
+ *
+ * @version $Revision: 1.1 $
+ */
+public class ControlCommand extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.CONTROL_COMMAND;
+
+ private String command;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getCommand() {
+ return command;
+ }
+
+ public void setCommand(String command) {
+ this.command = command;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processControlCommand(this);
+ }
+}
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataArrayResponse.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataArrayResponse.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataArrayResponse.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataArrayResponse.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * @openwire:marshaller code="33"
+ */
+public class DataArrayResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_ARRAY_RESPONSE;
+
+ DataStructure data[];
+
+
+ public DataArrayResponse() {
+ }
+
+ public DataArrayResponse(DataStructure data[]) {
+ this.data = data;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public DataStructure[] getData() {
+ return data;
+ }
+
+ public void setData(DataStructure[] data) {
+ this.data = data;
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataArrayResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataResponse.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataResponse.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataResponse.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataResponse.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ *
+ * @openwire:marshaller code="32"
+ */
+public class DataResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DATA_RESPONSE;
+
+ DataStructure data;
+
+ public DataResponse() {
+ }
+
+ public DataResponse(DataStructure data) {
+ this.data = data;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public DataStructure getData() {
+ return data;
+ }
+
+ public void setData(DataStructure data) {
+ this.data = data;
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataStructure.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataStructure.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataStructure.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataStructure.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ */
+public interface DataStructure {
+
+ /**
+ * @return The type of the data structure
+ */
+ byte getDataStructureType();
+ boolean isMarshallAware();
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DataStructure.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DestinationInfo.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DestinationInfo.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DestinationInfo.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DestinationInfo.java Wed Apr 27 17:32:51 2011
@@ -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.apollo.openwire.command;
+
+import java.io.IOException;
+
+import org.apache.activemq.apollo.openwire.support.state.CommandVisitor;
+
+/**
+ * Used to create and destroy destinations on the broker.
+ *
+ * @openwire:marshaller code="8"
+ * @version $Revision: 1.9 $
+ */
+public class DestinationInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DESTINATION_INFO;
+
+ public static final byte ADD_OPERATION_TYPE = 0;
+ public static final byte REMOVE_OPERATION_TYPE = 1;
+
+ protected ConnectionId connectionId;
+ protected ActiveMQDestination destination;
+ protected byte operationType;
+ protected long timeout;
+ protected BrokerId[] brokerPath;
+
+ public DestinationInfo() {
+ }
+
+ public DestinationInfo(ConnectionId connectionId, byte operationType, ActiveMQDestination destination) {
+ this.connectionId = connectionId;
+ this.operationType = operationType;
+ this.destination = destination;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public boolean isAddOperation() {
+ return operationType == ADD_OPERATION_TYPE;
+ }
+
+ public boolean isRemoveOperation() {
+ return operationType == REMOVE_OPERATION_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1 cache=true
+ */
+ public ConnectionId getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(ConnectionId connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ /**
+ * @openwire:property version=1 cache=true
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public byte getOperationType() {
+ return operationType;
+ }
+
+ public void setOperationType(byte operationType) {
+ this.operationType = operationType;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+ /**
+ * The route of brokers the command has moved through.
+ *
+ * @openwire:property version=1 cache=true
+ */
+ public BrokerId[] getBrokerPath() {
+ return brokerPath;
+ }
+
+ public void setBrokerPath(BrokerId[] brokerPath) {
+ this.brokerPath = brokerPath;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ if (isAddOperation()) {
+ return visitor.processAddDestination(this);
+ } else if (isRemoveOperation()) {
+ return visitor.processRemoveDestination(this);
+ }
+ throw new IOException("Unknown operation type: " + getOperationType());
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DestinationInfo.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DiscoveryEvent.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DiscoveryEvent.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DiscoveryEvent.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DiscoveryEvent.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * Represents a discovery event containing the details of the service
+ *
+ * @openwire:marshaller code="40"
+ * @version $Revision:$
+ */
+public class DiscoveryEvent implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.DISCOVERY_EVENT;
+
+ protected String serviceName;
+ protected String brokerName;
+
+ public DiscoveryEvent() {
+ }
+
+ public DiscoveryEvent(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getServiceName() {
+ return serviceName;
+ }
+
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getBrokerName() {
+ return brokerName;
+ }
+
+ public void setBrokerName(String name) {
+ this.brokerName = name;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/DiscoveryEvent.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/Endpoint.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/Endpoint.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/Endpoint.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/Endpoint.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * Represents the logical endpoint where commands come from or are sent to.
+ *
+ * For connection based transports like TCP / VM then there is a single endpoint
+ * for all commands. For transports like multicast there could be different
+ * endpoints being used on the same transport.
+ *
+ */
+public interface Endpoint {
+
+ /**
+ * Returns the name of the endpoint.
+ */
+ String getName();
+
+ /**
+ * Returns the broker ID for this endpoint, if the endpoint is a broker or
+ * null
+ */
+ BrokerId getBrokerId();
+
+ /**
+ * Returns the broker information for this endpoint, if the endpoint is a
+ * broker or null
+ */
+ BrokerInfo getBrokerInfo();
+
+ void setBrokerInfo(BrokerInfo brokerInfo);
+
+}
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ExceptionResponse.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ExceptionResponse.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ExceptionResponse.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ExceptionResponse.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * @openwire:marshaller code="31"
+ * @version $Revision: 1.4 $
+ */
+public class ExceptionResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.EXCEPTION_RESPONSE;
+
+ Throwable exception;
+
+ public ExceptionResponse() {
+ }
+
+ public ExceptionResponse(Throwable e) {
+ setException(e);
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public Throwable getException() {
+ return exception;
+ }
+
+ public void setException(Throwable exception) {
+ this.exception = exception;
+ }
+
+ public boolean isException() {
+ return true;
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/ExceptionResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/FlushCommand.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/FlushCommand.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/FlushCommand.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/FlushCommand.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.openwire.support.state.CommandVisitor;
+
+/**
+ * An indication to the transport layer that a flush is required.
+ *
+ * @openwire:marshaller code="15"
+ */
+public class FlushCommand extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.FLUSH_COMMAND;
+ public static final Command COMMAND = new FlushCommand();
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processFlush(this);
+ }
+
+}
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/IntegerResponse.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/IntegerResponse.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/IntegerResponse.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/IntegerResponse.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,50 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * @openwire:marshaller code="34"
+ */
+public class IntegerResponse extends Response {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.INTEGER_RESPONSE;
+
+ int result;
+
+ public IntegerResponse() {
+ }
+
+ public IntegerResponse(int result) {
+ this.result = result;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public int getResult() {
+ return result;
+ }
+
+ public void setResult(int result) {
+ this.result = result;
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/IntegerResponse.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalQueueAck.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalQueueAck.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalQueueAck.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalQueueAck.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="52"
+ */
+public class JournalQueueAck implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_REMOVE;
+
+ ActiveMQDestination destination;
+ MessageAck messageAck;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public MessageAck getMessageAck() {
+ return messageAck;
+ }
+
+ public void setMessageAck(MessageAck messageAck) {
+ this.messageAck = messageAck;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalQueueAck.class);
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalQueueAck.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTopicAck.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTopicAck.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTopicAck.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTopicAck.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,113 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.util.IntrospectionSupport;
+
+
+/**
+ * @openwire:marshaller code="50"
+ */
+public class JournalTopicAck implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_ACK;
+
+ ActiveMQDestination destination;
+ String clientId;
+ String subscritionName;
+ MessageId messageId;
+ long messageSequenceId;
+ TransactionId transactionId;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public ActiveMQDestination getDestination() {
+ return destination;
+ }
+
+ public void setDestination(ActiveMQDestination destination) {
+ this.destination = destination;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public MessageId getMessageId() {
+ return messageId;
+ }
+
+ public void setMessageId(MessageId messageId) {
+ this.messageId = messageId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getMessageSequenceId() {
+ return messageSequenceId;
+ }
+
+ public void setMessageSequenceId(long messageSequenceId) {
+ this.messageSequenceId = messageSequenceId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getSubscritionName() {
+ return subscritionName;
+ }
+
+ public void setSubscritionName(String subscritionName) {
+ this.subscritionName = subscritionName;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(String clientId) {
+ this.clientId = clientId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public TransactionId getTransactionId() {
+ return transactionId;
+ }
+
+ public void setTransactionId(TransactionId transaction) {
+ this.transactionId = transaction;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalTopicAck.class);
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTopicAck.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTrace.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTrace.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTrace.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTrace.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.util.IntrospectionSupport;
+
+
+/**
+ * @openwire:marshaller code="53"
+ * @version $Revision: 1.6 $
+ */
+public class JournalTrace implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRACE;
+
+ private String message;
+
+ public JournalTrace() {
+
+ }
+
+ public JournalTrace(String message) {
+ this.message = message;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalTrace.class);
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTrace.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTransaction.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTransaction.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTransaction.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTransaction.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.util.IntrospectionSupport;
+
+/**
+ * @openwire:marshaller code="54"
+ */
+public class JournalTransaction implements DataStructure {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.JOURNAL_TRANSACTION;
+
+ public static final byte XA_PREPARE = 1;
+ public static final byte XA_COMMIT = 2;
+ public static final byte XA_ROLLBACK = 3;
+ public static final byte LOCAL_COMMIT = 4;
+ public static final byte LOCAL_ROLLBACK = 5;
+
+ public byte type;
+ public boolean wasPrepared;
+ public TransactionId transactionId;
+
+ public JournalTransaction(byte type, TransactionId transactionId, boolean wasPrepared) {
+ this.type = type;
+ this.transactionId = transactionId;
+ this.wasPrepared = wasPrepared;
+ }
+
+ public JournalTransaction() {
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public TransactionId getTransactionId() {
+ return transactionId;
+ }
+
+ public void setTransactionId(TransactionId transactionId) {
+ this.transactionId = transactionId;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public byte getType() {
+ return type;
+ }
+
+ public void setType(byte type) {
+ this.type = type;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public boolean getWasPrepared() {
+ return wasPrepared;
+ }
+
+ public void setWasPrepared(boolean wasPrepared) {
+ this.wasPrepared = wasPrepared;
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, JournalTransaction.class);
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/JournalTransaction.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/KeepAliveInfo.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/KeepAliveInfo.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/KeepAliveInfo.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/KeepAliveInfo.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.util.IntrospectionSupport;
+import org.apache.activemq.apollo.openwire.support.state.CommandVisitor;
+
+/**
+ * @openwire:marshaller code="10"
+ */
+public class KeepAliveInfo extends BaseCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.KEEP_ALIVE_INFO;
+
+ private transient Endpoint from;
+ private transient Endpoint to;
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public boolean isResponse() {
+ return false;
+ }
+
+ public boolean isMessageDispatch() {
+ return false;
+ }
+
+ public boolean isMessage() {
+ return false;
+ }
+
+ public boolean isMessageAck() {
+ return false;
+ }
+
+ public boolean isBrokerInfo() {
+ return false;
+ }
+
+ public boolean isWireFormatInfo() {
+ return false;
+ }
+
+ /**
+ * The endpoint within the transport where this message came from.
+ */
+ public Endpoint getFrom() {
+ return from;
+ }
+
+ public void setFrom(Endpoint from) {
+ this.from = from;
+ }
+
+ /**
+ * The endpoint within the transport where this message is going to - null
+ * means all endpoints.
+ */
+ public Endpoint getTo() {
+ return to;
+ }
+
+ public void setTo(Endpoint to) {
+ this.to = to;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ return visitor.processKeepAlive(this);
+ }
+
+ public boolean isMarshallAware() {
+ return false;
+ }
+
+ public boolean isMessageDispatchNotification() {
+ return false;
+ }
+
+ public boolean isShutdownInfo() {
+ return false;
+ }
+
+ public String toString() {
+ return IntrospectionSupport.toString(this, KeepAliveInfo.class);
+ }
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/KeepAliveInfo.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LastPartialCommand.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LastPartialCommand.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LastPartialCommand.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LastPartialCommand.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,51 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import org.apache.activemq.apollo.openwire.support.state.CommandVisitor;
+
+/**
+ * Represents the end marker of a stream of {@link PartialCommand} instances.
+ *
+ * @openwire:marshaller code="61"
+ */
+public class LastPartialCommand extends PartialCommand {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.PARTIAL_LAST_COMMAND;
+
+ public LastPartialCommand() {
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public Response visit(CommandVisitor visitor) throws Exception {
+ throw new IllegalStateException("The transport layer should filter out LastPartialCommand instances but received: " + this);
+ }
+
+ /**
+ * Lets copy across any transient fields from this command
+ * to the complete command when it is unmarshalled on the other end
+ *
+ * @param completeCommand the newly unmarshalled complete command
+ */
+ public void configure(Command completeCommand) {
+ // copy across the transient properties added by the low level transport
+ completeCommand.setFrom(getFrom());
+ }
+}
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LocalTransactionId.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LocalTransactionId.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LocalTransactionId.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LocalTransactionId.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,117 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+/**
+ * @openwire:marshaller code="111"
+ * @version $Revision: 1.11 $
+ */
+public class LocalTransactionId extends TransactionId implements Comparable<LocalTransactionId> {
+
+ public static final byte DATA_STRUCTURE_TYPE = CommandTypes.ACTIVEMQ_LOCAL_TRANSACTION_ID;
+
+ protected ConnectionId connectionId;
+ protected long value;
+
+ private transient String transactionKey;
+ private transient int hashCode;
+
+ public LocalTransactionId() {
+ }
+
+ public LocalTransactionId(ConnectionId connectionId, long transactionId) {
+ this.connectionId = connectionId;
+ this.value = transactionId;
+ }
+
+ public byte getDataStructureType() {
+ return DATA_STRUCTURE_TYPE;
+ }
+
+ public boolean isXATransaction() {
+ return false;
+ }
+
+ public boolean isLocalTransaction() {
+ return true;
+ }
+
+ public String getTransactionKey() {
+ if (transactionKey == null) {
+ transactionKey = "TX:" + connectionId + ":" + value;
+ }
+ return transactionKey;
+ }
+
+ public String toString() {
+ return getTransactionKey();
+ }
+
+ public int hashCode() {
+ if (hashCode == 0) {
+ hashCode = connectionId.hashCode() ^ (int)value;
+ }
+ return hashCode;
+ }
+
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || o.getClass() != LocalTransactionId.class) {
+ return false;
+ }
+ LocalTransactionId tx = (LocalTransactionId)o;
+ return value == tx.value && connectionId.equals(tx.connectionId);
+ }
+
+ /**
+ * @param o
+ * @return
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(LocalTransactionId o) {
+ int result = connectionId.compareTo(o.connectionId);
+ if (result == 0) {
+ result = (int)(value - o.value);
+ }
+ return result;
+ }
+
+ /**
+ * @openwire:property version=1
+ */
+ public long getValue() {
+ return value;
+ }
+
+ public void setValue(long transactionId) {
+ this.value = transactionId;
+ }
+
+ /**
+ * @openwire:property version=1 cache=true
+ */
+ public ConnectionId getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(ConnectionId connectionId) {
+ this.connectionId = connectionId;
+ }
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/LocalTransactionId.java
------------------------------------------------------------------------------
svn:executable = *
Added: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MarshallAware.java
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MarshallAware.java?rev=1097189&view=auto
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MarshallAware.java (added)
+++ activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MarshallAware.java Wed Apr 27 17:32:51 2011
@@ -0,0 +1,33 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.apollo.openwire.command;
+
+import java.io.IOException;
+
+import org.apache.activemq.apollo.openwire.codec.OpenWireFormat;
+
+public interface MarshallAware {
+
+ void beforeMarshall(OpenWireFormat wireFormat) throws IOException;
+
+ void afterMarshall(OpenWireFormat wireFormat) throws IOException;
+
+ void beforeUnmarshall(OpenWireFormat wireFormat) throws IOException;
+
+ void afterUnmarshall(OpenWireFormat wireFormat) throws IOException;
+
+}
Propchange: activemq/activemq-apollo/trunk/apollo-openwire/src/main/scala/org/apache/activemq/apollo/openwire/command/MarshallAware.java
------------------------------------------------------------------------------
svn:executable = *