removed RedeliveryPolicy from openwire and moved into the client package

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@366118 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-01-05 08:22:59 +00:00
parent 9b64c37c4c
commit c8d74e7113
10 changed files with 6 additions and 117 deletions

View File

@ -61,7 +61,6 @@ import org.apache.activemq.command.Message;
import org.apache.activemq.command.MessageDispatch;
import org.apache.activemq.command.MessageId;
import org.apache.activemq.command.ProducerId;
import org.apache.activemq.command.RedeliveryPolicy;
import org.apache.activemq.command.RemoveSubscriptionInfo;
import org.apache.activemq.command.Response;
import org.apache.activemq.command.SessionId;

View File

@ -30,7 +30,6 @@ import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
import javax.naming.Context;
import org.apache.activemq.command.RedeliveryPolicy;
import org.apache.activemq.management.JMSStatsImpl;
import org.apache.activemq.management.StatsCapable;
import org.apache.activemq.management.StatsImpl;

View File

@ -33,7 +33,6 @@ import org.apache.activemq.command.ConsumerId;
import org.apache.activemq.command.ConsumerInfo;
import org.apache.activemq.command.MessageAck;
import org.apache.activemq.command.MessageDispatch;
import org.apache.activemq.command.RedeliveryPolicy;
import org.apache.activemq.management.JMSConsumerStatsImpl;
import org.apache.activemq.management.StatsCapable;
import org.apache.activemq.management.StatsImpl;

View File

@ -64,7 +64,6 @@ import org.apache.activemq.command.MessageAck;
import org.apache.activemq.command.MessageDispatch;
import org.apache.activemq.command.MessageId;
import org.apache.activemq.command.ProducerId;
import org.apache.activemq.command.RedeliveryPolicy;
import org.apache.activemq.command.Response;
import org.apache.activemq.command.SessionId;
import org.apache.activemq.command.SessionInfo;

View File

@ -14,7 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.command;
package org.apache.activemq;
import org.apache.activemq.command.CommandTypes;
import org.apache.activemq.command.DataStructure;
/**
* Configuration options used to control how messages are re-delivered when

View File

@ -64,7 +64,6 @@ public class MarshallerFactory {
add(new XATransactionIdMarshaller());
add(new JournalTraceMarshaller());
add(new FlushCommandMarshaller());
add(new RedeliveryPolicyMarshaller());
add(new ConsumerIdMarshaller());
add(new JournalTopicAckMarshaller());
add(new ActiveMQTextMessageMarshaller());

View File

@ -1,108 +0,0 @@
/**
*
* Copyright 2005-2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.activemq.openwire.v1;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.activemq.openwire.*;
import org.apache.activemq.command.*;
/**
* Marshalling code for Open Wire Format for RedeliveryPolicy
*
*
* NOTE!: This file is auto generated - do not modify!
* if you need to make a change, please see the modify the groovy scripts in the
* under src/gram/script and then use maven openwire:generate to regenerate
* this file.
*
* @version $Revision$
*/
public class RedeliveryPolicyMarshaller extends org.apache.activemq.openwire.DataStreamMarshaller {
/**
* Return the type of Data Structure we marshal
* @return short representation of the type data structure
*/
public byte getDataStructureType() {
return RedeliveryPolicy.DATA_STRUCTURE_TYPE;
}
/**
* @return a new object instance
*/
public DataStructure createObject() {
return new RedeliveryPolicy();
}
/**
* 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 unmarshal(OpenWireFormat wireFormat, Object o, DataInputStream dataIn, BooleanStream bs) throws IOException {
super.unmarshal(wireFormat, o, dataIn, bs);
RedeliveryPolicy info = (RedeliveryPolicy)o;
info.setBackOffMultiplier(dataIn.readShort());
info.setInitialRedeliveryDelay(unmarshalLong(wireFormat, dataIn, bs));
info.setMaximumRedeliveries(dataIn.readInt());
info.setUseExponentialBackOff(bs.readBoolean());
}
/**
* Write the booleans that this object uses to a BooleanStream
*/
public int marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
RedeliveryPolicy info = (RedeliveryPolicy)o;
int rc = super.marshal1(wireFormat, o, bs);
rc+=marshal1Long(wireFormat, info.getInitialRedeliveryDelay(), bs);
bs.writeBoolean(info.isUseExponentialBackOff());
return rc+6;
}
/**
* 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 marshal2(OpenWireFormat wireFormat, Object o, DataOutputStream dataOut, BooleanStream bs) throws IOException {
super.marshal2(wireFormat, o, dataOut, bs);
RedeliveryPolicy info = (RedeliveryPolicy)o;
dataOut.writeShort(info.getBackOffMultiplier());
marshal2Long(wireFormat, info.getInitialRedeliveryDelay(), dataOut, bs);
dataOut.writeInt(info.getMaximumRedeliveries());
bs.readBoolean();
}
}

View File

@ -24,7 +24,6 @@ import javax.jms.TextMessage;
import junit.framework.Test;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.RedeliveryPolicy;
/**
* Test cases used to test the JMS message exclusive consumers.

View File

@ -18,8 +18,8 @@ package org.apache.activemq.broker.policy;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.RedeliveryPolicy;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.RedeliveryPolicy;
import javax.jms.Destination;
import javax.jms.Message;

View File

@ -125,7 +125,7 @@ public class JmsSendReceiveTestSupport extends TestSupport implements MessageLis
if (data.length != copyOfMessages.size()) {
for (Iterator iter = copyOfMessages.iterator(); iter.hasNext();) {
TextMessage message = (TextMessage) iter.next();
log.info("<== " + counter++ + " = " + message);
log.info("<== " + counter++ + " = " + message.getText());
}
}