/*
 *  Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 *
 *  WSO2 Inc. licenses this file to you under the Apache License,
 *  Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
package org.wso2.carbon.messaging;

import org.wso2.carbon.messaging.exceptions.ClientConnectorException;

import java.util.Map;

/**
 * Message sending interface that should be implemented for a given transport protocol which will be used with
 * sending messages to a desired endpoint.
 */
public interface ClientConnector {

    /**
     * Message sending logic to send message to a backend endpoint.
     *
     * @param msg the carbon message used with sending the a message to backend.
     * @param callback carbon callback used with responding any error.
     * @param parameters data passed from application level to be used with
     * @return return true if the sending was successful, false otherwise.
     * @throws ClientConnectorException on error while trying to send message to backend.
     */
    boolean send(CarbonMessage msg, CarbonCallback callback, Map<String, String> parameters)
            throws ClientConnectorException;

    /**
     * Transport protocol associated with this client connector instance.
     * @return string value of the transport protocol.
     */
    String getProtocol();
}

@@ -1239,16 +1239,638 @@
  error.%0A
+     * @return return true if the sending was successful, false otherwise.%0A     * @throws ClientConnectorException on error while trying to send message to backend.%0A     */%0A    boolean send(CarbonMessage msg, CarbonCallback callback) throws ClientConnectorException;%0A%0A    /**%0A     * Message sending logic to send message to a backend endpoint. Additionally, this method accepts a map of%0A     * parameters that is used as data to construct the message to be send.%0A     *%0A     * @param msg the carbon message used with sending the a message to backend.%0A     * @param callback carbon callback used with responding any error.%0A
      * @
@@ -1936,16 +1936,38 @@
 sed with
+ creating the message.
 %0A     * 
@@ -2225,16 +2225,16 @@
 meters)%0A
-
         
@@ -2263,32 +2263,34 @@
 ctorException;%0A%0A
+%0A%0A
     /**%0A     * T

add another send method wihtout parameter map, to client connector API to be backword compatible with TransportSender API