Fixed typo in subscriptionName property name in the ConsumerInfo object. Left the previous getters and setters but deprectaed them.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@467090 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-10-23 19:07:10 +00:00
parent 2ccbdb8657
commit 333158a031
18 changed files with 61 additions and 44 deletions

View File

@ -678,7 +678,7 @@ public class ActiveMQConnection implements Connection, TopicConnection, QueueCon
ConsumerInfo info = new ConsumerInfo(new ConsumerId(sessionId, consumerIdGenerator
.getNextSequenceId()));
info.setDestination(ActiveMQMessageTransformation.transformDestination(topic));
info.setSubcriptionName(subscriptionName);
info.setSubscriptionName(subscriptionName);
info.setSelector(messageSelector);
info.setPrefetchSize(maxMessages);
info.setDispatchAsync(dispatchAsync);

View File

@ -84,7 +84,7 @@ public class ActiveMQInputStream extends InputStream implements ActiveMQDispatch
}
this.info = new ConsumerInfo(consumerId);
this.info.setSubcriptionName(name);
this.info.setSubscriptionName(name);
if (selector != null && selector.trim().length() != 0) {
selector = "JMSType='org.apache.activemq.Stream' AND ( "+selector+" ) ";

View File

@ -164,7 +164,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
this.redeliveryPolicy = session.connection.getRedeliveryPolicy();
this.info = new ConsumerInfo(consumerId);
this.info.setSubcriptionName(name);
this.info.setSubscriptionName(name);
this.info.setPrefetchSize(prefetch);
this.info.setCurrentPrefetchSize(prefetch);
this.info.setMaximumPendingMessageLimit(maximumPendingMessageCount);
@ -234,7 +234,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
* @return the consumer name - used for durable consumers
*/
protected String getConsumerName() {
return this.info.getSubcriptionName();
return this.info.getSubscriptionName();
}
/**
@ -271,7 +271,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
* @return true if this is a durable topic subscriber
*/
public boolean isDurableSubscriber() {
return info.getSubcriptionName()!=null && info.getDestination().isTopic();
return info.getSubscriptionName()!=null && info.getDestination().isTopic();
}
/**

View File

@ -163,7 +163,7 @@ public class BrokerView implements BrokerViewMBean {
consumerId.setValue(0);
info.setConsumerId(consumerId);
info.setDestination(new ActiveMQTopic(topicName));
info.setSubcriptionName(subscriberName);
info.setSubscriptionName(subscriberName);
info.setSelector(selector);
Subscription subscription = broker.addConsumer(context, info);
broker.removeConsumer(context, info);

View File

@ -39,7 +39,7 @@ public class DurableSubscriptionView extends SubscriptionView implements Durabl
public DurableSubscriptionView(ManagedRegionBroker broker,String clientId,Subscription sub){
super(clientId,sub);
this.broker = broker;
this.subscriptionName = sub.getConsumerInfo().getSubcriptionName();
this.subscriptionName = sub.getConsumerInfo().getSubscriptionName();
}
/**

View File

@ -180,10 +180,10 @@ public class ManagedRegionBroker extends RegionBroker {
String clientId="clientId="+JMXSupport.encodeObjectNamePart(context.getClientId());
String persistentMode="persistentMode=";
String consumerId="";
SubscriptionKey key=new SubscriptionKey(context.getClientId(),sub.getConsumerInfo().getSubcriptionName());
SubscriptionKey key=new SubscriptionKey(context.getClientId(),sub.getConsumerInfo().getSubscriptionName());
if(sub.getConsumerInfo().isDurable()){
persistentMode+="Durable, subscriptionID="
+JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getSubcriptionName());
+JMXSupport.encodeObjectNamePart(sub.getConsumerInfo().getSubscriptionName());
}else{
persistentMode+="Non-Durable";
if(sub.getConsumerInfo()!=null&&sub.getConsumerInfo().getConsumerId()!=null){

View File

@ -221,7 +221,7 @@ public class SubscriptionView implements SubscriptionViewMBean {
*/
public String getSubcriptionName() {
ConsumerInfo info = getConsumerInfo();
return info != null ? info.getSubcriptionName() : null;
return info != null ? info.getSubscriptionName() : null;
}
/**

View File

@ -44,7 +44,7 @@ public class DurableTopicSubscription extends PrefetchSubscription {
public DurableTopicSubscription(Broker broker,ConnectionContext context, ConsumerInfo info, boolean keepDurableSubsActive,PendingMessageCursor cursor) throws InvalidSelectorException {
super(broker,context,info,cursor);
this.keepDurableSubsActive = keepDurableSubsActive;
subscriptionKey = new SubscriptionKey(context.getClientId(), info.getSubcriptionName());
subscriptionKey = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
}
synchronized public boolean isActive() {

View File

@ -70,7 +70,7 @@ public class TopicRegion extends AbstractRegion {
lookup(context,destination);
}
String clientId=context.getClientId();
String subcriptionName=info.getSubcriptionName();
String subcriptionName=info.getSubscriptionName();
SubscriptionKey key=new SubscriptionKey(clientId,subcriptionName);
DurableTopicSubscription sub=(DurableTopicSubscription)durableSubscriptions.get(key);
if(sub!=null){
@ -114,7 +114,7 @@ public class TopicRegion extends AbstractRegion {
public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception {
if (info.isDurable()) {
SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubcriptionName());
SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
DurableTopicSubscription sub = (DurableTopicSubscription) durableSubscriptions.get(key);
if (sub != null) {
sub.deactivate(keepDurableSubsActive);
@ -189,7 +189,7 @@ public class TopicRegion extends AbstractRegion {
private ConsumerInfo createInactiveConsumerInfo(SubscriptionInfo info) {
ConsumerInfo rc = new ConsumerInfo();
rc.setSelector(info.getSelector());
rc.setSubcriptionName(info.getSubcriptionName());
rc.setSubscriptionName(info.getSubcriptionName());
rc.setDestination(info.getDestination());
rc.setConsumerId(createConsumerId());
return rc;
@ -213,11 +213,11 @@ public class TopicRegion extends AbstractRegion {
if (AdvisorySupport.isAdvisoryTopic(info.getDestination())){
throw new JMSException("Cannot create a durable subscription for an advisory Topic");
}
SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubcriptionName());
SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
DurableTopicSubscription sub = (DurableTopicSubscription) durableSubscriptions.get(key);
if(sub==null){
PendingMessageCursor cursor=broker.getPendingDurableSubscriberPolicy().getSubscriberPendingMessageCursor(
context.getClientId(),info.getSubcriptionName(),broker.getTempDataStore(),
context.getClientId(),info.getSubscriptionName(),broker.getTempDataStore(),
info.getPrefetchSize());
sub=new DurableTopicSubscription(broker,context,info,keepDurableSubsActive,cursor);
durableSubscriptions.put(key,sub);

View File

@ -43,7 +43,7 @@ public class ConsumerInfo extends BaseCommand {
protected boolean browser;
protected boolean dispatchAsync;
protected String selector;
protected String subcriptionName;
protected String subscriptionName;
protected boolean noLocal;
protected boolean exclusive;
protected boolean retroactive;
@ -82,7 +82,7 @@ public class ConsumerInfo extends BaseCommand {
info.browser = browser;
info.dispatchAsync = dispatchAsync;
info.selector = selector;
info.subcriptionName=subcriptionName;
info.subscriptionName=subscriptionName;
info.noLocal = noLocal;
info.exclusive = exclusive;
info.retroactive = retroactive;
@ -91,7 +91,7 @@ public class ConsumerInfo extends BaseCommand {
}
public boolean isDurable() {
return subcriptionName!=null;
return subscriptionName!=null;
}
public byte getDataStructureType() {
@ -197,13 +197,30 @@ public class ConsumerInfo extends BaseCommand {
*
* @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 subcriptionName;
return subscriptionName;
}
/**
* @deprecated
* @see setSubscriptionName
* @param durableSubscriptionId
*/
public void setSubcriptionName(String durableSubscriptionId) {
this.subcriptionName = durableSubscriptionId;
}
this.subscriptionName = durableSubscriptionId;
}
/**
* Set noLocal to true to avoid receiving messages that were published locally on the same connection.
*

View File

@ -58,7 +58,7 @@ public class DurableConduitBridge extends ConduitBridge{
if(isPermissableDestination(dest) && !doesConsumerExist(dest)){
DemandSubscription sub=createDemandSubscription(dest);
if(dest.isTopic()){
sub.getLocalInfo().setSubcriptionName(getSubscriberName(dest));
sub.getLocalInfo().setSubscriptionName(getSubscriberName(dest));
}
try{
addSubscription(sub);
@ -86,7 +86,7 @@ public class DurableConduitBridge extends ConduitBridge{
if(info.isDurable()){
// set the subscriber name to something reproducible
info.setSubcriptionName(getSubscriberName(info.getDestination()));
info.setSubscriptionName(getSubscriberName(info.getDestination()));
}
return doCreateDemandSubscription(info);
}

View File

@ -151,7 +151,7 @@ public class ForwardingBridge implements Bridge {
if( connectionInfo.getClientId()!=null ) {
topicConsumerInfo = new ConsumerInfo(sessionInfo, 2);
topicConsumerInfo.setDispatchAsync(dispatchAsync);
topicConsumerInfo.setSubcriptionName("topic-bridge");
topicConsumerInfo.setSubscriptionName("topic-bridge");
topicConsumerInfo.setRetroactive(true);
topicConsumerInfo.setDestination(new ActiveMQTopic(destinationFilter));
topicConsumerInfo.setPrefetchSize(prefetchSize);

View File

@ -73,7 +73,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
info.setMaximumPendingMessageLimit(dataIn.readInt());
info.setDispatchAsync(bs.readBoolean());
info.setSelector(tightUnmarshalString(dataIn, bs));
info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
info.setNoLocal(bs.readBoolean());
info.setExclusive(bs.readBoolean());
info.setRetroactive(bs.readBoolean());
@ -111,7 +111,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
bs.writeBoolean(info.isDispatchAsync());
rc += tightMarshalString1(info.getSelector(), bs);
rc += tightMarshalString1(info.getSubcriptionName(), bs);
rc += tightMarshalString1(info.getSubscriptionName(), bs);
bs.writeBoolean(info.isNoLocal());
bs.writeBoolean(info.isExclusive());
bs.writeBoolean(info.isRetroactive());
@ -142,7 +142,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
dataOut.writeInt(info.getMaximumPendingMessageLimit());
bs.readBoolean();
tightMarshalString2(info.getSelector(), dataOut, bs);
tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
@ -173,7 +173,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
info.setMaximumPendingMessageLimit(dataIn.readInt());
info.setDispatchAsync(dataIn.readBoolean());
info.setSelector(looseUnmarshalString(dataIn));
info.setSubcriptionName(looseUnmarshalString(dataIn));
info.setSubscriptionName(looseUnmarshalString(dataIn));
info.setNoLocal(dataIn.readBoolean());
info.setExclusive(dataIn.readBoolean());
info.setRetroactive(dataIn.readBoolean());
@ -213,7 +213,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
dataOut.writeInt(info.getMaximumPendingMessageLimit());
dataOut.writeBoolean(info.isDispatchAsync());
looseMarshalString(info.getSelector(), dataOut);
looseMarshalString(info.getSubcriptionName(), dataOut);
looseMarshalString(info.getSubscriptionName(), dataOut);
dataOut.writeBoolean(info.isNoLocal());
dataOut.writeBoolean(info.isExclusive());
dataOut.writeBoolean(info.isRetroactive());

View File

@ -73,7 +73,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
info.setMaximumPendingMessageLimit(dataIn.readInt());
info.setDispatchAsync(bs.readBoolean());
info.setSelector(tightUnmarshalString(dataIn, bs));
info.setSubcriptionName(tightUnmarshalString(dataIn, bs));
info.setSubscriptionName(tightUnmarshalString(dataIn, bs));
info.setNoLocal(bs.readBoolean());
info.setExclusive(bs.readBoolean());
info.setRetroactive(bs.readBoolean());
@ -111,7 +111,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs);
bs.writeBoolean(info.isDispatchAsync());
rc += tightMarshalString1(info.getSelector(), bs);
rc += tightMarshalString1(info.getSubcriptionName(), bs);
rc += tightMarshalString1(info.getSubscriptionName(), bs);
bs.writeBoolean(info.isNoLocal());
bs.writeBoolean(info.isExclusive());
bs.writeBoolean(info.isRetroactive());
@ -142,7 +142,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
dataOut.writeInt(info.getMaximumPendingMessageLimit());
bs.readBoolean();
tightMarshalString2(info.getSelector(), dataOut, bs);
tightMarshalString2(info.getSubcriptionName(), dataOut, bs);
tightMarshalString2(info.getSubscriptionName(), dataOut, bs);
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
@ -173,7 +173,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
info.setMaximumPendingMessageLimit(dataIn.readInt());
info.setDispatchAsync(dataIn.readBoolean());
info.setSelector(looseUnmarshalString(dataIn));
info.setSubcriptionName(looseUnmarshalString(dataIn));
info.setSubscriptionName(looseUnmarshalString(dataIn));
info.setNoLocal(dataIn.readBoolean());
info.setExclusive(dataIn.readBoolean());
info.setRetroactive(dataIn.readBoolean());
@ -213,7 +213,7 @@ public class ConsumerInfoMarshaller extends BaseCommandMarshaller {
dataOut.writeInt(info.getMaximumPendingMessageLimit());
dataOut.writeBoolean(info.isDispatchAsync());
looseMarshalString(info.getSelector(), dataOut);
looseMarshalString(info.getSubcriptionName(), dataOut);
looseMarshalString(info.getSubscriptionName(), dataOut);
dataOut.writeBoolean(info.isNoLocal());
dataOut.writeBoolean(info.isExclusive());
dataOut.writeBoolean(info.isRetroactive());

View File

@ -329,7 +329,7 @@ public class BrokerTest extends BrokerTestSupport {
ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
consumerInfo1.setPrefetchSize(100);
consumerInfo1.setSubcriptionName("test");
consumerInfo1.setSubscriptionName("test");
connection1.send(consumerInfo1);
// Send the messages
@ -357,7 +357,7 @@ public class BrokerTest extends BrokerTestSupport {
SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
consumerInfo2.setPrefetchSize(100);
consumerInfo2.setSubcriptionName("test");
consumerInfo2.setSubscriptionName("test");
connection2.send(connectionInfo2);
connection2.send(sessionInfo2);
@ -462,7 +462,7 @@ public class BrokerTest extends BrokerTestSupport {
// Create the durable subscription.
ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
if( durableConsumer ) {
consumerInfo1.setSubcriptionName("test");
consumerInfo1.setSubscriptionName("test");
}
consumerInfo1.setPrefetchSize(100);
connection1.send(consumerInfo1);
@ -511,7 +511,7 @@ public class BrokerTest extends BrokerTestSupport {
// Create the durable subscription.
ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
if( durableConsumer ) {
consumerInfo1.setSubcriptionName("test");
consumerInfo1.setSubscriptionName("test");
}
consumerInfo1.setPrefetchSize(100);
consumerInfo1.setRetroactive(true);

View File

@ -140,7 +140,7 @@ public class RecoveryBrokerTest extends BrokerRestartTestSupport {
// Create the durable subscription.
ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
consumerInfo1.setSubcriptionName("test");
consumerInfo1.setSubscriptionName("test");
consumerInfo1.setPrefetchSize(100);
connection1.send(consumerInfo1);
@ -166,7 +166,7 @@ public class RecoveryBrokerTest extends BrokerRestartTestSupport {
// Re-open the subscription.
ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
consumerInfo2.setSubcriptionName("test");
consumerInfo2.setSubscriptionName("test");
consumerInfo2.setPrefetchSize(100);
connection2.send(consumerInfo2);

View File

@ -58,7 +58,7 @@ public class ConsumerInfoTest extends BaseCommandTestSupport {
info.setMaximumPendingMessageLimit(2);
info.setDispatchAsync(false);
info.setSelector("Selector:3");
info.setSubcriptionName("SubcriptionName:4");
info.setSubscriptionName("SubcriptionName:4");
info.setNoLocal(true);
info.setExclusive(false);
info.setRetroactive(true);

View File

@ -58,7 +58,7 @@ public class ConsumerInfoTest extends BaseCommandTestSupport {
info.setMaximumPendingMessageLimit(2);
info.setDispatchAsync(false);
info.setSelector("Selector:3");
info.setSubcriptionName("SubcriptionName:4");
info.setSubscriptionName("SubcriptionName:4");
info.setNoLocal(true);
info.setExclusive(false);
info.setRetroactive(true);