1 21 22 package com.rift.coad.daemon.messageservice; 24 25 import java.io.Serializable ; 27 import java.util.Date ; 28 import java.util.Enumeration ; 29 import java.util.List ; 30 31 36 public interface Message extends Serializable { 37 38 41 public final static int POINT_TO_POINT = 1; 42 43 47 public final static int POINT_TO_SERVICE = 2; 48 49 53 public final static int POINT_TO_MULTI_SERVICE = 3; 54 55 58 public final static int UNDELIVERED = 1; 59 60 63 public final static int DELIVERED = 2; 64 65 68 public final static int UNDELIVERABLE = 3; 69 70 71 74 public final static int WARN = 1; 75 76 77 80 public final static int ERROR = 2; 81 82 83 86 public final static int CRITICAL = 3; 87 92 public String getMessageId(); 93 94 95 100 public Date getCreated(); 101 102 103 108 public int getRetries(); 109 110 111 114 public void incrementRetries(); 115 116 117 120 public Date getProcessedDate(); 121 122 123 128 public void setProcessedDate(Date processedDate); 129 130 131 134 public String getMessageCreater(); 135 136 137 143 public String getSessionId(); 144 145 146 151 public List getMessagePrincipals(); 152 153 154 159 public int getMessageType(); 160 161 162 167 public void setMessageType(int messageType); 168 169 177 public String getTarget() throws MessageServiceException, 178 InvalidMessageType; 179 180 181 188 public void setTarget(String target) throws MessageServiceException, 189 InvalidMessageType; 190 191 192 199 public String [] getServices() throws MessageServiceException, 200 InvalidMessageType; 201 202 203 210 public void setServices(String [] services) throws MessageServiceException, 211 InvalidMessageType; 212 213 214 220 public String getFrom() throws MessageServiceException; 221 222 223 229 public void setFrom(String from) throws MessageServiceException; 230 231 232 239 public String getReplyTo() throws MessageServiceException; 240 241 242 249 public void setReplyTo(String replyTo) throws MessageServiceException; 250 251 252 258 public String getTargetNamedQueue() throws MessageServiceException; 259 260 261 267 public void setTargetNamedQueue(String name) throws MessageServiceException; 268 269 270 277 public String getReplyNamedQueue() throws MessageServiceException; 278 279 280 287 public void setReplyNamedQueue(String name) throws MessageServiceException; 288 289 290 297 public boolean getReply() throws MessageServiceException; 298 299 300 306 public void setReply(boolean value) throws MessageServiceException; 307 308 309 315 public int getPriority(); 316 317 318 324 public void setPriority(int priority) throws MessageServiceException; 325 326 327 334 public void setCorrelationId(String id) throws MessageServiceException; 335 336 337 343 public String getCorrelationId() throws MessageServiceException; 344 345 346 351 public void clearBody() throws MessageServiceException; 352 353 354 359 public void clearProperties() throws MessageServiceException; 360 361 362 369 public boolean containsProperty(String name) throws MessageServiceException; 370 371 372 380 public boolean getBooleanProperty(String name) throws 381 MessageServiceException, InvalidProperty; 382 383 384 392 public byte getByteProperty(String name) throws 393 MessageServiceException, InvalidProperty; 394 395 396 404 public double getDoubleProperty(String name) throws 405 MessageServiceException, InvalidProperty; 406 407 408 416 public float getFloatProperty(String name) throws 417 MessageServiceException, InvalidProperty; 418 419 420 428 public int getIntProperty(String name) throws 429 MessageServiceException, InvalidProperty; 430 431 432 440 public long getLongProperty(String name) throws 441 MessageServiceException, InvalidProperty; 442 443 444 452 public Object getObjectProperty(String name) throws 453 MessageServiceException, InvalidProperty; 454 455 456 464 public String getStringProperty(String name) throws 465 MessageServiceException, InvalidProperty; 466 467 468 476 public Object getPropertyValue(String name) throws 477 MessageServiceException, InvalidProperty; 478 479 480 486 public Enumeration getPropertyNames() throws MessageServiceException; 487 488 489 496 public boolean propertyExists(String name) throws MessageServiceException; 497 498 499 506 public void setBooleanProperty(String name, boolean value) throws 507 MessageServiceException; 508 509 510 517 public void setByteProperty(String name, byte value) throws 518 MessageServiceException; 519 520 521 528 public void setDoubleProperty(String name, double value) throws 529 MessageServiceException; 530 531 532 539 public void setFloatProperty(String name, float value) throws 540 MessageServiceException; 541 542 543 550 public void setIntProperty(String name, int value) throws 551 MessageServiceException; 552 553 554 561 public void setLongProperty(String name, long value) throws 562 MessageServiceException; 563 564 565 573 public void setObjectProperty(String name, Object value) throws 574 MessageServiceException; 575 576 577 584 public void setStringProperty(String name, String value) throws 585 MessageServiceException; 586 587 588 596 public void setPropertyValue(String name,Object value) throws 597 MessageServiceException, InvalidProperty; 598 599 600 606 public void acknowledge() throws MessageServiceException; 607 608 609 615 public boolean isAcknowledged() throws MessageServiceException; 616 617 618 624 public int getState() throws MessageServiceException; 625 626 627 630 public List getErrors() throws MessageServiceException; 631 632 633 639 public void addError(int level, String msg) throws MessageServiceException; 640 } 641 | Popular Tags |