org.logicblaze.lingo.jms
Class JmsQueue
java.lang.Object
java.util.AbstractCollection
org.logicblaze.lingo.jms.JmsQueue
- All Implemented Interfaces:
- edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue, edu.emory.mathcs.backport.java.util.Queue, Iterable, Collection
public class JmsQueue
- extends AbstractCollection
- implements edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
An implementation of the Queue interface which maps to a JMS Destination.
Note that when you have finished using this object you should call the
close()
method to free up any resources.
- Version:
- $Revision$
Methods inherited from interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue |
remove |
JmsQueue
public JmsQueue(JmsClient jmsClient)
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
- Specified by:
iterator
in class AbstractCollection
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection
- Overrides:
isEmpty
in class AbstractCollection
size
public int size()
- This method could be quite slow for huge queues as this results in
iterating through all of the available objects to count them.
- Specified by:
size
in interface Collection
- Specified by:
size
in class AbstractCollection
contains
public boolean contains(Object element)
- This method could be quite slow for huge queues as this method may have
to iterate through the entire queue
- Specified by:
contains
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Specified by:
contains
in interface Collection
- Overrides:
contains
in class AbstractCollection
containsAll
public boolean containsAll(Collection coll)
- This method could be quite slow for huge queues as this results in
iterating through all of the available objects to count them.
- Specified by:
containsAll
in interface Collection
- Overrides:
containsAll
in class AbstractCollection
add
public boolean add(Object element)
- Specified by:
add
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Specified by:
add
in interface edu.emory.mathcs.backport.java.util.Queue
- Specified by:
add
in interface Collection
- Overrides:
add
in class AbstractCollection
offer
public boolean offer(Object element)
- Specified by:
offer
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Specified by:
offer
in interface edu.emory.mathcs.backport.java.util.Queue
remove
public Object remove()
- Specified by:
remove
in interface edu.emory.mathcs.backport.java.util.Queue
poll
public Object poll()
- Specified by:
poll
in interface edu.emory.mathcs.backport.java.util.Queue
element
public Object element()
- Specified by:
element
in interface edu.emory.mathcs.backport.java.util.Queue
peek
public Object peek()
- Specified by:
peek
in interface edu.emory.mathcs.backport.java.util.Queue
put
public void put(Object element)
throws InterruptedException
- Specified by:
put
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Throws:
InterruptedException
offer
public boolean offer(Object element,
long timeout,
edu.emory.mathcs.backport.java.util.concurrent.TimeUnit unit)
throws InterruptedException
- Specified by:
offer
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Throws:
InterruptedException
take
public Object take()
throws InterruptedException
- Specified by:
take
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Throws:
InterruptedException
poll
public Object poll(long timeout,
edu.emory.mathcs.backport.java.util.concurrent.TimeUnit unit)
throws InterruptedException
- Specified by:
poll
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
- Throws:
InterruptedException
remainingCapacity
public int remainingCapacity()
- Specified by:
remainingCapacity
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
drainTo
public int drainTo(Collection coll)
- Specified by:
drainTo
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
drainTo
public int drainTo(Collection coll,
int maximumElements)
- Specified by:
drainTo
in interface edu.emory.mathcs.backport.java.util.concurrent.BlockingQueue
clear
public void clear()
- Specified by:
clear
in interface Collection
- Overrides:
clear
in class AbstractCollection
removeAll
public boolean removeAll(Collection coll)
- Specified by:
removeAll
in interface Collection
- Overrides:
removeAll
in class AbstractCollection
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll
in interface Collection
- Overrides:
retainAll
in class AbstractCollection
close
public void close()
getJmsClient
protected JmsClient getJmsClient()
equals
protected boolean equals(Object element,
Object value)
- returns true if both values are null or identical or equal to each other
Copyright © 2012 LogicBlaze, Inc.. All Rights Reserved.