Package org.apache.qpid.restapi

Examples of org.apache.qpid.restapi.HttpTransaction


     * @param exchange the HttpExchange exchange object passed by the HttpServer. This will be used to construct
     *        an HttpTransaction instance that will be passed to the Server.
     */
    public void handle(final HttpExchange exchange) throws IOException
    {
        HttpTransaction tx = new HttpExchangeTransaction(exchange);
        String method = tx.getMethod();
        if (method.equals("GET"))
        {
            _server.doGet(tx);
        }
        else if (method.equals("POST"))
        {
            _server.doPost(tx);
        }
        else if (method.equals("PUT"))
        {
            _server.doPut(tx);
        }
        else if (method.equals("DELETE"))
        {
            _server.doDelete(tx);
        }
        else
        {
            tx.sendResponse(HTTP_BAD_METHOD, "text/plain", "405 Bad Method.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.restapi.HttpTransaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.