KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > metamodel > Consumer


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.ejb3.metamodel;
23
24 import org.jboss.logging.Logger;
25 import java.util.List JavaDoc;
26 import java.util.ArrayList JavaDoc;
27
28 /**
29  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
30  * @version <tt>$Revision: 45242 $</tt>
31  */

32 public class Consumer extends EnterpriseBean
33 {
34    private static final Logger log = Logger.getLogger(Consumer.class);
35    
36    private String JavaDoc destination = null;
37    private String JavaDoc destinationType = null;
38    private CurrentMessage currentMessage = null;
39    private MessageProperties messageProperties = null;
40    private List JavaDoc producers = new ArrayList JavaDoc();
41    private List JavaDoc localProducers = new ArrayList JavaDoc();
42    
43    public String JavaDoc getDestination()
44    {
45       return destination;
46    }
47    
48    public void setDestination(String JavaDoc destination)
49    {
50       this.destination = destination;
51    }
52    
53    public String JavaDoc getDestinationType()
54    {
55       return destinationType;
56    }
57    
58    public void setDestinationType(String JavaDoc 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 JavaDoc getProducers()
84    {
85       return producers;
86    }
87    
88    public void addProducer(Producer producer)
89    {
90       producers.add(producer);
91    }
92    
93    public List JavaDoc getLocalProducers()
94    {
95       return localProducers;
96    }
97    
98    public void addLocalProducer(Producer producer)
99    {
100       localProducers.add(producer);
101    }
102
103    public String JavaDoc toString()
104    {
105       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(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