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.ftp; 00024 00025 import java.util.Enumeration; 00026 00027 import org.objectweb.joram.shared.messages.Message; 00028 00029 00034 public class FtpMessage { 00035 private Message sharedMsg; 00036 00043 public FtpMessage(org.objectweb.joram.shared.messages.Message momMsg) { 00044 this.sharedMsg = momMsg; 00045 } 00046 00051 public Message getSharedMessage() { 00052 return sharedMsg; 00053 } 00054 00059 public String getIdentifier() { 00060 return sharedMsg.id; 00061 } 00062 00063 public String getStringProperty(String key) { 00064 return (String) sharedMsg.properties.get(key); 00065 } 00066 00067 public long getLongProperty(String key) { 00068 return ((Long) sharedMsg.properties.get(key)).longValue(); 00069 } 00070 00071 public boolean getBooleanProperty(String key) { 00072 return ((Boolean) sharedMsg.properties.get(key)).booleanValue(); 00073 } 00074 00075 public Object getObjectProperty(String key) { 00076 return sharedMsg.properties.get(key); 00077 } 00078 00079 public Object clone() { 00080 Message cloneShared = null; 00081 return new FtpMessage(cloneShared); 00082 } 00083 00084 public void clearProperties() { 00085 sharedMsg.properties.clear(); 00086 } 00087 00088 public Enumeration getPropertyNames() { 00089 return sharedMsg.properties.keys(); 00090 } 00091 00092 public void setObjectProperty(String key, Object value) { 00093 sharedMsg.setProperty(key, value); 00094 } 00095 00096 public void setStringProperty(String key, String value) { 00097 sharedMsg.setProperty(key, value); 00098 } 00099 00100 public boolean propertyExists(String key) { 00101 return sharedMsg.properties.containsKey(key); 00102 } 00103 00104 }
1.5.0