00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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 }