1 7 package org.jboss.jms.client; 8 9 import java.util.Enumeration ; 10 11 import javax.jms.JMSException ; 12 import javax.jms.Queue ; 13 import javax.jms.QueueBrowser ; 14 15 21 public class JBossBrowser 22 implements QueueBrowser 23 { 24 26 28 29 private BrowserDelegate delegate; 30 31 32 private Queue queue; 33 34 35 private String selector; 36 37 39 41 43 51 public JBossBrowser(BrowserDelegate delegate, Queue queue, String selector) 52 throws JMSException 53 { 54 this.delegate = delegate; 55 this.queue = queue; 56 this.selector = selector; 57 } 58 59 61 public void close() throws JMSException 62 { 63 delegate.closing(); 64 delegate.close(); 65 } 66 67 public Enumeration getEnumeration() throws JMSException 68 { 69 return new BrowserEnumeration(delegate.browse()); 70 } 71 72 public String getMessageSelector() throws JMSException 73 { 74 return selector; 75 } 76 77 public Queue getQueue() throws JMSException 78 { 79 return queue; 80 } 81 82 84 86 88 90 } 91 | Popular Tags |