Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 22 package org.jboss.mq; 23 24 import java.io.Serializable ; 25 26 32 public class DurableSubscriptionID implements Serializable  33 { 34 36 37 private static final long serialVersionUID = 2293499797647000970L; 38 39 41 42 String clientID; 43 44 String subscriptionName; 45 46 String selector; 47 48 50 52 59 60 public DurableSubscriptionID(String id, String subName, String selector) 61 { 62 this.clientID = id; 63 this.subscriptionName = subName; 64 this.selector = selector; 65 } 66 67 69 74 public void setClientID(String newClientID) 75 { 76 clientID = newClientID; 77 } 78 79 84 public void setSubscriptionName(java.lang.String newSubscriptionName) 85 { 86 subscriptionName = newSubscriptionName; 87 } 88 89 94 public String getClientID() 95 { 96 return clientID; 97 } 98 99 104 public String getSubscriptionName() 105 { 106 return subscriptionName; 107 } 108 113 public String getSelector() 114 { 115 if (selector == null || selector.trim().length() == 0) 116 return null; 117 return selector; 118 } 119 120 125 public void setSelector(String selector) 126 { 127 this.selector = selector; 128 } 129 130 132 public boolean equals(Object obj) 133 { 134 try 135 { 136 DurableSubscriptionID o = (DurableSubscriptionID) obj; 137 return o.clientID.equals(clientID) && o.subscriptionName.equals(subscriptionName); 138 } 139 catch (Throwable e) 140 { 141 return false; 142 } 143 } 144 145 public int hashCode() 146 { 147 return Integer.MIN_VALUE + clientID.hashCode() + subscriptionName.hashCode(); 148 } 149 150 public String toString() 151 { 152 StringBuffer buffer = new StringBuffer (100); 153 buffer.append("DurableSubscription[clientId=").append(clientID); 154 buffer.append(" name=").append(subscriptionName); 155 buffer.append(" selector=").append(selector); 156 buffer.append(']'); 157 return buffer.toString(); 158 } 159 160 162 164 166 }
| Popular Tags
|