1 24 package org.objectweb.joram.client.jms.admin; 25 26 import org.objectweb.joram.client.jms.Queue; 27 import org.objectweb.joram.client.jms.Destination; 28 29 import java.net.ConnectException ; 30 31 32 36 public class DeadMQueue extends org.objectweb.joram.client.jms.Queue { 37 38 private final static String DMQ_TYPE = "queue.dmq"; 39 40 public static boolean isDeadMQueue(String type) { 41 return Destination.isAssignableTo(type, DMQ_TYPE); 42 } 43 44 56 public static Queue create(int serverId) throws ConnectException , AdminException { 57 DeadMQueue dmq = new DeadMQueue(); 58 doCreate(serverId, 59 null, 60 "org.objectweb.joram.mom.dest.DeadMQueue", 61 null, 62 dmq, 63 DMQ_TYPE); 64 return dmq; 65 } 66 67 public static Queue create(int serverId, String name) throws ConnectException , AdminException { 68 DeadMQueue dmq = new DeadMQueue(); 69 doCreate(serverId, 70 name, 71 "org.objectweb.joram.mom.dest.DeadMQueue", 72 null, 73 dmq, 74 DMQ_TYPE); 75 return dmq; 76 } 77 78 87 public static Queue create() throws ConnectException , AdminException 88 { 89 return create(AdminModule.getLocalServerId()); 90 } 91 92 public DeadMQueue() {} 94 95 public DeadMQueue(String name) { 96 super(name, DMQ_TYPE); 97 } 98 99 public String toString() { 100 return "DeadMQueue:" + agentId; 101 } 102 } 103 | Popular Tags |