1 24 package com.scalagent.kjoram.jms; 25 26 import java.util.Hashtable ; 27 import java.util.Enumeration ; 28 29 33 public class ConsumerSubRequest extends AbstractJmsRequest 34 { 35 36 private String subName; 37 38 private String selector; 39 43 private boolean noLocal; 44 45 private boolean durable; 46 47 56 public ConsumerSubRequest(String topic, String subName, String selector, 57 boolean noLocal, boolean durable) 58 { 59 super(topic); 60 this.subName = subName; 61 this.selector = selector; 62 this.noLocal = noLocal; 63 this.durable = durable; 64 } 65 66 69 public ConsumerSubRequest() 70 {} 71 72 73 public void setSubName(String subName) 74 { 75 this.subName = subName; 76 } 77 78 79 public void setSelector(String selector) 80 { 81 this.selector = selector; 82 } 83 84 85 public void setNoLocal(boolean noLocal) 86 { 87 this.noLocal = noLocal; 88 } 89 90 91 public void setDurable(boolean durable) 92 { 93 this.durable = durable; 94 } 95 96 97 public String getSubName() 98 { 99 return subName; 100 } 101 102 103 public String getSelector() 104 { 105 return selector; 106 } 107 108 109 public boolean getNoLocal() 110 { 111 return noLocal; 112 } 113 114 115 public boolean getDurable() 116 { 117 return durable; 118 } 119 120 public Hashtable soapCode() { 121 Hashtable h = super.soapCode(); 122 if (subName != null) 123 h.put("subName",subName); 124 if (selector != null) 125 h.put("selector",selector); 126 h.put("noLocal",new Boolean (noLocal)); 127 h.put("durable",new Boolean (durable)); 128 return h; 129 } 130 131 public static Object soapDecode(Hashtable h) { 132 ConsumerSubRequest req = new ConsumerSubRequest(); 133 req.setRequestId(((Integer ) h.get("requestId")).intValue()); 134 req.setTarget((String ) h.get("target")); 135 req.setSubName((String ) h.get("subName")); 136 req.setSelector((String ) h.get("selector")); 137 req.setNoLocal(((Boolean ) h.get("noLocal")).booleanValue()); 138 req.setDurable(((Boolean ) h.get("durable")).booleanValue()); 139 return req; 140 } 141 } 142 | Popular Tags |