KickJava   Java API By Example, From Geeks To Geeks.

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


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>BridgeQueue</code> agent is an agent hosting a bridge queue,
32  * and which behaviour is provided by a <code>BridgeQueueImpl</code> instance.
33  *
34  * @see BridgeQueueImpl
35  */

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

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

54   public DestinationImpl createsImpl(AgentId adminId) {
55     BridgeQueueImpl queueImpl = new BridgeQueueImpl(getId(), adminId);
56     queueImpl.init(prop);
57     return queueImpl;
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