org/objectweb/joram/client/jms/admin/AdminHelper.java

00001 /*
00002  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
00003  * Copyright (C) 2004 - Bull SA
00004  * Copyright (C) 2004 - ScalAgent Distributed Technologies
00005  * Copyright (C) 2004 - France Telecom R&D
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or any later version.
00011  * 
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020  * USA.
00021  *
00022  * Initial developer(s): Nicolas Tachker (ScalAgent)
00023  * Contributor(s): Frederic Maistre (Bull SA)
00024  */
00025 package org.objectweb.joram.client.jms.admin;
00026 
00027 import org.objectweb.joram.client.jms.Destination;
00028 import org.objectweb.joram.client.jms.Queue;
00029 import org.objectweb.joram.client.jms.Topic;
00030 import org.objectweb.joram.shared.admin.*;
00031 
00032 import java.net.ConnectException;
00033 
00034 
00040 public class AdminHelper
00041 {
00056   public static void setClusterLink(Topic clusterTopic, Topic joiningTopic)
00057          throws ConnectException, AdminException
00058   {
00059     AdminModule.doRequest(new SetCluster(clusterTopic.getName(),
00060                                          joiningTopic.getName()));
00061   }
00062 
00075   public static void unsetClusterLink(Topic topic)
00076          throws ConnectException, AdminException
00077   {
00078     AdminModule.doRequest(new UnsetCluster(topic.getName()));
00079   }
00080 
00094   public static void setHierarchicalLink(Topic father, Topic son)
00095          throws ConnectException, AdminException
00096   {
00097     AdminModule.doRequest(new SetFather(father.getName(), son.getName()));
00098   }
00099 
00112   public static void unsetHierarchicalLink(Topic topic)
00113          throws ConnectException, AdminException 
00114   {
00115     AdminModule.doRequest(new UnsetFather(topic.getName()));
00116   }
00117 
00118 
00133   public static void setQueueCluster(Queue clusterQueue, Queue joiningQueue)
00134     throws ConnectException, AdminException {
00135     AdminModule.doRequest(
00136       new AddQueueCluster(clusterQueue.getName(), joiningQueue.getName()));
00137   }
00138 
00139   public static void setQueueCluster(Destination clusterQueue,
00140                                      Queue joiningQueue)
00141     throws ConnectException, AdminException {
00142     AdminModule.doRequest(
00143       new AddQueueCluster(clusterQueue.getName(), joiningQueue.getName()));
00144   }
00145 
00159   public static void leaveQueueCluster(Queue clusterQueue, Queue leaveQueue)
00160     throws ConnectException, AdminException {
00161     AdminModule.doRequest(
00162       new RemoveQueueCluster(clusterQueue.getName(), leaveQueue.getName()));
00163   }
00164 
00174   public static AdminReply listQueueCluster(Queue clusterQueue)
00175     throws ConnectException, AdminException {
00176     return AdminModule.doRequest(
00177       new ListClusterQueue(clusterQueue.getName()));
00178   }
00179 } 

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