1 package ch.qos.logback.classic.net.mock; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 import javax.jms.Destination; 7 import javax.jms.JMSException; 8 import javax.jms.Message; 9 import javax.jms.Queue; 10 import javax.jms.QueueSender; 11 12 public class MockQueueSender implements QueueSender { 13 14 List<Message> messageList = new ArrayList<Message>(); 15 Queue queue; 16 17 public MockQueueSender(Queue queue) { 18 this.queue = queue; 19 } 20 21 public List<Message> getMessageList() { 22 return messageList; 23 } 24 25 public Queue getQueue() throws JMSException { 26 return queue; 27 } 28 29 public void send(Message message) throws JMSException { 30 messageList.add(message); 31 32 } 33 34 public void send(Queue arg0, Message arg1) throws JMSException { 35 36 37 } 38 39 public void send(Message arg0, int arg1, int arg2, long arg3) throws JMSException { 40 41 42 } 43 44 public void send(Queue arg0, Message arg1, int arg2, int arg3, long arg4) throws JMSException { 45 46 47 } 48 49 public void close() throws JMSException { 50 51 52 } 53 54 public int getDeliveryMode() throws JMSException { 55 56 return 0; 57 } 58 59 public Destination getDestination() throws JMSException { 60 61 return null; 62 } 63 64 public boolean getDisableMessageID() throws JMSException { 65 66 return false; 67 } 68 69 public boolean getDisableMessageTimestamp() throws JMSException { 70 71 return false; 72 } 73 74 public int getPriority() throws JMSException { 75 76 return 0; 77 } 78 79 public long getTimeToLive() throws JMSException { 80 81 return 0; 82 } 83 84 public void send(Destination arg0, Message arg1) throws JMSException { 85 86 87 } 88 89 public void send(Destination arg0, Message arg1, int arg2, int arg3, long arg4) throws JMSException { 90 91 92 } 93 94 public void setDeliveryMode(int arg0) throws JMSException { 95 96 97 } 98 99 public void setDisableMessageID(boolean arg0) throws JMSException { 100 101 102 } 103 104 public void setDisableMessageTimestamp(boolean arg0) throws JMSException { 105 106 107 } 108 109 public void setPriority(int arg0) throws JMSException { 110 111 112 } 113 114 public void setTimeToLive(long arg0) throws JMSException { 115 116 117 } 118 119 120 121 }