http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java index 453a87c..7670740 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractRemotingConnection.java @@ -45,6 +45,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { this.creationTime = System.currentTimeMillis(); } + @Override public List<FailureListener> getFailureListeners() { return new ArrayList<FailureListener>(failureListeners); } @@ -85,20 +86,24 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { } } + @Override public void setFailureListeners(final List<FailureListener> listeners) { failureListeners.clear(); failureListeners.addAll(listeners); } + @Override public Object getID() { return transportConnection.getID(); } + @Override public String getRemoteAddress() { return transportConnection.getRemoteAddress(); } + @Override public void addFailureListener(final FailureListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); @@ -106,6 +111,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { failureListeners.add(listener); } + @Override public boolean removeFailureListener(final FailureListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.failListenerCannotBeNull(); @@ -114,6 +120,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return failureListeners.remove(listener); } + @Override public void addCloseListener(final CloseListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); @@ -122,6 +129,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { closeListeners.add(listener); } + @Override public boolean removeCloseListener(final CloseListener listener) { if (listener == null) { throw ActiveMQClientMessageBundle.BUNDLE.closeListenerCannotBeNull(); @@ -130,6 +138,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return closeListeners.remove(listener); } + @Override public List<CloseListener> removeCloseListeners() { List<CloseListener> ret = new ArrayList<CloseListener>(closeListeners); @@ -138,6 +147,7 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return ret; } + @Override public List<FailureListener> removeFailureListeners() { List<FailureListener> ret = getFailureListeners(); @@ -146,24 +156,29 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { return ret; } + @Override public void setCloseListeners(List<CloseListener> listeners) { closeListeners.clear(); closeListeners.addAll(listeners); } + @Override public ActiveMQBuffer createTransportBuffer(final int size) { return transportConnection.createTransportBuffer(size); } + @Override public Connection getTransportConnection() { return transportConnection; } + @Override public long getCreationTime() { return creationTime; } + @Override public boolean checkDataReceived() { boolean res = dataReceived; @@ -175,10 +190,12 @@ public abstract class AbstractRemotingConnection implements RemotingConnection { /* * This can be called concurrently by more than one thread so needs to be locked */ + @Override public void fail(final ActiveMQException me) { fail(me, null); } + @Override public void bufferReceived(final Object connectionID, final ActiveMQBuffer buffer) { dataReceived = true; }
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java index b391161..c7284df 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/FutureLatch.java @@ -42,6 +42,7 @@ public class FutureLatch implements Runnable { } } + @Override public void run() { latch.countDown(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java index 3bc34b6..db98281 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/InflaterReader.java @@ -46,6 +46,7 @@ public class InflaterReader extends InputStream { this.pointer = -1; } + @Override public int read() throws IOException { if (pointer == -1) { try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java index 5d8fa57..e455db8 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListImpl.java @@ -46,6 +46,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { iters = createIteratorArray(INITIAL_ITERATOR_ARRAY_SIZE); } + @Override public void addHead(E e) { Node<E> node = new Node<E>(e); @@ -66,6 +67,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { size++; } + @Override public void addTail(E e) { if (size == 0) { addHead(e); @@ -83,6 +85,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { } } + @Override public E poll() { Node<E> ret = head.next; @@ -96,20 +99,24 @@ public class LinkedListImpl<E> implements LinkedList<E> { } } + @Override public void clear() { tail = head.next = null; size = 0; } + @Override public int size() { return size; } + @Override public LinkedListIterator<E> iterator() { return new Iterator(); } + @Override public String toString() { StringBuilder str = new StringBuilder("LinkedListImpl [ "); @@ -227,6 +234,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { val = e; } + @Override public String toString() { return "Node, value = " + val; } @@ -248,10 +256,12 @@ public class LinkedListImpl<E> implements LinkedList<E> { addIter(this); } + @Override public void repeat() { repeat = true; } + @Override public boolean hasNext() { Node<E> e = getNode(); @@ -262,6 +272,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { return canAdvance(); } + @Override public E next() { Node<E> e = getNode(); @@ -303,6 +314,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { return e.val; } + @Override public void remove() { if (last == null) { throw new NoSuchElementException(); @@ -317,6 +329,7 @@ public class LinkedListImpl<E> implements LinkedList<E> { last = null; } + @Override public void close() { removeIter(this); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java index db0461f..10700e5 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/LinkedListIterator.java @@ -27,5 +27,6 @@ public interface LinkedListIterator<E> extends Iterator<E>, AutoCloseable { void repeat(); + @Override void close(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java index 69cc54a..949970b 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/OrderedExecutorFactory.java @@ -43,6 +43,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { * * @return an ordered executor */ + @Override public Executor getExecutor() { return new OrderedExecutor(parent); } @@ -72,6 +73,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { public OrderedExecutor(final Executor parent) { this.parent = parent; runner = new Runnable() { + @Override public void run() { for (;;) { // Optimization, first try without any locks @@ -110,6 +112,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { * * @param command the task to run. */ + @Override public void execute(final Runnable command) { synchronized (tasks) { tasks.add(command); @@ -120,6 +123,7 @@ public final class OrderedExecutorFactory implements ExecutorFactory { } } + @Override public String toString() { return "OrderedExecutor(running=" + running + ", tasks=" + tasks + ")"; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java index b4b6a51..6556ef5 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/PriorityLinkedListImpl.java @@ -60,6 +60,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { } } + @Override public void addHead(final T t, final int priority) { checkHighest(priority); @@ -68,6 +69,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { size++; } + @Override public void addTail(final T t, final int priority) { checkHighest(priority); @@ -76,6 +78,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { size++; } + @Override public T poll() { T t = null; @@ -108,6 +111,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { return t; } + @Override public void clear() { for (LinkedListImpl<T> list : levels) { list.clear(); @@ -116,14 +120,17 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { size = 0; } + @Override public int size() { return size; } + @Override public boolean isEmpty() { return size == 0; } + @Override public LinkedListIterator<T> iterator() { return new PriorityLinkedListIterator(); } @@ -149,6 +156,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { close(); } + @Override public void repeat() { if (lastIter == null) { throw new NoSuchElementException(); @@ -157,6 +165,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { lastIter.repeat(); } + @Override public void close() { if (!closed) { closed = true; @@ -178,6 +187,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { } } + @Override public boolean hasNext() { checkReset(); @@ -205,6 +215,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { return false; } + @Override public T next() { if (lastIter == null) { throw new NoSuchElementException(); @@ -213,6 +224,7 @@ public class PriorityLinkedListImpl<T> implements PriorityLinkedList<T> { return lastIter.next(); } + @Override public void remove() { if (lastIter == null) { throw new NoSuchElementException(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java index 06a26c7..42e20c7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SimpleIDGenerator.java @@ -26,6 +26,7 @@ public class SimpleIDGenerator implements IDGenerator { idSequence = startID; } + @Override public synchronized long generateID() { long id = idSequence++; @@ -41,6 +42,7 @@ public class SimpleIDGenerator implements IDGenerator { return id; } + @Override public synchronized long getCurrentID() { return idSequence; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java index 4a7675f..19ea7dd 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/SoftValueHashMap.java @@ -75,6 +75,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /** * @see java.util.Map#size() */ + @Override public int size() { processQueue(); return mapDelegate.size(); @@ -83,6 +84,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /** * @see java.util.Map#isEmpty() */ + @Override public boolean isEmpty() { processQueue(); return mapDelegate.isEmpty(); @@ -92,6 +94,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen * @param key * @see java.util.Map#containsKey(java.lang.Object) */ + @Override public boolean containsKey(final Object key) { processQueue(); return mapDelegate.containsKey(key); @@ -101,6 +104,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen * @param value * @see java.util.Map#containsValue(java.lang.Object) */ + @Override public boolean containsValue(final Object value) { processQueue(); for (AggregatedSoftReference valueIter : mapDelegate.values()) { @@ -117,6 +121,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen * @param key * @see java.util.Map#get(java.lang.Object) */ + @Override public V get(final Object key) { processQueue(); AggregatedSoftReference value = mapDelegate.get(key); @@ -134,6 +139,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen * @param value * @see java.util.Map#put(java.lang.Object, java.lang.Object) */ + @Override public V put(final K key, final V value) { processQueue(); AggregatedSoftReference newRef = createReference(key, value); @@ -178,6 +184,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen class ComparatorAgregated implements Comparator<AggregatedSoftReference> { + @Override public int compare(AggregatedSoftReference o1, AggregatedSoftReference o2) { long k = o1.used - o2.used; @@ -206,6 +213,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen * @param key * @see java.util.Map#remove(java.lang.Object) */ + @Override public V remove(final Object key) { processQueue(); AggregatedSoftReference ref = mapDelegate.remove(key); @@ -221,6 +229,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen * @param m * @see java.util.Map#putAll(java.util.Map) */ + @Override public void putAll(final Map<? extends K, ? extends V> m) { processQueue(); for (Map.Entry<? extends K, ? extends V> e : m.entrySet()) { @@ -231,6 +240,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /** * @see java.util.Map#clear() */ + @Override public void clear() { mapDelegate.clear(); } @@ -238,6 +248,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /** * @see java.util.Map#keySet() */ + @Override public Set<K> keySet() { processQueue(); return mapDelegate.keySet(); @@ -246,6 +257,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /** * @see java.util.Map#values() */ + @Override public Collection<V> values() { processQueue(); ArrayList<V> list = new ArrayList<V>(); @@ -263,6 +275,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /** * @see java.util.Map#entrySet() */ + @Override public Set<java.util.Map.Entry<K, V>> entrySet() { processQueue(); HashSet<Map.Entry<K, V>> set = new HashSet<Map.Entry<K, V>>(); @@ -353,6 +366,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /* (non-Javadoc) * @see java.util.Map.Entry#getKey() */ + @Override public K getKey() { return key; } @@ -360,6 +374,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /* (non-Javadoc) * @see java.util.Map.Entry#getValue() */ + @Override public V getValue() { return value; } @@ -367,6 +382,7 @@ public class SoftValueHashMap<K, V extends SoftValueHashMap.ValueCache> implemen /* (non-Javadoc) * @see java.util.Map.Entry#setValue(java.lang.Object) */ + @Override public V setValue(final V value) { this.value = value; return value; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java index 96cdb8c..96678f7 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TimeAndCounterIDGenerator.java @@ -60,6 +60,7 @@ public class TimeAndCounterIDGenerator implements IDGenerator { // Public -------------------------------------------------------- + @Override public long generateID() { long idReturn = counter.incrementAndGet(); @@ -93,6 +94,7 @@ public class TimeAndCounterIDGenerator implements IDGenerator { return idReturn; } + @Override public long getCurrentID() { return counter.get(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java index 011ac58..699ccac 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/TokenBucketLimiterImpl.java @@ -50,14 +50,17 @@ public class TokenBucketLimiterImpl implements TokenBucketLimiter { this.window = unit.toMillis(unitAmount); } + @Override public int getRate() { return rate; } + @Override public boolean isSpin() { return spin; } + @Override public void limit() { while (!check()) { if (spin) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java index 6e54c5d..ace62c8 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/VersionLoader.java @@ -51,6 +51,7 @@ public final class VersionLoader { try { PROP_FILE_NAME = AccessController.doPrivileged(new PrivilegedAction<String>() { + @Override public String run() { return System.getProperty(VersionLoader.VERSION_PROP_FILE_KEY); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java ---------------------------------------------------------------------- diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java index e022a0d..d8b9e6a 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/utils/XMLUtil.java @@ -431,6 +431,7 @@ public final class XMLUtil { private static URL findResource(final String resourceName) { return AccessController.doPrivileged(new PrivilegedAction<URL>() { + @Override public URL run() { return ClassloadingUtil.findResource(resourceName); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java index 246fe7a..7dbc957 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/api/jms/management/JMSQueueControl.java @@ -124,6 +124,7 @@ public interface JMSQueueControl extends DestinationControl { * * @return the number of removed messages */ + @Override @Operation(desc = "Remove the messages corresponding to the given filter (and returns the number of removed messages)", impact = MBeanOperationInfo.ACTION) int removeMessages(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter) throws Exception; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java index 09d6b18..e170701 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java @@ -99,6 +99,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag // BytesMessage implementation ----------------------------------- + @Override public boolean readBoolean() throws JMSException { checkRead(); try { @@ -109,6 +110,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public byte readByte() throws JMSException { checkRead(); try { @@ -119,6 +121,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readUnsignedByte() throws JMSException { checkRead(); try { @@ -129,6 +132,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public short readShort() throws JMSException { checkRead(); try { @@ -139,6 +143,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readUnsignedShort() throws JMSException { checkRead(); try { @@ -149,6 +154,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public char readChar() throws JMSException { checkRead(); try { @@ -159,6 +165,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readInt() throws JMSException { checkRead(); try { @@ -169,6 +176,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public long readLong() throws JMSException { checkRead(); try { @@ -179,6 +187,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public float readFloat() throws JMSException { checkRead(); try { @@ -189,6 +198,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public double readDouble() throws JMSException { checkRead(); try { @@ -199,6 +209,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public String readUTF() throws JMSException { checkRead(); try { @@ -215,57 +226,68 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public int readBytes(final byte[] value) throws JMSException { checkRead(); return bytesReadBytes(message.getBodyBuffer(), value); } + @Override public int readBytes(final byte[] value, final int length) throws JMSException { checkRead(); return bytesReadBytes(message.getBodyBuffer(), value, length); } + @Override public void writeBoolean(final boolean value) throws JMSException { checkWrite(); bytesWriteBoolean(message.getBodyBuffer(), value); } + @Override public void writeByte(final byte value) throws JMSException { checkWrite(); bytesWriteByte(message.getBodyBuffer(), value); } + @Override public void writeShort(final short value) throws JMSException { checkWrite(); bytesWriteShort(message.getBodyBuffer(), value); } + @Override public void writeChar(final char value) throws JMSException { checkWrite(); bytesWriteChar(message.getBodyBuffer(), value); } + @Override public void writeInt(final int value) throws JMSException { checkWrite(); bytesWriteInt(message.getBodyBuffer(), value); } + @Override public void writeLong(final long value) throws JMSException { checkWrite(); bytesWriteLong(message.getBodyBuffer(), value); } + @Override public void writeFloat(final float value) throws JMSException { checkWrite(); bytesWriteFloat(message.getBodyBuffer(), value); } + @Override public void writeDouble(final double value) throws JMSException { checkWrite(); bytesWriteDouble(message.getBodyBuffer(), value); } + @Override public void writeUTF(final String value) throws JMSException { checkWrite(); try { @@ -280,16 +302,19 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } + @Override public void writeBytes(final byte[] value) throws JMSException { checkWrite(); bytesWriteBytes(message.getBodyBuffer(), value); } + @Override public void writeBytes(final byte[] value, final int offset, final int length) throws JMSException { checkWrite(); bytesWriteBytes(message.getBodyBuffer(), value, offset, length); } + @Override public void writeObject(final Object value) throws JMSException { checkWrite(); if (!bytesWriteObject(message.getBodyBuffer(), value)) { @@ -297,6 +322,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public void reset() throws JMSException { if (!readOnly) { readOnly = true; @@ -328,6 +354,7 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } } + @Override public long getBodyLength() throws JMSException { checkRead(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java index a1184b2..60de2d7 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java @@ -199,18 +199,21 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme // Connection implementation -------------------------------------------------------------------- + @Override public synchronized Session createSession(final boolean transacted, final int acknowledgeMode) throws JMSException { checkClosed(); return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQConnection.TYPE_GENERIC_CONNECTION); } + @Override public String getClientID() throws JMSException { checkClosed(); return clientID; } + @Override public void setClientID(final String clientID) throws JMSException { checkClosed(); @@ -245,6 +248,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme justCreated = false; } + @Override public ConnectionMetaData getMetaData() throws JMSException { checkClosed(); @@ -257,6 +261,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme return metaData; } + @Override public ExceptionListener getExceptionListener() throws JMSException { checkClosed(); @@ -265,6 +270,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme return exceptionListener; } + @Override public void setExceptionListener(final ExceptionListener listener) throws JMSException { checkClosed(); @@ -272,6 +278,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme justCreated = false; } + @Override public synchronized void start() throws JMSException { checkClosed(); @@ -294,6 +301,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme } + @Override public synchronized void stop() throws JMSException { threadAwareContext.assertNotMessageListenerThread(); @@ -307,6 +315,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme started = false; } + @Override public final synchronized void close() throws JMSException { threadAwareContext.assertNotCompletionListenerThread(); threadAwareContext.assertNotMessageListenerThread(); @@ -351,6 +360,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme } } + @Override public ConnectionConsumer createConnectionConsumer(final Destination destination, final String messageSelector, final ServerSessionPool sessionPool, @@ -372,6 +382,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme } } + @Override public ConnectionConsumer createDurableConnectionConsumer(final Topic topic, final String subscriptionName, final String messageSelector, @@ -403,6 +414,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme // QueueConnection implementation --------------------------------------------------------------- + @Override public QueueSession createQueueSession(final boolean transacted, int acknowledgeMode) throws JMSException { checkClosed(); return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQSession.TYPE_QUEUE_SESSION); @@ -420,6 +432,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme return acknowledgeMode; } + @Override public ConnectionConsumer createConnectionConsumer(final Queue queue, final String messageSelector, final ServerSessionPool sessionPool, @@ -431,11 +444,13 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme // TopicConnection implementation --------------------------------------------------------------- + @Override public TopicSession createTopicSession(final boolean transacted, final int acknowledgeMode) throws JMSException { checkClosed(); return createSessionInternal(false, transacted, checkAck(transacted, acknowledgeMode), ActiveMQSession.TYPE_TOPIC_SESSION); } + @Override public ConnectionConsumer createConnectionConsumer(final Topic topic, final String messageSelector, final ServerSessionPool sessionPool, @@ -695,6 +710,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme je.initCause(me); new Thread(new Runnable() { + @Override public void run() { exceptionListener.onException(je); } @@ -714,6 +730,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme connectionFailed(me, failedOver); } + @Override public void beforeReconnect(final ActiveMQException me) { } @@ -739,6 +756,7 @@ public class ActiveMQConnection extends ActiveMQConnectionForContextImpl impleme if (failoverListener != null) { new Thread(new Runnable() { + @Override public void run() { failoverListener.failoverEvent(eventType); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java index aa29bc5..0dce3fc 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionFactory.java @@ -79,6 +79,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, private String protocolManagerFactoryStr; + @Override public void writeExternal(ObjectOutput out) throws IOException { URI uri = toURI(); @@ -135,6 +136,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, if (protocolManagerFactoryStr != null && !protocolManagerFactoryStr.trim().isEmpty()) { AccessController.doPrivileged(new PrivilegedAction<Object>() { + @Override public Object run() { ClientProtocolManagerFactory protocolManagerFactory = @@ -148,6 +150,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, } } + @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { String url = in.readUTF(); ConnectionFactoryParser parser = new ConnectionFactoryParser(); @@ -225,10 +228,12 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, serverLocator.disableFinalizeCheck(); } + @Override public Connection createConnection() throws JMSException { return createConnection(user, password); } + @Override public Connection createConnection(final String username, final String password) throws JMSException { return createConnectionInternal(username, password, false, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } @@ -296,10 +301,12 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, // XAConnectionFactory implementation ----------------------------------------------------------- + @Override public XAConnection createXAConnection() throws JMSException { return createXAConnection(null, null); } + @Override public XAConnection createXAConnection(final String username, final String password) throws JMSException { return (XAConnection) createConnectionInternal(username, password, true, ActiveMQConnection.TYPE_GENERIC_CONNECTION); } @@ -694,6 +701,7 @@ public class ActiveMQConnectionFactory implements Externalizable, Referenceable, serverLocator.setCompressLargeMessage(avoidLargeMessages); } + @Override public void close() { ServerLocator locator0 = serverLocator; if (locator0 != null) http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java index 31eadb9..b1c44a3 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionForContextImpl.java @@ -29,6 +29,7 @@ import org.apache.activemq.artemis.utils.ReferenceCounterUtil; public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnectionForContext { final Runnable closeRunnable = new Runnable() { + @Override public void run() { try { close(); @@ -43,6 +44,7 @@ public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnec protected final ThreadAwareContext threadAwareContext = new ThreadAwareContext(); + @Override public JMSContext createContext(int sessionMode) { switch (sessionMode) { case Session.AUTO_ACKNOWLEDGE: @@ -60,6 +62,7 @@ public abstract class ActiveMQConnectionForContextImpl implements ActiveMQConnec return new ActiveMQJMSContext(this, sessionMode, threadAwareContext); } + @Override public XAJMSContext createXAContext() { refCounter.increment(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java index 6af723f..628281b 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnectionMetaData.java @@ -49,34 +49,42 @@ public class ActiveMQConnectionMetaData implements ConnectionMetaData { // ConnectionMetaData implementation ----------------------------- + @Override public String getJMSVersion() throws JMSException { return "2.0"; } + @Override public int getJMSMajorVersion() throws JMSException { return 2; } + @Override public int getJMSMinorVersion() throws JMSException { return 0; } + @Override public String getJMSProviderName() throws JMSException { return ActiveMQConnectionMetaData.ACTIVEMQ; } + @Override public String getProviderVersion() throws JMSException { return serverVersion.getFullVersion(); } + @Override public int getProviderMajorVersion() throws JMSException { return serverVersion.getMajorVersion(); } + @Override public int getProviderMinorVersion() throws JMSException { return serverVersion.getMinorVersion(); } + @Override public Enumeration getJMSXPropertyNames() throws JMSException { Vector<Object> v = new Vector<Object>(); v.add("JMSXGroupID"); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java index 9d431f9..f803ff6 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQDestination.java @@ -296,6 +296,7 @@ public class ActiveMQDestination implements Destination, Serializable, Reference // Referenceable implementation --------------------------------------- + @Override public Reference getReference() throws NamingException { return new Reference(this.getClass().getCanonicalName(), new SerializableObjectRefAddr("ActiveMQ-DEST", this), DestinationObjectFactory.class.getCanonicalName(), null); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java index 747316d..b3112a7 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java @@ -100,66 +100,77 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess // MapMessage implementation ------------------------------------- + @Override public void setBoolean(final String name, final boolean value) throws JMSException { checkName(name); map.putBooleanProperty(new SimpleString(name), value); invalid = true; } + @Override public void setByte(final String name, final byte value) throws JMSException { checkName(name); map.putByteProperty(new SimpleString(name), value); invalid = true; } + @Override public void setShort(final String name, final short value) throws JMSException { checkName(name); map.putShortProperty(new SimpleString(name), value); invalid = true; } + @Override public void setChar(final String name, final char value) throws JMSException { checkName(name); map.putCharProperty(new SimpleString(name), value); invalid = true; } + @Override public void setInt(final String name, final int value) throws JMSException { checkName(name); map.putIntProperty(new SimpleString(name), value); invalid = true; } + @Override public void setLong(final String name, final long value) throws JMSException { checkName(name); map.putLongProperty(new SimpleString(name), value); invalid = true; } + @Override public void setFloat(final String name, final float value) throws JMSException { checkName(name); map.putFloatProperty(new SimpleString(name), value); invalid = true; } + @Override public void setDouble(final String name, final double value) throws JMSException { checkName(name); map.putDoubleProperty(new SimpleString(name), value); invalid = true; } + @Override public void setString(final String name, final String value) throws JMSException { checkName(name); map.putSimpleStringProperty(new SimpleString(name), value == null ? null : new SimpleString(value)); invalid = true; } + @Override public void setBytes(final String name, final byte[] value) throws JMSException { checkName(name); map.putBytesProperty(new SimpleString(name), value); invalid = true; } + @Override public void setBytes(final String name, final byte[] value, final int offset, final int length) throws JMSException { checkName(name); if (offset + length > value.length) { @@ -171,6 +182,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess invalid = true; } + @Override public void setObject(final String name, final Object value) throws JMSException { checkName(name); try { @@ -182,6 +194,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess invalid = true; } + @Override public boolean getBoolean(final String name) throws JMSException { try { return map.getBooleanProperty(new SimpleString(name)); @@ -191,6 +204,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public byte getByte(final String name) throws JMSException { try { return map.getByteProperty(new SimpleString(name)); @@ -200,6 +214,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public short getShort(final String name) throws JMSException { try { return map.getShortProperty(new SimpleString(name)); @@ -209,6 +224,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public char getChar(final String name) throws JMSException { try { return map.getCharProperty(new SimpleString(name)); @@ -218,6 +234,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public int getInt(final String name) throws JMSException { try { return map.getIntProperty(new SimpleString(name)); @@ -227,6 +244,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public long getLong(final String name) throws JMSException { try { return map.getLongProperty(new SimpleString(name)); @@ -236,6 +254,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public float getFloat(final String name) throws JMSException { try { return map.getFloatProperty(new SimpleString(name)); @@ -245,6 +264,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public double getDouble(final String name) throws JMSException { try { return map.getDoubleProperty(new SimpleString(name)); @@ -254,6 +274,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public String getString(final String name) throws JMSException { try { SimpleString str = map.getSimpleStringProperty(new SimpleString(name)); @@ -269,6 +290,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public byte[] getBytes(final String name) throws JMSException { try { return map.getBytesProperty(new SimpleString(name)); @@ -278,6 +300,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } } + @Override public Object getObject(final String name) throws JMSException { Object val = map.getProperty(new SimpleString(name)); @@ -288,6 +311,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess return val; } + @Override public Enumeration getMapNames() throws JMSException { Set<SimpleString> simplePropNames = map.getPropertyNames(); Set<String> propNames = new HashSet<String>(simplePropNames.size()); @@ -299,6 +323,7 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess return Collections.enumeration(propNames); } + @Override public boolean itemExists(final String name) throws JMSException { return map.containsProperty(new SimpleString(name)); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java index db72dff..6dfdf7c 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessage.java @@ -277,6 +277,7 @@ public class ActiveMQMessage implements javax.jms.Message { // javax.jmx.Message implementation ------------------------------ + @Override public String getJMSMessageID() { if (msgID == null) { UUID uid = message.getUserID(); @@ -286,6 +287,7 @@ public class ActiveMQMessage implements javax.jms.Message { return msgID; } + @Override public void setJMSMessageID(final String jmsMessageID) throws JMSException { if (jmsMessageID != null && !jmsMessageID.startsWith("ID:")) { throw new JMSException("JMSMessageID must start with ID:"); @@ -296,18 +298,22 @@ public class ActiveMQMessage implements javax.jms.Message { msgID = jmsMessageID; } + @Override public long getJMSTimestamp() throws JMSException { return message.getTimestamp(); } + @Override public void setJMSTimestamp(final long timestamp) throws JMSException { message.setTimestamp(timestamp); } + @Override public byte[] getJMSCorrelationIDAsBytes() throws JMSException { return MessageUtil.getJMSCorrelationIDAsBytes(message); } + @Override public void setJMSCorrelationIDAsBytes(final byte[] correlationID) throws JMSException { try { MessageUtil.setJMSCorrelationIDAsBytes(message, correlationID); @@ -319,11 +325,13 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void setJMSCorrelationID(final String correlationID) throws JMSException { MessageUtil.setJMSCorrelationID(message, correlationID); jmsCorrelationID = correlationID; } + @Override public String getJMSCorrelationID() throws JMSException { if (jmsCorrelationID == null) { jmsCorrelationID = MessageUtil.getJMSCorrelationID(message); @@ -332,6 +340,7 @@ public class ActiveMQMessage implements javax.jms.Message { return jmsCorrelationID; } + @Override public Destination getJMSReplyTo() throws JMSException { if (replyTo == null) { @@ -344,6 +353,7 @@ public class ActiveMQMessage implements javax.jms.Message { return replyTo; } + @Override public void setJMSReplyTo(final Destination dest) throws JMSException { if (dest == null) { @@ -363,6 +373,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public Destination getJMSDestination() throws JMSException { if (dest == null) { SimpleString sdest = message.getAddress(); @@ -373,14 +384,17 @@ public class ActiveMQMessage implements javax.jms.Message { return dest; } + @Override public void setJMSDestination(final Destination destination) throws JMSException { dest = destination; } + @Override public int getJMSDeliveryMode() throws JMSException { return message.isDurable() ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT; } + @Override public void setJMSDeliveryMode(final int deliveryMode) throws JMSException { if (deliveryMode == DeliveryMode.PERSISTENT) { message.setDurable(true); @@ -393,10 +407,12 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public boolean getJMSRedelivered() throws JMSException { return message.getDeliveryCount() > 1; } + @Override public void setJMSRedelivered(final boolean redelivered) throws JMSException { if (!redelivered) { message.setDeliveryCount(1); @@ -411,6 +427,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void setJMSType(final String type) throws JMSException { if (type != null) { MessageUtil.setJMSType(message, type); @@ -419,6 +436,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public String getJMSType() throws JMSException { if (jmsType == null) { jmsType = MessageUtil.getJMSType(message); @@ -426,24 +444,29 @@ public class ActiveMQMessage implements javax.jms.Message { return jmsType; } + @Override public long getJMSExpiration() throws JMSException { return message.getExpiration(); } + @Override public void setJMSExpiration(final long expiration) throws JMSException { message.setExpiration(expiration); } + @Override public int getJMSPriority() throws JMSException { return message.getPriority(); } + @Override public void setJMSPriority(final int priority) throws JMSException { checkPriority(priority); message.setPriority((byte) priority); } + @Override public void clearProperties() throws JMSException { MessageUtil.clearProperties(message); @@ -451,14 +474,17 @@ public class ActiveMQMessage implements javax.jms.Message { propertiesReadOnly = false; } + @Override public void clearBody() throws JMSException { readOnly = false; } + @Override public boolean propertyExists(final String name) throws JMSException { return MessageUtil.propertyExists(message, name); } + @Override public boolean getBooleanProperty(final String name) throws JMSException { try { return message.getBooleanProperty(new SimpleString(name)); @@ -468,6 +494,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public byte getByteProperty(final String name) throws JMSException { try { return message.getByteProperty(new SimpleString(name)); @@ -477,6 +504,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public short getShortProperty(final String name) throws JMSException { try { return message.getShortProperty(new SimpleString(name)); @@ -486,6 +514,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public int getIntProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return message.getDeliveryCount(); @@ -499,6 +528,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public long getLongProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return message.getDeliveryCount(); @@ -512,6 +542,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public float getFloatProperty(final String name) throws JMSException { try { return message.getFloatProperty(new SimpleString(name)); @@ -521,6 +552,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public double getDoubleProperty(final String name) throws JMSException { try { return message.getDoubleProperty(new SimpleString(name)); @@ -530,6 +562,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public String getStringProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return String.valueOf(message.getDeliveryCount()); @@ -548,6 +581,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public Object getObjectProperty(final String name) throws JMSException { if (MessageUtil.JMSXDELIVERYCOUNT.equals(name)) { return String.valueOf(message.getDeliveryCount()); @@ -566,42 +600,50 @@ public class ActiveMQMessage implements javax.jms.Message { return Collections.enumeration(MessageUtil.getPropertyNames(message)); } + @Override public void setBooleanProperty(final String name, final boolean value) throws JMSException { checkProperty(name); message.putBooleanProperty(new SimpleString(name), value); } + @Override public void setByteProperty(final String name, final byte value) throws JMSException { checkProperty(name); message.putByteProperty(new SimpleString(name), value); } + @Override public void setShortProperty(final String name, final short value) throws JMSException { checkProperty(name); message.putShortProperty(new SimpleString(name), value); } + @Override public void setIntProperty(final String name, final int value) throws JMSException { checkProperty(name); message.putIntProperty(new SimpleString(name), value); } + @Override public void setLongProperty(final String name, final long value) throws JMSException { checkProperty(name); message.putLongProperty(new SimpleString(name), value); } + @Override public void setFloatProperty(final String name, final float value) throws JMSException { checkProperty(name); message.putFloatProperty(new SimpleString(name), value); } + @Override public void setDoubleProperty(final String name, final double value) throws JMSException { checkProperty(name); message.putDoubleProperty(new SimpleString(name), value); } + @Override public void setStringProperty(final String name, final String value) throws JMSException { checkProperty(name); @@ -613,6 +655,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void setObjectProperty(final String name, final Object value) throws JMSException { if (ActiveMQJMSConstants.JMS_ACTIVEMQ_OUTPUT_STREAM.equals(name)) { setOutputStream((OutputStream) value); @@ -641,6 +684,7 @@ public class ActiveMQMessage implements javax.jms.Message { } } + @Override public void acknowledge() throws JMSException { if (session != null) { try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java index 8841f2a..3f47209 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageConsumer.java @@ -86,18 +86,21 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr // MessageConsumer implementation -------------------------------- + @Override public String getMessageSelector() throws JMSException { checkClosed(); return selector; } + @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return listener; } + @Override public void setMessageListener(final MessageListener listener) throws JMSException { this.listener = listener; @@ -111,18 +114,22 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr } } + @Override public Message receive() throws JMSException { return getMessage(0, false); } + @Override public Message receive(final long timeout) throws JMSException { return getMessage(timeout, false); } + @Override public Message receiveNoWait() throws JMSException { return getMessage(0, true); } + @Override public void close() throws JMSException { try { consumer.close(); @@ -141,6 +148,7 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr // QueueReceiver implementation ---------------------------------- + @Override public Queue getQueue() throws JMSException { checkClosed(); @@ -149,12 +157,14 @@ public final class ActiveMQMessageConsumer implements QueueReceiver, TopicSubscr // TopicSubscriber implementation -------------------------------- + @Override public Topic getTopic() throws JMSException { checkClosed(); return (Topic) destination; } + @Override public boolean getNoLocal() throws JMSException { checkClosed(); http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java index 7d58b54..9c6c497 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMessageProducer.java @@ -84,30 +84,35 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To // MessageProducer implementation -------------------------------- + @Override public void setDisableMessageID(final boolean value) throws JMSException { checkClosed(); disableMessageID = value; } + @Override public boolean getDisableMessageID() throws JMSException { checkClosed(); return disableMessageID; } + @Override public void setDisableMessageTimestamp(final boolean value) throws JMSException { checkClosed(); disableMessageTimestamp = value; } + @Override public boolean getDisableMessageTimestamp() throws JMSException { checkClosed(); return disableMessageTimestamp; } + @Override public void setDeliveryMode(final int deliveryMode) throws JMSException { checkClosed(); if (deliveryMode != DeliveryMode.NON_PERSISTENT && deliveryMode != DeliveryMode.PERSISTENT) { @@ -117,12 +122,14 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To defaultDeliveryMode = deliveryMode; } + @Override public int getDeliveryMode() throws JMSException { checkClosed(); return defaultDeliveryMode; } + @Override public void setPriority(final int defaultPriority) throws JMSException { checkClosed(); @@ -133,30 +140,35 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To this.defaultPriority = defaultPriority; } + @Override public int getPriority() throws JMSException { checkClosed(); return defaultPriority; } + @Override public void setTimeToLive(final long timeToLive) throws JMSException { checkClosed(); defaultTimeToLive = timeToLive; } + @Override public long getTimeToLive() throws JMSException { checkClosed(); return defaultTimeToLive; } + @Override public Destination getDestination() throws JMSException { checkClosed(); return defaultDestination; } + @Override public void close() throws JMSException { connection.getThreadAwareContext().assertNotCompletionListenerThread(); try { @@ -167,11 +179,13 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To } } + @Override public void send(final Message message) throws JMSException { checkDefaultDestination(); doSendx(defaultDestination, message, defaultDeliveryMode, defaultPriority, defaultTimeToLive, null); } + @Override public void send(final Message message, final int deliveryMode, final int priority, @@ -180,10 +194,12 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To doSendx(defaultDestination, message, deliveryMode, priority, timeToLive, null); } + @Override public void send(final Destination destination, final Message message) throws JMSException { send(destination, message, defaultDeliveryMode, defaultPriority, defaultTimeToLive); } + @Override public void send(final Destination destination, final Message message, final int deliveryMode, @@ -247,18 +263,22 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To // TopicPublisher Implementation --------------------------------- + @Override public Topic getTopic() throws JMSException { return (Topic) getDestination(); } + @Override public void publish(final Message message) throws JMSException { send(message); } + @Override public void publish(final Topic topic, final Message message) throws JMSException { send(topic, message); } + @Override public void publish(final Message message, final int deliveryMode, final int priority, @@ -266,6 +286,7 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To send(message, deliveryMode, priority, timeToLive); } + @Override public void publish(final Topic topic, final Message message, final int deliveryMode, @@ -277,10 +298,12 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To // QueueSender Implementation ------------------------------------ + @Override public void send(final Queue queue, final Message message) throws JMSException { send((Destination) queue, message); } + @Override public void send(final Queue queue, final Message message, final int deliveryMode, @@ -290,6 +313,7 @@ public class ActiveMQMessageProducer implements MessageProducer, QueueSender, To doSendx((ActiveMQDestination) queue, message, deliveryMode, priority, timeToLive, null); } + @Override public Queue getQueue() throws JMSException { return (Queue) getDestination(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java index eebccd1..f3220cb 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQObjectMessage.java @@ -103,6 +103,7 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess // ObjectMessage implementation ---------------------------------- + @Override public void setObject(final Serializable object) throws JMSException { checkWrite(); @@ -128,6 +129,7 @@ public class ActiveMQObjectMessage extends ActiveMQMessage implements ObjectMess } // lazy deserialize the Object the first time the client requests it + @Override public Serializable getObject() throws JMSException { if (data == null || data.length == 0) { return null; http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java index 7660dfa..c7a5728 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueue.java @@ -66,6 +66,7 @@ public class ActiveMQQueue extends ActiveMQDestination implements Queue { // Public -------------------------------------------------------- + @Override public String getQueueName() { return name; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java index 493029b..5022fcd 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueBrowser.java @@ -61,6 +61,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { // QueueBrowser implementation ------------------------------------------------------------------- + @Override public void close() throws JMSException { if (consumer != null) { try { @@ -72,6 +73,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { } } + @Override public Enumeration getEnumeration() throws JMSException { try { close(); @@ -86,10 +88,12 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { } + @Override public String getMessageSelector() throws JMSException { return filterString == null ? null : filterString.toString(); } + @Override public Queue getQueue() throws JMSException { return queue; } @@ -113,6 +117,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { ClientMessage current = null; + @Override public boolean hasMoreElements() { if (current == null) { try { @@ -125,6 +130,7 @@ public final class ActiveMQQueueBrowser implements QueueBrowser { return current != null; } + @Override public ActiveMQMessage nextElement() { ActiveMQMessage msg; if (hasMoreElements()) { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java index 6fdce70..7ee9e0e 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQQueueConnectionFactory.java @@ -54,6 +54,7 @@ public class ActiveMQQueueConnectionFactory extends ActiveMQConnectionFactory im super(ha, initialConnectors); } + @Override public int getFactoryType() { return JMSFactoryType.QUEUE_CF.intValue(); } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/25ae4724/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java ---------------------------------------------------------------------- diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java index 758ad36..758cb90 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java @@ -115,30 +115,35 @@ public class ActiveMQSession implements QueueSession, TopicSession { // Session implementation ---------------------------------------- + @Override public BytesMessage createBytesMessage() throws JMSException { checkClosed(); return new ActiveMQBytesMessage(session); } + @Override public MapMessage createMapMessage() throws JMSException { checkClosed(); return new ActiveMQMapMessage(session); } + @Override public Message createMessage() throws JMSException { checkClosed(); return new ActiveMQMessage(session); } + @Override public ObjectMessage createObjectMessage() throws JMSException { checkClosed(); return new ActiveMQObjectMessage(session); } + @Override public ObjectMessage createObjectMessage(final Serializable object) throws JMSException { checkClosed(); @@ -149,12 +154,14 @@ public class ActiveMQSession implements QueueSession, TopicSession { return msg; } + @Override public StreamMessage createStreamMessage() throws JMSException { checkClosed(); return new ActiveMQStreamMessage(session); } + @Override public TextMessage createTextMessage() throws JMSException { checkClosed(); @@ -165,6 +172,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { return msg; } + @Override public TextMessage createTextMessage(final String text) throws JMSException { checkClosed(); @@ -175,12 +183,14 @@ public class ActiveMQSession implements QueueSession, TopicSession { return msg; } + @Override public boolean getTransacted() throws JMSException { checkClosed(); return transacted; } + @Override public int getAcknowledgeMode() throws JMSException { checkClosed(); @@ -191,6 +201,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { return xa; } + @Override public void commit() throws JMSException { if (!transacted) { throw new IllegalStateException("Cannot commit a non-transacted session"); @@ -206,6 +217,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void rollback() throws JMSException { if (!transacted) { throw new IllegalStateException("Cannot rollback a non-transacted session"); @@ -222,6 +234,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void close() throws JMSException { connection.getThreadAwareContext().assertNotCompletionListenerThread(); connection.getThreadAwareContext().assertNotMessageListenerThread(); @@ -241,6 +254,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void recover() throws JMSException { if (transacted) { throw new IllegalStateException("Cannot recover a transacted session"); @@ -256,19 +270,23 @@ public class ActiveMQSession implements QueueSession, TopicSession { recoverCalled = true; } + @Override public MessageListener getMessageListener() throws JMSException { checkClosed(); return null; } + @Override public void setMessageListener(final MessageListener listener) throws JMSException { checkClosed(); } + @Override public void run() { } + @Override public MessageProducer createProducer(final Destination destination) throws JMSException { if (destination != null && !(destination instanceof ActiveMQDestination)) { throw new InvalidDestinationException("Not an ActiveMQ Artemis Destination:" + destination); @@ -301,15 +319,18 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public MessageConsumer createConsumer(final Destination destination) throws JMSException { return createConsumer(destination, null, false); } + @Override public MessageConsumer createConsumer(final Destination destination, final String messageSelector) throws JMSException { return createConsumer(destination, messageSelector, false); } + @Override public MessageConsumer createConsumer(final Destination destination, final String messageSelector, final boolean noLocal) throws JMSException { @@ -331,6 +352,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { return createConsumer(jbdest, null, messageSelector, noLocal, ConsumerDurability.NON_DURABLE); } + @Override public Queue createQueue(final String queueName) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { @@ -356,6 +378,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public Topic createTopic(final String topicName) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { @@ -381,10 +404,12 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public TopicSubscriber createDurableSubscriber(final Topic topic, final String name) throws JMSException { return createDurableSubscriber(topic, name, null, false); } + @Override public TopicSubscriber createDurableSubscriber(final Topic topic, final String name, String messageSelector, @@ -730,10 +755,12 @@ public class ActiveMQSession implements QueueSession, TopicSession { checkClosed(); } + @Override public QueueBrowser createBrowser(final Queue queue) throws JMSException { return createBrowser(queue, null); } + @Override public QueueBrowser createBrowser(final Queue queue, String filterString) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { @@ -784,6 +811,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } + @Override public TemporaryQueue createTemporaryQueue() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_TOPIC_SESSION) { @@ -806,6 +834,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public TemporaryTopic createTemporaryTopic() throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { @@ -833,6 +862,7 @@ public class ActiveMQSession implements QueueSession, TopicSession { } } + @Override public void unsubscribe(final String name) throws JMSException { // As per spec. section 4.11 if (sessionType == ActiveMQSession.TYPE_QUEUE_SESSION) { @@ -877,14 +907,17 @@ public class ActiveMQSession implements QueueSession, TopicSession { // QueueSession implementation + @Override public QueueReceiver createReceiver(final Queue queue, final String messageSelector) throws JMSException { return (QueueReceiver) createConsumer(queue, messageSelector); } + @Override public QueueReceiver createReceiver(final Queue queue) throws JMSException { return (QueueReceiver) createConsumer(queue); } + @Override public QueueSender createSender(final Queue queue) throws JMSException { return (QueueSender) createProducer(queue); } @@ -897,16 +930,19 @@ public class ActiveMQSession implements QueueSession, TopicSession { // TopicSession implementation + @Override public TopicPublisher createPublisher(final Topic topic) throws JMSException { return (TopicPublisher) createProducer(topic); } + @Override public TopicSubscriber createSubscriber(final Topic topic, final String messageSelector, final boolean noLocal) throws JMSException { return (TopicSubscriber) createConsumer(topic, messageSelector, noLocal); } + @Override public TopicSubscriber createSubscriber(final Topic topic) throws JMSException { return (TopicSubscriber) createConsumer(topic); }