KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > scalagent > kjoram > jms > GetAdminTopicReply


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2001 - ScalAgent Distributed Technologies
4  * Copyright (C) 1996 - Dyade
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 any 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(s): Frederic Maistre (INRIA)
22  * Contributor(s): Nicolas Tachker (ScalAgent)
23  */

24 package com.scalagent.kjoram.jms;
25
26 import java.util.Hashtable JavaDoc;
27 import java.util.Enumeration JavaDoc;
28
29 /**
30  * A <code>GetAdminTopicReply</code> is sent by an administrator proxy for
31  * notifying an administrator client of the identifier of the local admin
32  * topic.
33  */

34 public class GetAdminTopicReply extends AbstractJmsReply
35 {
36   /** Identifier of the admin topic. */
37   private String JavaDoc id;
38
39   /**
40    * Constructs a <code>GetAdminTopicReply</code> instance.
41    *
42    * @param request The <code>GetAdminTopicRequest</code> being answered.
43    * @param id The identifier of the admin topic.
44    */

45   public GetAdminTopicReply(GetAdminTopicRequest request, String JavaDoc id)
46   {
47     super(request.getRequestId());
48     this.id = id;
49   }
50
51   /**
52    * Constructs a <code>GetAdminTopicReply</code> instance.
53    */

54   public GetAdminTopicReply()
55   {}
56
57   /** Sets the identifier of the admin topic. */
58   public void setId(String JavaDoc id)
59   {
60     this.id = id;
61   }
62
63   /** Returns the identifier of the admin topic. */
64   public String JavaDoc getId()
65   {
66     return id;
67   }
68
69   public Hashtable JavaDoc soapCode() {
70     Hashtable JavaDoc h = super.soapCode();
71     if (id != null)
72       h.put("id",id);
73     return h;
74   }
75
76   public static Object JavaDoc soapDecode(Hashtable JavaDoc h) {
77     GetAdminTopicReply req = new GetAdminTopicReply();
78     req.setCorrelationId(((Integer JavaDoc) h.get("correlationId")).intValue());
79     req.setId((String JavaDoc) h.get("id"));
80     return req;
81   }
82 }
83
Popular Tags