1 22 package org.jboss.ejb3.metamodel; 23 24 import org.jboss.logging.Logger; 25 import java.util.List ; 26 import java.util.ArrayList ; 27 28 32 public class Consumer extends EnterpriseBean 33 { 34 private static final Logger log = Logger.getLogger(Consumer.class); 35 36 private String destination = null; 37 private String destinationType = null; 38 private CurrentMessage currentMessage = null; 39 private MessageProperties messageProperties = null; 40 private List producers = new ArrayList (); 41 private List localProducers = new ArrayList (); 42 43 public String getDestination() 44 { 45 return destination; 46 } 47 48 public void setDestination(String destination) 49 { 50 this.destination = destination; 51 } 52 53 public String getDestinationType() 54 { 55 return destinationType; 56 } 57 58 public void setDestinationType(String destinationType) 59 { 60 this.destinationType = destinationType; 61 } 62 63 public CurrentMessage getCurrentMessage() 64 { 65 return currentMessage; 66 } 67 68 public void setCurrentMessage(CurrentMessage currentMessage) 69 { 70 this.currentMessage = currentMessage; 71 } 72 73 public MessageProperties getMessageProperties() 74 { 75 return messageProperties; 76 } 77 78 public void setMessageProperties(MessageProperties messageProperties) 79 { 80 this.messageProperties = messageProperties; 81 } 82 83 public List getProducers() 84 { 85 return producers; 86 } 87 88 public void addProducer(Producer producer) 89 { 90 producers.add(producer); 91 } 92 93 public List getLocalProducers() 94 { 95 return localProducers; 96 } 97 98 public void addLocalProducer(Producer producer) 99 { 100 localProducers.add(producer); 101 } 102 103 public String toString() 104 { 105 StringBuffer sb = new StringBuffer (100); 106 sb.append("[Consumer:"); 107 sb.append(super.toString()); 108 sb.append(", destination=" + destination); 109 sb.append(", destinationType=" + destinationType); 110 sb.append(']'); 111 return sb.toString(); 112 } 113 } 114 | Popular Tags |