001 /**
002 * GRANITE DATA SERVICES
003 * Copyright (C) 2006-2013 GRANITE DATA SERVICES S.A.S.
004 *
005 * This file is part of the Granite Data Services Platform.
006 *
007 * Granite Data Services is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU Lesser General Public
009 * License as published by the Free Software Foundation; either
010 * version 2.1 of the License, or (at your option) any later version.
011 *
012 * Granite Data Services is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
015 * General Public License for more details.
016 *
017 * You should have received a copy of the GNU Lesser General Public
018 * License along with this library; if not, write to the Free Software
019 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
020 * USA, or see <http://www.gnu.org/licenses/>.
021 */
022 package flex.messaging.messages;
023
024 import java.io.Serializable;
025 import java.util.Map;
026
027 /**
028 * @author Franck WOLFF
029 */
030 public interface Message extends Serializable {
031
032 public static final String ENDPOINT_HEADER = "DSEndpoint";
033 public static final String CREDENTIALS_CHARSET_HEADER = "DSCredentialsCharset";
034 public static final String REMOTE_CREDENTIALS_HEADER = "DSRemoteCredentials";
035 public static final String REMOTE_CREDENTIALS_CHARSET_HEADER = "DSRemoteCredentialsCharset";
036 public static final String DS_ID_HEADER = "DSId";
037
038 public static final String HIDDEN_CREDENTIALS = "****** (credentials)";
039
040 public Object getBody();
041 public Object getClientId();
042 public String getDestination();
043 public Object getHeader(String name);
044 public Map<String, Object> getHeaders();
045 public String getMessageId();
046 public long getTimestamp();
047 public long getTimeToLive();
048 public boolean headerExists(String name);
049 public void setBody(Object value);
050 public void setClientId(Object value);
051 public void setDestination(String value);
052 public void setHeader(String name, Object value);
053 public void setHeaders(Map<String, Object> value);
054 public void setMessageId(String value);
055 public void setTimestamp(long value);
056 public void setTimeToLive(long value);
057
058 public String toString(String indent);
059 }