KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_lib > deployment > api > MessageDestinationRefDesc


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or 1any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * Initial developer: Eric Hardesty
22  * --------------------------------------------------------------------------
23  * $Id: MessageDestinationRefDesc.java,v 1.3 2004/07/16 13:57:50 benoitf Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas_lib.deployment.api;
28
29 import org.objectweb.jonas_lib.deployment.xml.JonasMessageDestinationRef;
30 import org.objectweb.jonas_lib.deployment.xml.MessageDestinationRef;
31
32 /**
33  * This class represents the description of a MessageDestinationRef object
34  * @author Eric Hardesty
35  */

36 public class MessageDestinationRefDesc {
37
38     /**
39      * The name of the message destination ref
40      */

41     private String JavaDoc messageDestinationRefName = null;
42
43     /**
44      * The type of the message destination ref
45      */

46     private String JavaDoc messageDestinationType = null;
47
48     /**
49      * The usage of the message destination ref.
50      */

51     private String JavaDoc messageDestinationUsage = null;
52
53     /**
54      * The link of the message destination ref.
55      */

56     private String JavaDoc messageDestinationLink = null;
57
58     /**
59      * The jndi name of the message destination ref.
60      */

61     private String JavaDoc jndiName = null;
62
63
64     /**
65      * Construct a descriptor for an message-destination-ref tag.
66      * @param messageDestinationRef the messageDestination ref result of the xml parsing.
67      * @param jonasMessageDestinationRef the jonas messageDestinationRef result of the xml parsing.
68      * @throws DeploymentDescException when missing information for
69      * creating the MessageDestinationRefDesc.
70      */

71     public MessageDestinationRefDesc(MessageDestinationRef messageDestinationRef,
72                                       JonasMessageDestinationRef jonasMessageDestinationRef)
73                        throws DeploymentDescException {
74         messageDestinationRefName = messageDestinationRef.getMessageDestinationRefName();
75         messageDestinationType = messageDestinationRef.getMessageDestinationType();
76         messageDestinationUsage = messageDestinationRef.getMessageDestinationUsage();
77         messageDestinationLink = messageDestinationRef.getMessageDestinationLink();
78         jndiName = null;
79         if (jonasMessageDestinationRef != null) {
80             jndiName = jonasMessageDestinationRef.getJndiName();
81         }
82     }
83
84     /**
85      * Get the name of the message-destination-ref
86      * @return String representation of the message-destination-ref-name.
87      */

88     public String JavaDoc getMessageDestinationRefName() {
89         return messageDestinationRefName;
90     }
91
92     /**
93      * Get the message-destination-type.
94      * @return String representation of the message-destination-type.
95      */

96     public String JavaDoc getMessageDestinationType() {
97         return messageDestinationType;
98     }
99
100     /**
101      * Get the message-destination-usage.
102      * @return String representation of the message-destination-usage.
103      */

104     public String JavaDoc getMessageDestinationUsage() {
105         return messageDestinationUsage;
106     }
107
108     /**
109      * Get the message-destination-link
110      * @return String representation of the message-destination-link
111      */

112     public String JavaDoc getMessageDestinationLink() {
113         return messageDestinationLink;
114     }
115
116
117     /**
118      * Get the jndi name of the message-destination-ref.
119      * @return String representation of the JNDI name
120      */

121     public String JavaDoc getJndiName() {
122         return jndiName;
123     }
124
125     /**
126      * Set the jndi name of the messageDestination-ref.
127      * @param jndiName representation of the JNDI name
128      */

129     public void setJndiName(String JavaDoc jndiName) {
130         this.jndiName = jndiName;
131     }
132
133
134     /**
135      * String representation of the object for test purpose
136      * @return String representation of this object
137      */

138     public String JavaDoc toString() {
139         StringBuffer JavaDoc ret = new StringBuffer JavaDoc();
140         ret.append("\ngetMessageDestinationRefName()=" + getMessageDestinationRefName());
141         ret.append("\ngetMessageDestinationType()=" + getMessageDestinationType());
142         ret.append("\ngetMessageDestinationUsage()=" + getMessageDestinationUsage());
143         ret.append("\ngetMessageDestinationLink()=" + getMessageDestinationLink());
144         ret.append("\ngetJndiName()=" + getJndiName());
145         return ret.toString();
146     }
147
148 }
149
Popular Tags