1 10 11 package org.mule.providers.gs; 12 13 import java.util.Map ; 14 15 import net.jini.core.entry.Entry; 16 17 import org.mule.umo.UMOExceptionPayload; 18 import org.mule.util.MapUtils; 19 20 23 public class JiniMessage implements Entry 24 { 25 28 private static final long serialVersionUID = 2373851288156547780L; 29 30 public Object destination; 31 public Object payload; 32 public String correlationId; 33 public Integer correlationSequence; 34 public Integer correlationGroupSize; 35 public Object replyTo; 36 public String messageId; 37 public Map properties; 38 public String encoding; 39 public UMOExceptionPayload exceptionPayload; 40 public String payloadType; 41 42 public JiniMessage() 43 { 44 super(); 45 } 46 47 51 public JiniMessage(Object destination, Object payload) 52 { 53 super(); 54 this.destination = destination; 55 setPayload(payload); 56 } 57 58 public String getCorrelationId() 59 { 60 return correlationId; 61 } 62 63 public void setCorrelationId(String correlationId) 64 { 65 this.correlationId = correlationId; 66 } 67 68 public Integer getCorrelationSequence() 69 { 70 return correlationSequence; 71 } 72 73 public void setCorrelationSequence(Integer correlationSequence) 74 { 75 this.correlationSequence = correlationSequence; 76 } 77 78 public Integer getCorrelationGroupSize() 79 { 80 return correlationGroupSize; 81 } 82 83 public void setCorrelationGroupSize(Integer correlationGroupSize) 84 { 85 this.correlationGroupSize = correlationGroupSize; 86 } 87 88 public Object getReplyTo() 89 { 90 return replyTo; 91 } 92 93 public void setReplyTo(Object replyTo) 94 { 95 this.replyTo = replyTo; 96 } 97 98 public String getMessageId() 99 { 100 return messageId; 101 } 102 103 public void setMessageId(String messageId) 104 { 105 this.messageId = messageId; 106 } 107 108 111 public Object getDestination() 112 { 113 return destination; 114 } 115 116 119 public void setDestination(Object destination) 120 { 121 this.destination = destination; 122 } 123 124 127 public Object getPayload() 128 { 129 return payload; 130 } 131 132 135 public void setPayload(Object payload) 136 { 137 this.payload = payload; 138 if (payload != null) 139 { 140 payloadType = payload.getClass().getName(); 141 } 142 else 143 { 144 payloadType = null; 145 } 146 } 147 148 public Map getProperties() 149 { 150 return properties; 151 } 152 153 public void setProperties(Map properties) 154 { 155 this.properties = properties; 156 } 157 158 public String getEncoding() 159 { 160 return encoding; 161 } 162 163 public void setEncoding(String encoding) 164 { 165 this.encoding = encoding; 166 } 167 168 public UMOExceptionPayload getExceptionPayload() 169 { 170 return exceptionPayload; 171 } 172 173 public void setExceptionPayload(UMOExceptionPayload exceptionPayload) 174 { 175 this.exceptionPayload = exceptionPayload; 176 } 177 178 public String getPayloadType() 179 { 180 return payloadType; 181 } 182 183 public void setPayloadType(String payloadType) 184 { 185 this.payloadType = payloadType; 186 } 187 188 public String toString() 189 { 190 StringBuffer buf = new StringBuffer (120); 191 buf.append(getClass().getName()); 192 buf.append('{'); 193 buf.append("id=").append(getMessageId()); 194 buf.append(", payload=").append((getPayload() != null ? getPayload().getClass().getName() : "null")); 195 buf.append(", correlationId=").append(getCorrelationId()); 196 buf.append(", correlationGroup=").append(getCorrelationGroupSize()); 197 buf.append(", correlationSeq=").append(getCorrelationSequence()); 198 buf.append(", encoding=").append(getEncoding()); 199 buf.append(", exceptionPayload=").append(getExceptionPayload()); 200 buf.append(", properties=").append(MapUtils.toString(properties, true)); 201 buf.append('}'); 202 return buf.toString(); 203 } 204 205 } 206 | Popular Tags |