KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_lib > deployment > xml > MessageDestination


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: MessageDestination.java,v 1.2 2004/07/01 15:35:10 sauthieg Exp $
24  * --------------------------------------------------------------------------
25  */

26
27 package org.objectweb.jonas_lib.deployment.xml;
28
29 /**
30  * This class defines the implementation of the element message-destination.
31  * @author Eric Hardesty
32  */

33 public class MessageDestination extends AbsElement {
34
35     /**
36      * Name of this message-destination
37      */

38     private String JavaDoc messageDestinationName = null;
39
40
41     // Setters
42

43     /**
44      * Sets the name
45      * @param name the name to use
46      */

47     public void setMessageDestinationName(String JavaDoc name) {
48         this.messageDestinationName = name;
49     }
50
51
52     // Getters
53

54     /**
55      * @return the name of the jonas-message-destination
56      */

57     public String JavaDoc getMessageDestinationName() {
58         return messageDestinationName;
59     }
60
61
62     /**
63      * Represents this element by it's XML description.
64      * @param indent use this indent for prexifing XML representation.
65      * @return the XML description of this object.
66      */

67     public String JavaDoc toXML(int indent) {
68         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
69         sb.append(indent(indent));
70         sb.append("<message-destination>\n");
71
72         indent += 2;
73
74         // name
75
sb.append(xmlElement(messageDestinationName, "message-destination-name", indent));
76
77         indent -= 2;
78         sb.append(indent(indent));
79         sb.append("</message-destination>\n");
80
81         return sb.toString();
82     }
83
84
85
86 }
87
Popular Tags