com/scalagent/joram/mom/dest/mail/MailMessage.java

00001 /*
00002  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
00003  * Copyright (C) 2007 - 2008 ScalAgent Distributed Technologies
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00018  * USA.
00019  *
00020  * Initial developer(s): Nicolas Tachker (ScalAgent)
00021  * Contributor(s): 
00022  */
00023 package com.scalagent.joram.mom.dest.mail;
00024 
00025 import org.objectweb.joram.shared.messages.Message;
00026 
00027 
00032 public class MailMessage {
00033   private Message sharedMsg;
00034 
00038   public MailMessage() {
00039     sharedMsg = new Message();
00040   }
00041 
00048   public MailMessage(org.objectweb.joram.shared.messages.Message momMsg) {
00049     this.sharedMsg = momMsg;
00050   } 
00051   
00056   public Message getSharedMessage() {
00057     return sharedMsg;
00058   }
00059   
00066   public int getType() {
00067     return sharedMsg.type;
00068   }
00069 
00074   public String getIdentifier() {
00075     return sharedMsg.id;
00076   }
00077 
00082   public boolean getPersistent() {
00083     return sharedMsg.persistent;
00084   }
00085 
00092   public int getJMSPriority() {
00093     return sharedMsg.priority;
00094   }
00095 
00100   public long getJMSExpiration() {
00101     return sharedMsg.expiration;
00102   }
00103 
00108   public long getTimestamp() {
00109     return sharedMsg.timestamp;
00110   }
00111 
00116   public String getDestinationId() {
00117     return sharedMsg.toId;
00118   }
00119 
00124   public String getToType() {
00125     return sharedMsg.toType;
00126   }
00127 
00132   public String getCorrelationId() {
00133     return sharedMsg.correlationId;
00134   }
00135 
00140   public String getReplyToId() {
00141     return sharedMsg.replyToId;
00142   }
00143 
00148   public String replyToType() {
00149     return sharedMsg.replyToType;
00150   }
00151 
00156   public int getDeliveryCount() {
00157     return sharedMsg.deliveryCount;
00158   }
00159 
00165   public boolean getDenied() {
00166     return sharedMsg.redelivered;
00167   }
00168 
00174   public Object getProperty(String name) {
00175     return sharedMsg.getProperty(name);
00176   }
00177 
00182   public String getText() {
00183     return sharedMsg.getText();
00184   }
00185 
00190   public void setIdentifier(String id) {
00191     sharedMsg.id = id;
00192   }
00193 
00198   public void setPersistent(boolean persistent) {
00199     sharedMsg.persistent = persistent;
00200   }
00201 
00207   public void setPriority(int priority) {
00208     sharedMsg.priority = priority;
00209   }
00210 
00215   public void setExpiration(long expiration) {
00216     sharedMsg.expiration = expiration;
00217   }
00218 
00223   public void setTimestamp(long timestamp) {
00224     sharedMsg.timestamp = timestamp;
00225   }
00226 
00233   public void setDestination(String id, String type) {
00234     sharedMsg.setDestination(id, type);
00235   }
00236 
00241   public void setCorrelationId(String correlationId) {
00242     sharedMsg.correlationId = correlationId;
00243   }
00244 
00251   public void setReplyTo(String id, String type) {
00252     sharedMsg.setReplyTo(id, type);
00253   }
00254 
00259   public void setDeliveryCount(int deliveryCount) {
00260     sharedMsg.deliveryCount = deliveryCount;
00261   }
00262 
00268   public void setDenied(boolean redelivered) {
00269     sharedMsg.redelivered = redelivered;
00270   }
00271 
00277   public void setProperty(String propName, Object propValue) {
00278     sharedMsg.setProperty(propName, propValue);
00279   }
00280 
00285   public void setText(String text) {
00286     sharedMsg.setText(text);
00287   }
00288 }

Generated on Tue Sep 16 16:14:23 2008 for joram by  doxygen 1.5.0