package org.mockejb.jms;
import java.util.Enumeration;
import javax.jms.*;
class QueueBrowserImpl implements QueueBrowser {
private MockQueue queue;
QueueBrowserImpl(MockQueue queue) {
this.queue = queue;
}
public Queue getQueue() throws JMSException {
return queue;
}
public String getMessageSelector() throws JMSException {
return null;
}
public Enumeration getEnumeration() throws JMSException {
return new CollectionEnumeration(queue.getMessages().iterator());
}
public void close() throws JMSException {
}
}