/**
 * [DEFINE YOUR PROJECT NAME/MODULE HERE]
 * [DEFINE YOUR PROJECT DESCRIPTION HERE] 
 * Copyright (C) 8/25/14 echinopsii
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.echinopsii.ariane.community.messaging.api;

import java.util.Map;

public interface MomMsgTranslator<M> {

    String MSG_APPLICATION_ID = "MSG_APPLICATION_ID";
    String MSG_CORRELATION_ID = "MSG_CORRELATION_ID";
    String MSG_DELIVERY_MODE = "MSG_DELIVERY_MODE";
    String MSG_EXPIRATION    = "MSG_EXPIRATION";
    String MSG_MESSAGE_ID    = "MSG_MESSAGE_ID";
    String MSG_PRIORITY      = "MSG_PRIORITY";
    String MSG_REPLY_TO      = "MSG_REPLY_TO";
    String MSG_TIMESTAMP     = "MSG_TIMESTAMP";
    String MSG_TYPE          = "MSG_TYPE";
    String MSG_BODY          = "MSG_BODY";
    String MSG_RC            = "RC";
    String MSG_ERR           = "ERROR_MESSAGE";

    Map<String, Class>  getMessageTypo();

    M                   encode(Map<String, Object> message);
    Map<String, Object> decode(M message);
}
@@ -1394,24 +1394,25 @@
 %22MSG_BODY%22;%0A
+%0A
     String M
@@ -1468,16 +1468,23 @@
      = %22
+SERVER_
 ERROR_ME
@@ -1488,24 +1488,243 @@
 _MESSAGE%22;%0A%0A
+    int MSG_RET_SUCCESS = 0;%0A    int MSG_RET_BAD_REQ = 400;%0A    int MSG_RET_NOT_FOUND = 404;%0A    int MSG_RET_SERVER_ERR = 500;%0A%0A    String OPERATION_FDN = %22OPERATION%22;%0A    String OPERATION_NOT_DEFINED = %22NOT_DEFINED%22;%0A%0A
     Map%3CStri

add static definition