KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > mom > dest > BridgeTopic


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2004 - ScalAgent Distributed Technologies
4  * Copyright (C) 2003 - Bull SA
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 (Bull SA)
22  * Contributor(s): ScalAgent Distributed Technologies
23  */

24 package org.objectweb.joram.mom.dest;
25
26 import fr.dyade.aaa.agent.AgentId;
27
28 import java.util.Properties JavaDoc;
29
30 /**
31  * A <code>BridgeTopic</code> agent is an agent hosting a bridge topic,
32  * and which behaviour is provided by a <code>BridgeTopicImpl</code> instance.
33  *
34  * @see BridgeTopicImpl
35  */

36 public class BridgeTopic extends Topic {
37   /** The bridge topic's properties. */
38   private transient Properties JavaDoc prop;
39
40   /**
41    * Constructs a <code>BridgeTopic</code> agent.
42    */

43   public BridgeTopic() {
44     super(true);
45   }
46
47   /**
48    * Creates the bridge topic.
49    *
50    * @param adminId Identifier of the bridge topic administrator.
51    *
52    * @exception IllegalArgumentException If the JMS properties are invalid.
53    */

54   public DestinationImpl createsImpl(AgentId adminId) {
55     BridgeTopicImpl topicImpl = new BridgeTopicImpl(getId(), adminId);
56     topicImpl.init(prop);
57     return topicImpl;
58   }
59
60   /**
61    * Sets the bridge properties.
62    */

63   public void setProperties(Properties JavaDoc prop) {
64     this.prop = prop;
65   }
66 }
67
Popular Tags