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 2007/08/09 02:34:40 UTC
svn commit: r564057 [4/13] - in /activemq/trunk/activemq-core/src:
main/java/org/apache/activemq/ main/java/org/apache/activemq/advisory/
main/java/org/apache/activemq/blob/ main/java/org/apache/activemq/broker/
main/java/org/apache/activemq/broker/ft/...
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFileAppender.java Wed Aug 8 17:34:07 2007
@@ -230,7 +230,7 @@
public void close() throws IOException {
synchronized (enqueueMutex) {
- if (shutdown == false) {
+ if (!shutdown) {
shutdown = true;
if (running) {
enqueueMutex.notifyAll();
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/BaseContainerImpl.java Wed Aug 8 17:34:07 2007
@@ -21,9 +21,9 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+
import org.apache.activemq.kaha.ContainerId;
import org.apache.activemq.kaha.RuntimeStoreException;
-import org.apache.activemq.kaha.Store;
import org.apache.activemq.kaha.StoreEntry;
import org.apache.activemq.kaha.impl.DataManager;
import org.apache.activemq.kaha.impl.data.Item;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerCollectionSupport.java Wed Aug 8 17:34:07 2007
@@ -16,26 +16,24 @@
*/
package org.apache.activemq.kaha.impl.container;
-
/**
* Base class for container collections
*
* @version $Revision: 1.2 $
*/
-class ContainerCollectionSupport{
-
+class ContainerCollectionSupport {
+
protected MapContainerImpl container;
-
- protected ContainerCollectionSupport(MapContainerImpl container){
+
+ protected ContainerCollectionSupport(MapContainerImpl container) {
this.container = container;
}
-
- public int size(){
+
+ public int size() {
return container.size();
}
-
- public boolean isEmpty(){
+ public boolean isEmpty() {
return container.isEmpty();
}
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerKeySet.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+
import org.apache.activemq.kaha.impl.index.IndexItem;
-import org.apache.activemq.kaha.impl.index.IndexLinkedList;
/**
* A Set of keys for the container
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ContainerValueCollection.java Wed Aug 8 17:34:07 2007
@@ -19,7 +19,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import org.apache.activemq.kaha.impl.index.IndexItem;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/container/ListContainerImpl.java Wed Aug 8 17:34:07 2007
@@ -18,9 +18,9 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
-import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
+
import org.apache.activemq.kaha.ContainerId;
import org.apache.activemq.kaha.ListContainer;
import org.apache.activemq.kaha.Marshaller;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java Wed Aug 8 17:34:07 2007
@@ -15,12 +15,9 @@
package org.apache.activemq.kaha.impl.index;
import java.io.File;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-import java.util.LinkedList;
-import org.apache.activemq.kaha.StoreEntry;
+
import org.apache.activemq.kaha.impl.DataManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/VMIndexLinkedList.java Wed Aug 8 17:34:07 2007
@@ -161,7 +161,7 @@
* org.apache.activemq.kaha.impl.IndexItem)
*/
public void add(int index, IndexItem element) {
- addBefore(element, (index == size ? root : entry(index)));
+ addBefore(element, index == size ? root : entry(index));
}
/*
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashBin.java Wed Aug 8 17:34:07 2007
@@ -13,12 +13,12 @@
*/
package org.apache.activemq.kaha.impl.index.hash;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* Bin in a HashIndex
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashPage.java Wed Aug 8 17:34:07 2007
@@ -13,15 +13,15 @@
*/
package org.apache.activemq.kaha.impl.index.hash;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+
+import org.apache.activemq.kaha.Marshaller;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* A Page within a HashPage
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreePage.java Wed Aug 8 17:34:07 2007
@@ -13,10 +13,6 @@
*/
package org.apache.activemq.kaha.impl.index.tree;
-import org.apache.activemq.kaha.Marshaller;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -25,9 +21,13 @@
import java.util.List;
import java.util.Set;
+import org.apache.activemq.kaha.Marshaller;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
* Page in a BTree
- *
+ *
* @version $Revision: 1.1.1.1 $
*/
class TreePage {
@@ -52,7 +52,7 @@
/**
* Constructor
- *
+ *
* @param tree
* @param id
* @param parentId
@@ -67,7 +67,7 @@
/**
* Constructor
- *
+ *
* @param maximumEntries
*/
public TreePage(int maximumEntries) {
@@ -82,14 +82,14 @@
public boolean equals(Object o) {
boolean result = false;
if (o instanceof TreePage) {
- TreePage other = (TreePage) o;
+ TreePage other = (TreePage)o;
result = other.id == id;
}
return result;
}
public int hashCode() {
- return (int) id;
+ return (int)id;
}
boolean isActive() {
@@ -190,8 +190,7 @@
void setParentId(long newId) throws IOException {
if (newId == this.id) {
- throw new IllegalStateException("Cannot set page as a child of itself " + this + " trying to set parentId = "
- + newId);
+ throw new IllegalStateException("Cannot set page as a child of itself " + this + " trying to set parentId = " + newId);
}
this.parentId = newId;
tree.writePage(this);
@@ -242,12 +241,10 @@
int cmp = te.compareTo(key);
if (cmp == 0) {
return te;
- }
- else if (cmp < 0) {
+ } else if (cmp < 0) {
low = mid + 1;
pageId = te.getNextPageId();
- }
- else {
+ } else {
high = mid - 1;
pageId = te.getPrevPageId();
}
@@ -264,12 +261,10 @@
if (isRoot()) {
if (isEmpty()) {
insertTreeEntry(0, newEntry);
- }
- else {
+ } else {
result = doInsert(null, newEntry);
}
- }
- else {
+ } else {
throw new IllegalStateException("insert() should not be called on non root page - " + this);
}
return result;
@@ -281,8 +276,7 @@
if (!isEmpty()) {
result = doRemove(entry);
}
- }
- else {
+ } else {
throw new IllegalStateException("remove() should not be called on non root page");
}
return result;
@@ -302,27 +296,23 @@
newEntry.setIndexOffset(oldValue);
result = newEntry;
save();
- }
- else if (closestPage != null) {
+ } else if (closestPage != null) {
result = closestPage.doInsert(closest.getFlavour(), newEntry);
- }
- else {
+ } else {
if (!isFull()) {
insertTreeEntry(closest.getIndex(), newEntry);
save();
- }
- else {
+ } else {
doOverflow(flavour, newEntry);
}
}
- }
- else {
+ } else {
if (!isFull()) {
doInsertEntry(newEntry);
save();
- }
- else {
- // need to insert the new entry and propogate up the hightest value
+ } else {
+ // need to insert the new entry and propogate up the hightest
+ // value
doOverflow(flavour, newEntry);
}
}
@@ -335,10 +325,10 @@
if (!isFull()) {
doInsertEntry(newEntry);
save();
- }
- else {
+ } else {
if (!isRoot() && flavour != null) {
- // we aren't the root, but to ensure the correct distribution we need to
+ // we aren't the root, but to ensure the correct distribution we
+ // need to
// insert the new entry and take a node of the end of the page
// and pass that up the tree to find a home
doInsertEntry(newEntry);
@@ -346,8 +336,7 @@
theEntry = removeTreeEntry(0);
theEntry.reset();
theEntry.setNextPageId(getId());
- }
- else {
+ } else {
theEntry = removeTreeEntry(size() - 1);
theEntry.reset();
theEntry.setPrevPageId(getId());
@@ -356,11 +345,10 @@
result = getParent().doOverflow(flavour, theEntry);
if (!theEntry.equals(newEntry)) {
- //the newEntry stayed here
+ // the newEntry stayed here
result = this;
}
- }
- else {
+ } else {
// so we are the root and need to split
doInsertEntry(newEntry);
int midIndex = (size() / 2);
@@ -370,7 +358,8 @@
TreePage newRoot = tree.createRoot();
newRoot.setLeaf(false);
this.setParentId(newRoot.getId());
- save(); // we are no longer root - need to save - we maybe looked up v. soon!
+ save(); // we are no longer root - need to save - we maybe
+ // looked up v. soon!
TreePage rightPage = tree.createPage(newRoot.getId());
rightPage.setEntries(subList);
rightPage.checkLeaf();
@@ -402,8 +391,7 @@
save();
// ensure we don't loose children
doUnderflow(result, index);
- }
- else if (closestPage != null) {
+ } else if (closestPage != null) {
closestPage.doRemove(entry);
}
}
@@ -441,8 +429,7 @@
if (!page.isEmpty()) {
copy.setNextPageId(page.getId());
page.setParentId(this.id);
- }
- else {
+ } else {
page.setLeaf(true);
}
int replacementIndex = doInsertEntry(copy);
@@ -450,8 +437,7 @@
// page removed so update our replacement
resetPageReference(replacementIndex, copy.getNextPageId());
copy.setNextPageId(TreeEntry.NOT_SET);
- }
- else {
+ } else {
page.save();
}
save();
@@ -466,16 +452,17 @@
if (page != null && !page.isEmpty()) {
TreeEntry replacement = page.removeTreeEntry(page.getEntries().size() - 1);
TreeEntry copy = replacement.copy();
- // check children pages of the replacement point to the correct place
+ // check children pages of the replacement point to the
+ // correct place
checkParentIdForRemovedPageEntry(copy, page.getId(), getId());
if (!page.isEmpty()) {
copy.setPrevPageId(page.getId());
- }
- else {
+ } else {
page.setLeaf(true);
}
insertTreeEntry(index, copy);
- TreePage landed = null;// if we overflow - the page the replacement ends up on
+ TreePage landed = null;// if we overflow - the page the
+ // replacement ends up on
TreeEntry removed = null;
if (isOverflowed()) {
TreePage parent = getParent();
@@ -485,8 +472,7 @@
if (flavour == Flavour.LESS) {
removed = removeTreeEntry(0);
landed = parent.doOverflow(flavour, removed);
- }
- else {
+ } else {
removed = removeTreeEntry(size() - 1);
landed = parent.doOverflow(Flavour.MORE, removed);
}
@@ -501,8 +487,7 @@
landed.resetPageReference(copy.getNextPageId());
copy.setPrevPageId(TreeEntry.NOT_SET);
landed.save();
- }
- else {
+ } else {
page.save();
}
save();
@@ -522,13 +507,15 @@
private boolean doUnderflowLeaf() throws IOException {
boolean result = false;
- // if we have unerflowed - and we are a leaf - push entries further up the tree
+ // if we have unerflowed - and we are a leaf - push entries further up
+ // the tree
// and delete ourselves
if (isUnderflowed() && isLeaf()) {
List<TreeEntry> list = new ArrayList<TreeEntry>(treeEntries);
treeEntries.clear();
for (TreeEntry entry : list) {
- // need to check for each iteration - we might get promoted to root
+ // need to check for each iteration - we might get promoted to
+ // root
TreePage parent = getParent();
if (parent != null) {
Flavour flavour = getFlavour(parent, entry);
@@ -555,8 +542,7 @@
TreeEntry last = page.getEntries().get(page.getEntries().size() - 1);
if (last.compareTo(entry) > 0) {
result = Flavour.MORE;
- }
- else {
+ } else {
result = Flavour.LESS;
}
}
@@ -614,13 +600,11 @@
low = mid + 1;
pageId = treeEntry.getNextPageId();
flavour = Flavour.LESS;
- }
- else if (cmp > 0) {
+ } else if (cmp > 0) {
high = mid - 1;
pageId = treeEntry.getPrevPageId();
flavour = Flavour.MORE;
- }
- else {
+ } else {
// got exact match
low = mid;
break;
@@ -642,8 +626,7 @@
int cmp = midVal.compareTo(newEntry);
if (cmp < 0) {
low = mid + 1;
- }
- else if (cmp > 0) {
+ } else if (cmp > 0) {
high = mid - 1;
}
}
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/CountStatisticImpl.java Wed Aug 8 17:34:07 2007
@@ -16,9 +16,9 @@
*/
package org.apache.activemq.management;
-import javax.management.j2ee.statistics.CountStatistic;
-
import java.util.concurrent.atomic.AtomicLong;
+
+import javax.management.j2ee.statistics.CountStatistic;
/**
* A count statistic implementation
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSConnectionStatsImpl.java Wed Aug 8 17:34:07 2007
@@ -16,13 +16,14 @@
*/
package org.apache.activemq.management;
+import java.util.List;
+
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.util.IndentPrinter;
-import java.util.List;
/**
* Statistics for a JMS connection
- *
+ *
* @version $Revision: 1.2 $
*/
public class JMSConnectionStatsImpl extends StatsImpl {
@@ -40,7 +41,7 @@
int size = sessionArray.length;
JMSSessionStatsImpl[] answer = new JMSSessionStatsImpl[size];
for (int i = 0; i < size; i++) {
- ActiveMQSession session = (ActiveMQSession) sessionArray[i];
+ ActiveMQSession session = (ActiveMQSession)sessionArray[i];
answer[i] = session.getSessionStats();
}
return answer;
@@ -53,19 +54,18 @@
stats[i].reset();
}
}
-
+
/**
* @param enabled the enabled to set
*/
- public void setEnabled(boolean enabled){
+ public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
JMSSessionStatsImpl[] stats = getSessions();
for (int i = 0, size = stats.length; i < size; i++) {
stats[i].setEnabled(enabled);
}
-
- }
+ }
public boolean isTransactional() {
return transactional;
@@ -92,7 +92,7 @@
out.incrementIndent();
JMSSessionStatsImpl[] array = getSessions();
for (int i = 0; i < array.length; i++) {
- JMSSessionStatsImpl sessionStat = (JMSSessionStatsImpl) array[i];
+ JMSSessionStatsImpl sessionStat = (JMSSessionStatsImpl)array[i];
out.printIndent();
out.println("session {");
out.incrementIndent();
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSSessionStatsImpl.java Wed Aug 8 17:34:07 2007
@@ -17,7 +17,6 @@
package org.apache.activemq.management;
import java.util.List;
-import javax.management.j2ee.statistics.*;
import org.apache.activemq.ActiveMQMessageConsumer;
import org.apache.activemq.ActiveMQMessageProducer;
@@ -65,7 +64,7 @@
int size = producerArray.length;
JMSProducerStatsImpl[] answer = new JMSProducerStatsImpl[size];
for (int i = 0; i < size; i++) {
- ActiveMQMessageProducer producer = (ActiveMQMessageProducer) producerArray[i];
+ ActiveMQMessageProducer producer = (ActiveMQMessageProducer)producerArray[i];
answer[i] = producer.getProducerStats();
}
return answer;
@@ -77,12 +76,12 @@
int size = consumerArray.length;
JMSConsumerStatsImpl[] answer = new JMSConsumerStatsImpl[size];
for (int i = 0; i < size; i++) {
- ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer) consumerArray[i];
+ ActiveMQMessageConsumer consumer = (ActiveMQMessageConsumer)consumerArray[i];
answer[i] = consumer.getConsumerStats();
}
return answer;
}
-
+
public void reset() {
super.reset();
JMSConsumerStatsImpl[] cstats = getConsumers();
@@ -94,11 +93,11 @@
pstats[i].reset();
}
}
-
+
/**
* @param enabled the enabled to set
*/
- public void setEnabled(boolean enabled){
+ public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
JMSConsumerStatsImpl[] cstats = getConsumers();
for (int i = 0, size = cstats.length; i < size; i++) {
@@ -108,7 +107,7 @@
for (int i = 0, size = pstats.length; i < size; i++) {
pstats[i].setEnabled(enabled);
}
-
+
}
public CountStatisticImpl getMessageCount() {
@@ -193,7 +192,7 @@
out.incrementIndent();
JMSProducerStatsImpl[] producerArray = getProducers();
for (int i = 0; i < producerArray.length; i++) {
- JMSProducerStatsImpl producer = (JMSProducerStatsImpl) producerArray[i];
+ JMSProducerStatsImpl producer = (JMSProducerStatsImpl)producerArray[i];
producer.dump(out);
}
out.decrementIndent();
@@ -205,7 +204,7 @@
out.incrementIndent();
JMSConsumerStatsImpl[] consumerArray = getConsumers();
for (int i = 0; i < consumerArray.length; i++) {
- JMSConsumerStatsImpl consumer = (JMSConsumerStatsImpl) consumerArray[i];
+ JMSConsumerStatsImpl consumer = (JMSConsumerStatsImpl)consumerArray[i];
consumer.dump(out);
}
out.decrementIndent();
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/JMSStatsImpl.java Wed Aug 8 17:34:07 2007
@@ -17,15 +17,14 @@
package org.apache.activemq.management;
import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.util.IndentPrinter;
-import java.util.concurrent.CopyOnWriteArrayList;
-
/**
* Statistics for a number of JMS connections
- *
+ *
* @version $Revision: 1.2 $
*/
public class JMSStatsImpl extends StatsImpl {
@@ -39,7 +38,7 @@
int size = connectionArray.length;
JMSConnectionStatsImpl[] answer = new JMSConnectionStatsImpl[size];
for (int i = 0; i < size; i++) {
- ActiveMQConnection connection = (ActiveMQConnection) connectionArray[i];
+ ActiveMQConnection connection = (ActiveMQConnection)connectionArray[i];
answer[i] = connection.getConnectionStats();
}
return answer;
@@ -59,7 +58,7 @@
out.incrementIndent();
JMSConnectionStatsImpl[] array = getConnections();
for (int i = 0; i < array.length; i++) {
- JMSConnectionStatsImpl connectionStat = (JMSConnectionStatsImpl) array[i];
+ JMSConnectionStatsImpl connectionStat = (JMSConnectionStatsImpl)array[i];
connectionStat.dump(out);
}
out.decrementIndent();
@@ -67,16 +66,16 @@
out.println("}");
out.flush();
}
-
+
/**
* @param enabled the enabled to set
*/
- public void setEnabled(boolean enabled){
+ public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
JMSConnectionStatsImpl[] stats = getConnections();
for (int i = 0, size = stats.length; i < size; i++) {
stats[i].setEnabled(enabled);
}
-
+
}
}
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/management/StatsImpl.java Wed Aug 8 17:34:07 2007
@@ -20,13 +20,12 @@
import javax.management.j2ee.statistics.Statistic;
import javax.management.j2ee.statistics.Stats;
-
/**
* Base class for a Stats implementation
- *
+ *
* @version $Revision: 1.2 $
*/
-public class StatsImpl extends StatisticImpl implements Stats, Resettable{
+public class StatsImpl extends StatisticImpl implements Stats, Resettable {
private Map map;
public StatsImpl() {
@@ -43,14 +42,14 @@
for (int i = 0, size = stats.length; i < size; i++) {
Statistic stat = stats[i];
if (stat instanceof Resettable) {
- Resettable r = (Resettable) stat;
+ Resettable r = (Resettable)stat;
r.reset();
}
}
}
public Statistic getStatistic(String name) {
- return (Statistic) map.get(name);
+ return (Statistic)map.get(name);
}
public String[] getStatisticNames() {
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/CacheEvictionUsageListener.java Wed Aug 8 17:34:07 2007
@@ -18,14 +18,13 @@
import java.util.Iterator;
import java.util.LinkedList;
+import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.activemq.thread.Task;
import org.apache.activemq.thread.TaskRunner;
import org.apache.activemq.thread.TaskRunnerFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.CopyOnWriteArrayList;
public class CacheEvictionUsageListener implements UsageListener {
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java Wed Aug 8 17:34:07 2007
@@ -16,10 +16,10 @@
*/
package org.apache.activemq.memory;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.ArrayList;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.activemq.Service;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/MessageQueue.java Wed Aug 8 17:34:07 2007
@@ -16,14 +16,14 @@
*/
package org.apache.activemq.memory.buffer;
-import org.apache.activemq.broker.region.MessageReference;
-import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.command.Message;
-
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+
+import org.apache.activemq.broker.region.MessageReference;
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.Message;
/**
* Allows messages to be added to the end of the buffer such that they are kept
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/buffer/SizeBasedMessageBuffer.java Wed Aug 8 17:34:07 2007
@@ -69,7 +69,7 @@
size += delta;
while (size > limit) {
- MessageQueue biggest = (MessageQueue) bubbleList.get(0);
+ MessageQueue biggest = (MessageQueue)bubbleList.get(0);
size -= biggest.evictMessage();
bubbleDown(biggest, 0);
@@ -80,7 +80,7 @@
public void clear() {
synchronized (lock) {
for (Iterator iter = bubbleList.iterator(); iter.hasNext();) {
- MessageQueue queue = (MessageQueue) iter.next();
+ MessageQueue queue = (MessageQueue)iter.next();
queue.clear();
}
size = 0;
@@ -91,11 +91,10 @@
// lets bubble up to head of queueif we need to
int position = queue.getPosition();
while (--position >= 0) {
- MessageQueue pivot = (MessageQueue) bubbleList.get(position);
+ MessageQueue pivot = (MessageQueue)bubbleList.get(position);
if (pivot.getSize() < queueSize) {
swap(position, pivot, position + 1, queue);
- }
- else {
+ } else {
break;
}
}
@@ -104,11 +103,10 @@
protected void bubbleDown(MessageQueue biggest, int position) {
int queueSize = biggest.getSize();
for (int second = position + 1, end = bubbleList.size(); second < end; second++) {
- MessageQueue pivot = (MessageQueue) bubbleList.get(second);
+ MessageQueue pivot = (MessageQueue)bubbleList.get(second);
if (pivot.getSize() > queueSize) {
swap(position, biggest, second, pivot);
- }
- else {
+ } else {
break;
}
position = second;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/CompositeDemandForwardingBridge.java Wed Aug 8 17:34:07 2007
@@ -16,6 +16,8 @@
*/
package org.apache.activemq.network;
+import java.io.IOException;
+
import org.apache.activemq.command.BrokerId;
import org.apache.activemq.command.BrokerInfo;
import org.apache.activemq.command.Command;
@@ -24,8 +26,6 @@
import org.apache.activemq.command.NetworkBridgeFilter;
import org.apache.activemq.transport.Transport;
import org.apache.activemq.util.ServiceSupport;
-
-import java.io.IOException;
/**
* A demand forwarding bridge which works with multicast style transports where
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/ConduitBridge.java Wed Aug 8 17:34:07 2007
@@ -16,17 +16,17 @@
*/
package org.apache.activemq.network;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.apache.activemq.command.ConsumerId;
import org.apache.activemq.command.ConsumerInfo;
import org.apache.activemq.filter.DestinationFilter;
import org.apache.activemq.transport.Transport;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
/**
* Consolidates subscriptions
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridge.java Wed Aug 8 17:34:07 2007
@@ -16,6 +16,8 @@
*/
package org.apache.activemq.network;
+import java.io.IOException;
+
import org.apache.activemq.command.BrokerId;
import org.apache.activemq.command.BrokerInfo;
import org.apache.activemq.command.Command;
@@ -23,8 +25,6 @@
import org.apache.activemq.command.NetworkBridgeFilter;
import org.apache.activemq.transport.Transport;
import org.apache.activemq.util.ServiceSupport;
-
-import java.io.IOException;
/**
* Forwards messages from the local broker to the remote broker based on demand.
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandForwardingBridgeSupport.java Wed Aug 8 17:34:07 2007
@@ -266,7 +266,7 @@
protected void startRemoteBridge() throws Exception {
if (remoteBridgeStarted.compareAndSet(false, true)) {
synchronized (this) {
- if (isCreatedByDuplex() == false) {
+ if (!isCreatedByDuplex()) {
BrokerInfo brokerInfo = new BrokerInfo();
brokerInfo.setBrokerName(configuration.getBrokerName());
brokerInfo.setNetworkConnection(true);
@@ -436,7 +436,7 @@
// Create a new local subscription
ConsumerInfo info = (ConsumerInfo)data;
BrokerId[] path = info.getBrokerPath();
- if ((path != null && path.length >= networkTTL)) {
+ if (path != null && path.length >= networkTTL) {
if (log.isDebugEnabled())
log.debug(configuration.getBrokerName() + " Ignoring Subscription " + info + " restricted to " + networkTTL + " network hops only");
return;
@@ -466,16 +466,18 @@
// infomation about temporary destinations
DestinationInfo destInfo = (DestinationInfo)data;
BrokerId[] path = destInfo.getBrokerPath();
- if ((path != null && path.length >= networkTTL)) {
- if (log.isDebugEnabled())
+ if (path != null && path.length >= networkTTL) {
+ if (log.isDebugEnabled()) {
log.debug("Ignoring Subscription " + destInfo + " restricted to " + networkTTL + " network hops only");
+ }
return;
}
if (contains(destInfo.getBrokerPath(), localBrokerPath[0])) {
// Ignore this consumer as it's a consumer we locally sent to
// the broker.
- if (log.isDebugEnabled())
+ if (log.isDebugEnabled()) {
log.debug("Ignoring sub " + destInfo + " already routed through this broker once");
+ }
return;
}
destInfo.setConnectionId(localConnectionInfo.getConnectionId());
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DemandSubscription.java Wed Aug 8 17:34:07 2007
@@ -16,13 +16,12 @@
*/
package org.apache.activemq.network;
+import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.command.ConsumerId;
import org.apache.activemq.command.ConsumerInfo;
-
-import java.util.Set;
/**
* Represents a network bridge interface
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DiscoveryNetworkConnector.java Wed Aug 8 17:34:07 2007
@@ -20,6 +20,7 @@
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Iterator;
+import java.util.concurrent.ConcurrentHashMap;
import org.apache.activemq.command.DiscoveryEvent;
import org.apache.activemq.transport.Transport;
@@ -29,8 +30,6 @@
import org.apache.activemq.transport.discovery.DiscoveryListener;
import org.apache.activemq.util.ServiceStopper;
import org.apache.activemq.util.ServiceSupport;
-
-import java.util.concurrent.ConcurrentHashMap;
/**
* A network connector which uses a discovery agent to detect the remote brokers
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/DurableConduitBridge.java Wed Aug 8 17:34:07 2007
@@ -16,6 +16,9 @@
*/
package org.apache.activemq.network;
+import java.io.IOException;
+import java.util.Iterator;
+
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.ConsumerId;
import org.apache.activemq.command.ConsumerInfo;
@@ -23,9 +26,6 @@
import org.apache.activemq.transport.Transport;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
-import java.io.IOException;
-import java.util.Iterator;
/**
* Consolidates subscriptions
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/MulticastNetworkConnector.java Wed Aug 8 17:34:07 2007
@@ -16,11 +16,11 @@
*/
package org.apache.activemq.network;
+import java.net.URI;
+
import org.apache.activemq.transport.Transport;
import org.apache.activemq.transport.TransportFactory;
import org.apache.activemq.util.ServiceStopper;
-
-import java.net.URI;
/**
* A network connector which uses some kind of multicast-like transport that
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/DestinationBridge.java Wed Aug 8 17:34:07 2007
@@ -18,10 +18,6 @@
import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.activemq.Service;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
@@ -31,6 +27,10 @@
import javax.jms.MessageProducer;
import javax.naming.NamingException;
+import org.apache.activemq.Service;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
/**
* A Destination bridge is used to bridge between to different JMS systems
*
@@ -53,8 +53,7 @@
}
/**
- * @param consumer
- * The consumer to set.
+ * @param consumer The consumer to set.
*/
public void setConsumer(MessageConsumer consumer) {
this.consumer = consumer;
@@ -121,25 +120,21 @@
Destination replyTo = message.getJMSReplyTo();
if (replyTo != null) {
converted = jmsMessageConvertor.convert(message, processReplyToDestination(replyTo));
- }
- else {
+ } else {
converted = jmsMessageConvertor.convert(message);
}
- }
- else {
+ } else {
message.setJMSReplyTo(null);
converted = jmsMessageConvertor.convert(message);
}
sendMessage(converted);
message.acknowledge();
- }
- catch (Exception e) {
+ } catch (Exception e) {
log.error("failed to forward message on attempt: " + (++attempt) + " reason: " + e + " message: " + message, e);
if (maximumRetries > 0 && attempt >= maximumRetries) {
try {
stop();
- }
- catch (Exception e1) {
+ } catch (Exception e1) {
log.warn("Failed to stop cleanly", e1);
}
}
@@ -155,8 +150,7 @@
}
/**
- * @param doHandleReplyTo
- * The doHandleReplyTo to set.
+ * @param doHandleReplyTo The doHandleReplyTo to set.
*/
protected void setDoHandleReplyTo(boolean doHandleReplyTo) {
this.doHandleReplyTo = doHandleReplyTo;
@@ -175,8 +169,7 @@
protected void restartProducer() throws JMSException, NamingException {
try {
getConnectionForProducer().close();
- }
- catch (Exception e) {
+ } catch (Exception e) {
log.debug("Ignoring failure to close producer connection: " + e, e);
}
jmsConnector.restartProducerConnection();
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsConnector.java Wed Aug 8 17:34:07 2007
@@ -19,6 +19,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.Connection;
import javax.jms.Destination;
@@ -33,9 +35,6 @@
import org.apache.commons.logging.LogFactory;
import org.springframework.jndi.JndiTemplate;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.atomic.AtomicBoolean;
-
/**
* This bridge joins the gap between foreign JMS providers and ActiveMQ As some
* JMS providers are still only 1.0.1 compliant, this bridge itself aimed to be
@@ -62,29 +61,28 @@
protected String localPassword;
private String name;
- protected LRUCache replyToBridges = createLRUCache();
-
- static private LRUCache createLRUCache() {
- return new LRUCache() {
- private static final long serialVersionUID = -7446792754185879286L;
-
- protected boolean removeEldestEntry(Map.Entry enty) {
- if (size() > maxCacheSize) {
- Iterator iter = entrySet().iterator();
- Map.Entry lru = (Map.Entry) iter.next();
- remove(lru.getKey());
- DestinationBridge bridge = (DestinationBridge) lru.getValue();
- try {
- bridge.stop();
- log.info("Expired bridge: " + bridge);
- }
- catch (Exception e) {
- log.warn("stopping expired bridge" + bridge + " caused an exception", e);
- }
- }
- return false;
- }
- };
+ protected LRUCache replyToBridges = createLRUCache();
+
+ static private LRUCache createLRUCache() {
+ return new LRUCache() {
+ private static final long serialVersionUID = -7446792754185879286L;
+
+ protected boolean removeEldestEntry(Map.Entry enty) {
+ if (size() > maxCacheSize) {
+ Iterator iter = entrySet().iterator();
+ Map.Entry lru = (Map.Entry)iter.next();
+ remove(lru.getKey());
+ DestinationBridge bridge = (DestinationBridge)lru.getValue();
+ try {
+ bridge.stop();
+ log.info("Expired bridge: " + bridge);
+ } catch (Exception e) {
+ log.warn("stopping expired bridge" + bridge + " caused an exception", e);
+ }
+ }
+ return false;
+ }
+ };
}
/**
@@ -113,11 +111,11 @@
init();
if (started.compareAndSet(false, true)) {
for (int i = 0; i < inboundBridges.size(); i++) {
- DestinationBridge bridge = (DestinationBridge) inboundBridges.get(i);
+ DestinationBridge bridge = (DestinationBridge)inboundBridges.get(i);
bridge.start();
}
for (int i = 0; i < outboundBridges.size(); i++) {
- DestinationBridge bridge = (DestinationBridge) outboundBridges.get(i);
+ DestinationBridge bridge = (DestinationBridge)outboundBridges.get(i);
bridge.start();
}
log.info("JMS Connector " + getName() + " Started");
@@ -127,11 +125,11 @@
public void stop() throws Exception {
if (started.compareAndSet(true, false)) {
for (int i = 0; i < inboundBridges.size(); i++) {
- DestinationBridge bridge = (DestinationBridge) inboundBridges.get(i);
+ DestinationBridge bridge = (DestinationBridge)inboundBridges.get(i);
bridge.stop();
}
for (int i = 0; i < outboundBridges.size(); i++) {
- DestinationBridge bridge = (DestinationBridge) outboundBridges.get(i);
+ DestinationBridge bridge = (DestinationBridge)outboundBridges.get(i);
bridge.stop();
}
log.info("JMS Connector " + getName() + " Stopped");
@@ -158,8 +156,7 @@
}
/**
- * @param jndiTemplate
- * The jndiTemplate to set.
+ * @param jndiTemplate The jndiTemplate to set.
*/
public void setJndiLocalTemplate(JndiTemplate jndiTemplate) {
this.jndiLocalTemplate = jndiTemplate;
@@ -173,8 +170,7 @@
}
/**
- * @param jndiOutboundTemplate
- * The jndiOutboundTemplate to set.
+ * @param jndiOutboundTemplate The jndiOutboundTemplate to set.
*/
public void setJndiOutboundTemplate(JndiTemplate jndiOutboundTemplate) {
this.jndiOutboundTemplate = jndiOutboundTemplate;
@@ -188,8 +184,7 @@
}
/**
- * @param inboundMessageConvertor
- * The inboundMessageConvertor to set.
+ * @param inboundMessageConvertor The inboundMessageConvertor to set.
*/
public void setInboundMessageConvertor(JmsMesageConvertor jmsMessageConvertor) {
this.inboundMessageConvertor = jmsMessageConvertor;
@@ -203,8 +198,7 @@
}
/**
- * @param outboundMessageConvertor
- * The outboundMessageConvertor to set.
+ * @param outboundMessageConvertor The outboundMessageConvertor to set.
*/
public void setOutboundMessageConvertor(JmsMesageConvertor outboundMessageConvertor) {
this.outboundMessageConvertor = outboundMessageConvertor;
@@ -218,8 +212,8 @@
}
/**
- * @param replyToDestinationCacheSize
- * The replyToDestinationCacheSize to set.
+ * @param replyToDestinationCacheSize The replyToDestinationCacheSize to
+ * set.
*/
public void setReplyToDestinationCacheSize(int replyToDestinationCacheSize) {
this.replyToDestinationCacheSize = replyToDestinationCacheSize;
@@ -233,8 +227,7 @@
}
/**
- * @param localPassword
- * The localPassword to set.
+ * @param localPassword The localPassword to set.
*/
public void setLocalPassword(String localPassword) {
this.localPassword = localPassword;
@@ -248,8 +241,7 @@
}
/**
- * @param localUsername
- * The localUsername to set.
+ * @param localUsername The localUsername to set.
*/
public void setLocalUsername(String localUsername) {
this.localUsername = localUsername;
@@ -263,8 +255,7 @@
}
/**
- * @param outboundPassword
- * The outboundPassword to set.
+ * @param outboundPassword The outboundPassword to set.
*/
public void setOutboundPassword(String outboundPassword) {
this.outboundPassword = outboundPassword;
@@ -278,8 +269,7 @@
}
/**
- * @param outboundUsername
- * The outboundUsername to set.
+ * @param outboundUsername The outboundUsername to set.
*/
public void setOutboundUsername(String outboundUsername) {
this.outboundUsername = outboundUsername;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/JmsQueueConnector.java Wed Aug 8 17:34:07 2007
@@ -16,9 +16,6 @@
*/
package org.apache.activemq.network.jms;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.JMSException;
@@ -28,6 +25,9 @@
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.naming.NamingException;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* A Bridge to other JMS Queue providers
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/network/jms/QueueBridge.java Wed Aug 8 17:34:07 2007
@@ -17,7 +17,6 @@
package org.apache.activemq.network.jms;
import javax.jms.Connection;
-import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
@@ -27,7 +26,6 @@
import javax.jms.QueueSender;
import javax.jms.QueueSession;
import javax.jms.Session;
-import javax.jms.Topic;
/**
* A Destination bridge is used to bridge between to different JMS systems
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/BooleanStream.java Wed Aug 8 17:34:07 2007
@@ -17,9 +17,7 @@
package org.apache.activemq.openwire;
import java.io.DataInput;
-import java.io.DataInputStream;
import java.io.DataOutput;
-import java.io.DataOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/CommandIdComparator.java Wed Aug 8 17:34:07 2007
@@ -16,9 +16,9 @@
*/
package org.apache.activemq.openwire;
-import org.apache.activemq.command.Command;
-
import java.util.Comparator;
+
+import org.apache.activemq.command.Command;
/**
* A @{link Comparator} of commands using their {@link Command#getCommandId()}
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/DataStreamMarshaller.java Wed Aug 8 17:34:07 2007
@@ -17,9 +17,7 @@
package org.apache.activemq.openwire;
import java.io.DataInput;
-import java.io.DataInputStream;
import java.io.DataOutput;
-import java.io.DataOutputStream;
import java.io.IOException;
import org.apache.activemq.command.DataStructure;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQBytesMessageMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQBytesMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQDestinationMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,9 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQDestination;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMapMessageMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQMapMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQMessageMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQObjectMessageMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQObjectMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQQueueMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQStreamMessageMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQStreamMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempDestinationMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,8 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempQueueMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQTempQueue;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTempTopicMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQTempTopic;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTextMessageMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQTextMessage;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ActiveMQTopicMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseCommandMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,9 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.BaseCommand;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BaseDataStreamMarshaller.java Wed Aug 8 17:34:07 2007
@@ -63,11 +63,11 @@
bs.writeBoolean(false);
bs.writeBoolean(false);
return 0;
- } else if ((o & 0xFFFFFFFFFFFF0000l) == 0) {
+ } else if ((o & 0xFFFFFFFFFFFF0000L) == 0) {
bs.writeBoolean(false);
bs.writeBoolean(true);
return 2;
- } else if ((o & 0xFFFFFFFF00000000l) == 0) {
+ } else if ((o & 0xFFFFFFFF00000000L) == 0) {
bs.writeBoolean(true);
bs.writeBoolean(false);
return 4;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerIdMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.BrokerId;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/BrokerInfoMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,32 +21,30 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
-
+import org.apache.activemq.command.BrokerInfo;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
/**
- * Marshalling code for Open Wire Format for BrokerInfoMarshaller
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- * if you need to make a change, please see the modify the groovy scripts in the
- * under src/gram/script and then use maven openwire:generate to regenerate
- * this file.
- *
+ * Marshalling code for Open Wire Format for BrokerInfoMarshaller NOTE!: This
+ * file is auto generated - do not modify! if you need to make a change, please
+ * see the modify the groovy scripts in the under src/gram/script and then use
+ * maven openwire:generate to regenerate this file.
+ *
* @version $Revision$
*/
public class BrokerInfoMarshaller extends BaseCommandMarshaller {
/**
* Return the type of Data Structure we marshal
+ *
* @return short representation of the type data structure
*/
public byte getDataStructureType() {
return BrokerInfo.DATA_STRUCTURE_TYPE;
}
-
+
/**
* @return a new object instance
*/
@@ -56,7 +54,7 @@
/**
* 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
@@ -65,18 +63,17 @@
super.tightUnmarshal(wireFormat, o, dataIn, bs);
BrokerInfo info = (BrokerInfo)o;
- info.setBrokerId((org.apache.activemq.command.BrokerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
+ info.setBrokerId((org.apache.activemq.command.BrokerId)tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setBrokerURL(tightUnmarshalString(dataIn, bs));
if (bs.readBoolean()) {
short size = dataIn.readShort();
org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
- for( int i=0; i < size; i++ ) {
- value[i] = (org.apache.activemq.command.BrokerInfo) tightUnmarsalNestedObject(wireFormat,dataIn, bs);
+ for (int i = 0; i < size; i++) {
+ value[i] = (org.apache.activemq.command.BrokerInfo)tightUnmarsalNestedObject(wireFormat, dataIn, bs);
}
info.setPeerBrokerInfos(value);
- }
- else {
+ } else {
info.setPeerBrokerInfos(null);
}
info.setBrokerName(tightUnmarshalString(dataIn, bs));
@@ -86,7 +83,6 @@
}
-
/**
* Write the booleans that this object uses to a BooleanStream
*/
@@ -108,7 +104,7 @@
/**
* 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
@@ -129,7 +125,7 @@
/**
* 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
@@ -138,18 +134,17 @@
super.looseUnmarshal(wireFormat, o, dataIn);
BrokerInfo info = (BrokerInfo)o;
- info.setBrokerId((org.apache.activemq.command.BrokerId) looseUnmarsalCachedObject(wireFormat, dataIn));
+ info.setBrokerId((org.apache.activemq.command.BrokerId)looseUnmarsalCachedObject(wireFormat, dataIn));
info.setBrokerURL(looseUnmarshalString(dataIn));
if (dataIn.readBoolean()) {
short size = dataIn.readShort();
org.apache.activemq.command.BrokerInfo value[] = new org.apache.activemq.command.BrokerInfo[size];
- for( int i=0; i < size; i++ ) {
- value[i] = (org.apache.activemq.command.BrokerInfo) looseUnmarsalNestedObject(wireFormat,dataIn);
+ for (int i = 0; i < size; i++) {
+ value[i] = (org.apache.activemq.command.BrokerInfo)looseUnmarsalNestedObject(wireFormat, dataIn);
}
info.setPeerBrokerInfos(value);
- }
- else {
+ } else {
info.setPeerBrokerInfos(null);
}
info.setBrokerName(looseUnmarshalString(dataIn));
@@ -158,7 +153,6 @@
info.setFaultTolerantConfiguration(dataIn.readBoolean());
}
-
/**
* Write the booleans that this object uses to a BooleanStream
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionControlMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ConnectionControl;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionErrorMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ConnectionError;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionIdMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ConnectionId;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConnectionInfoMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ConnectionInfo;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;
/**
* Marshalling code for Open Wire Format for ConnectionInfoMarshaller
Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/openwire/v1/ConsumerControlMarshaller.java Wed Aug 8 17:34:07 2007
@@ -21,8 +21,10 @@
import java.io.DataOutput;
import java.io.IOException;
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
+import org.apache.activemq.command.ConsumerControl;
+import org.apache.activemq.command.DataStructure;
+import org.apache.activemq.openwire.BooleanStream;
+import org.apache.activemq.openwire.OpenWireFormat;