1 24 package com.scalagent.kjoram.jms; 25 26 import java.util.Vector ; 27 import java.util.Hashtable ; 28 import java.util.Enumeration ; 29 30 34 public class ConsumerDenyRequest extends AbstractJmsRequest 35 { 36 37 private String id; 38 39 private boolean queueMode; 40 41 private boolean doNotAck = false; 42 43 51 public ConsumerDenyRequest(String targetName, String id, boolean queueMode) 52 { 53 super(targetName); 54 this.id = id; 55 this.queueMode = queueMode; 56 } 57 58 68 public ConsumerDenyRequest(String targetName, String id, boolean queueMode, 69 boolean doNotAck) 70 { 71 super(targetName); 72 this.id = id; 73 this.queueMode = queueMode; 74 this.doNotAck = doNotAck; 75 } 76 77 80 public ConsumerDenyRequest() 81 {} 82 83 84 public void setId(String id) 85 { 86 this.id = id; 87 } 88 89 90 public void setQueueMode(boolean queueMode) 91 { 92 this.queueMode = queueMode; 93 } 94 95 96 public void setDoNotAck(boolean doNotAck) 97 { 98 this.doNotAck = doNotAck; 99 } 100 101 102 public String getId() 103 { 104 return id; 105 } 106 107 108 public boolean getQueueMode() 109 { 110 return queueMode; 111 } 112 113 117 public boolean getDoNotAck() 118 { 119 return doNotAck; 120 } 121 122 public Hashtable soapCode() { 123 Hashtable h = super.soapCode(); 124 if (id != null) 125 h.put("id",id); 126 h.put("queueMode",new Boolean (queueMode)); 127 h.put("doNotAck",new Boolean (doNotAck)); 128 return h; 129 } 130 131 public static Object soapDecode(Hashtable h) { 132 ConsumerDenyRequest req = new ConsumerDenyRequest(); 133 req.setRequestId(((Integer ) h.get("requestId")).intValue()); 134 req.setTarget((String ) h.get("target")); 135 req.setId((String ) h.get("id")); 136 req.setQueueMode(((Boolean ) h.get("queueMode")).booleanValue()); 137 req.setDoNotAck(((Boolean ) h.get("doNotAck")).booleanValue()); 138 return req; 139 } 140 } 141 | Popular Tags |