/*
 *  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.transport.http.netty.contract.websocket;

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

import java.util.Map;
import javax.websocket.Session;

/**
 * Client Connector for WebSocket.
 */
public interface WebSocketClientConnector {

    Session connect(WebSocketConnectorListener listener) throws ClientConnectorException;

    Session connect(WebSocketConnectorListener listener, Map<String, String> customHeaders)
            throws ClientConnectorException;

    Session connect(WebSocketConnectorListener listener, WebSocketMessageContext channelContext)
            throws ClientConnectorException;


    Session connect(WebSocketConnectorListener listener, WebSocketMessageContext channelContext,
                    Map<String, String> customHeaders) throws ClientConnectorException;
}

@@ -968,376 +968,1574 @@
     
-Session connect(WebSocketConnectorListener listener) throws ClientConnectorException;%0A%0A    Session connect(WebSocketConnectorListener listener, Map%3CString, String%3E customHeaders)%0A            throws ClientConnectorException;%0A%0A    Session connect(WebSocketConnectorListener listener, WebSocketMessageContext channelContext)%0A            throws ClientConnectorException;%0A%0A
+/**%0A     * Creates the connection to the back-end.%0A     * @param listener gets events of this connection.%0A     * @return session of for the connection%0A     * @throws ClientConnectorException throws when something goes wrong.%0A     */%0A    Session connect(WebSocketConnectorListener listener) throws ClientConnectorException;%0A%0A    /**%0A     * Creates the connection to the back-end.%0A     * @param listener gets events of this connection.%0A     * @param customHeaders add custom headers to the outbound messages.%0A     * @return session of for the connection%0A     * @throws ClientConnectorException throws when something goes wrong.%0A     */%0A    Session connect(WebSocketConnectorListener listener, Map%3CString, String%3E customHeaders)%0A            throws ClientConnectorException;%0A%0A    /**%0A     * Creates the connection to the back-end.%0A     * @param listener gets events of this connection.%0A     * @param channelContext context of the channel%0A     * @return session of for the connection%0A     * @throws ClientConnectorException throws when something goes wrong.%0A     */%0A    Session connect(WebSocketConnectorListener listener, WebSocketMessageContext channelContext)%0A            throws ClientConnectorException;%0A%0A    /**%0A     * Creates the connection to the back-end.%0A     * @param listener gets events of this connection.%0A     * @param channelContext  context of the channel%0A     * @param customHeaders add custom headers to the outbound messages.%0A     * @return session of for the connection%0A     * @throws ClientConnectorException throws when something goes wrong.%0A     */
 %0A   

Add java doc for WebSocketClientConnector