1 10 11 package org.mule.umo.provider; 12 13 import org.mule.umo.UMOExceptionPayload; 14 15 import javax.activation.DataHandler ; 16 import java.io.Serializable ; 17 import java.util.Map ; 18 import java.util.Set ; 19 20 27 public interface UMOMessageAdapter extends Serializable 28 { 29 30 35 void addProperties(Map properties); 36 37 40 void clearProperties(); 41 42 48 Object getProperty(String key); 49 50 56 void setProperty(String key, Object value); 57 58 64 Object removeProperty(String key); 65 66 74 String getPayloadAsString(String encoding) throws Exception ; 75 76 83 String getPayloadAsString() throws Exception ; 84 85 88 Set getPropertyNames(); 89 90 96 byte[] getPayloadAsBytes() throws Exception ; 97 98 101 Object getPayload(); 102 103 111 String getUniqueId(); 112 113 120 Object getProperty(String name, Object defaultValue); 121 122 129 int getIntProperty(String name, int defaultValue); 130 131 138 long getLongProperty(String name, long defaultValue); 139 140 147 double getDoubleProperty(String name, double defaultValue); 148 149 156 boolean getBooleanProperty(String name, boolean defaultValue); 157 158 164 void setBooleanProperty(String name, boolean value); 165 166 172 void setIntProperty(String name, int value); 173 174 180 void setLongProperty(String name, long value); 181 182 188 void setDoubleProperty(String name, double value); 189 190 197 String getStringProperty(String name, String defaultValue); 198 199 205 void setStringProperty(String name, String value); 206 207 218 void setCorrelationId(String id); 219 220 232 String getCorrelationId(); 233 234 240 int getCorrelationSequence(); 241 242 248 void setCorrelationSequence(int sequence); 249 250 255 int getCorrelationGroupSize(); 256 257 262 void setCorrelationGroupSize(int size); 263 264 272 void setReplyTo(Object replyTo); 273 274 282 Object getReplyTo(); 283 284 291 UMOExceptionPayload getExceptionPayload(); 292 293 300 void setExceptionPayload(UMOExceptionPayload payload); 301 302 void addAttachment(String name, DataHandler dataHandler) throws Exception ; 303 304 void removeAttachment(String name) throws Exception ; 305 306 DataHandler getAttachment(String name); 307 308 Set getAttachmentNames(); 309 310 318 String getEncoding(); 319 320 325 void setEncoding(String encoding); 326 327 } 328 | Popular Tags |