KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_rar > deployment > xml > InboundResourceadapter


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  *
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or 1any later version.
11  *
12  * This library 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 library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  *
22  * Initial developer: Eric Hardesty
23  * --------------------------------------------------------------------------
24  * $Id: InboundResourceadapter.java,v 1.2 2003/11/20 17:04:08 benoitf Exp $
25  * --------------------------------------------------------------------------
26  */

27 package org.objectweb.jonas_rar.deployment.xml;
28
29 import org.objectweb.jonas_lib.deployment.xml.AbsElement;
30
31 /**
32  * This class defines the implementation of the element inboundResourceadapter
33  *
34  * @author Eric Hardesty
35  */

36
37 public class InboundResourceadapter extends AbsElement {
38
39     /**
40      * authentication-mechanism
41      */

42     private Messageadapter messageadapter = null;
43
44     /**
45      * Constructor
46      */

47     public InboundResourceadapter() {
48         super();
49     }
50
51     /**
52      * Gets the messageadapter
53      * @return the messageadapter
54      */

55     public Messageadapter getMessageadapter() {
56         return messageadapter;
57     }
58
59     /**
60      * Set the messageadapter
61      * @param messageadapter messageadapter
62      */

63     public void setMessageadapter(Messageadapter messageadapter) {
64         this.messageadapter = messageadapter;
65     }
66
67     /**
68      * Represents this element by it's XML description.
69      * @param indent use this indent for prefixing XML representation.
70      * @return the XML description of this object.
71      */

72     public String JavaDoc toXML(int indent) {
73         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
74         sb.append(indent(indent));
75         sb.append("<inbound-resourceadapter>\n");
76
77         indent += 2;
78
79         // messageadapter
80
if (messageadapter != null) {
81             sb.append(messageadapter.toXML(indent));
82         }
83         indent -= 2;
84         sb.append(indent(indent));
85         sb.append("</inbound-resourceadapter>\n");
86
87         return sb.toString();
88     }
89 }
90
Popular Tags