1 25 package org.objectweb.joram.client.jms.admin; 26 27 import org.objectweb.joram.client.jms.Destination; 28 import org.objectweb.joram.client.jms.Queue; 29 import org.objectweb.joram.client.jms.Topic; 30 import org.objectweb.joram.shared.admin.*; 31 32 import java.net.ConnectException ; 33 34 35 40 public class AdminHelper 41 { 42 56 public static void setClusterLink(Topic clusterTopic, Topic joiningTopic) 57 throws ConnectException , AdminException 58 { 59 AdminModule.doRequest(new SetCluster(clusterTopic.getName(), 60 joiningTopic.getName())); 61 } 62 63 75 public static void unsetClusterLink(Topic topic) 76 throws ConnectException , AdminException 77 { 78 AdminModule.doRequest(new UnsetCluster(topic.getName())); 79 } 80 81 94 public static void setHierarchicalLink(Topic father, Topic son) 95 throws ConnectException , AdminException 96 { 97 AdminModule.doRequest(new SetFather(father.getName(), son.getName())); 98 } 99 100 112 public static void unsetHierarchicalLink(Topic topic) 113 throws ConnectException , AdminException 114 { 115 AdminModule.doRequest(new UnsetFather(topic.getName())); 116 } 117 118 119 133 public static void setQueueCluster(Queue clusterQueue, Queue joiningQueue) 134 throws ConnectException , AdminException { 135 AdminModule.doRequest( 136 new AddQueueCluster(clusterQueue.getName(), joiningQueue.getName())); 137 } 138 139 public static void setQueueCluster(Destination clusterQueue, 140 Queue joiningQueue) 141 throws ConnectException , AdminException { 142 AdminModule.doRequest( 143 new AddQueueCluster(clusterQueue.getName(), joiningQueue.getName())); 144 } 145 146 159 public static void leaveQueueCluster(Queue clusterQueue, Queue leaveQueue) 160 throws ConnectException , AdminException { 161 AdminModule.doRequest( 162 new RemoveQueueCluster(clusterQueue.getName(), leaveQueue.getName())); 163 } 164 165 174 public static AdminReply listQueueCluster(Queue clusterQueue) 175 throws ConnectException , AdminException { 176 return AdminModule.doRequest( 177 new ListClusterQueue(clusterQueue.getName())); 178 } 179 } 180 | Popular Tags |