com/scalagent/kjoram/Topic.java

00001 /*
00002  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
00003  * Copyright (C) 2001 - ScalAgent Distributed Technologies
00004  * Copyright (C) 1996 - Dyade
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or any later version.
00010  * 
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00019  * USA.
00020  *
00021  * Initial developer(s): Frederic Maistre (INRIA)
00022  * Contributor(s): Nicolas Tachker (ScalAgent)
00023  */
00024 package com.scalagent.kjoram;
00025 
00026 import com.scalagent.kjoram.jms.GetAdminTopicRequest;
00027 import com.scalagent.kjoram.jms.GetAdminTopicReply;
00028 
00029 import java.util.Vector;
00030 import java.util.Hashtable;
00031  
00032 import com.scalagent.kjoram.excepts.JMSException;
00033 
00034 
00035 public class Topic extends Destination
00036 {
00042   public Topic(String agentId)
00043   {
00044     super(agentId);
00045   }
00046 
00050   public Topic()
00051   {}
00052 
00054   public String toString()
00055   {
00056     return "Topic:" + agentId;
00057   }
00058 
00064   public String getTopicName() throws JMSException
00065   {
00066     return agentId;
00067   }
00068 
00069   public Hashtable code() {
00070      return super.code();
00071   }
00072 
00073   public static Object decode(Hashtable h) {
00074     Topic ret = 
00075       new Topic((String) h.get("agentId"));
00076     //ret.setId(ret.getClass().getName() + ":" + agentId);
00077     ret.addInstanceTable(ret.getId(), ret);
00078     return ret;
00079   }
00080 }

Generated on Tue Sep 16 16:14:25 2008 for joram by  doxygen 1.5.0