Search in sources :

Example 1 with HttpResponse

use of org.mortbay.http.HttpResponse in project wso2-axis2-transports by wso2.

the class JettyEndpoint method setUp.

@Setup
@SuppressWarnings({ "unused", "serial" })
private void setUp(JettyServer server, HttpChannel channel) throws Exception {
    this.server = server;
    final String path = "/" + channel.getServiceName();
    handler = new AbstractHttpHandler() {

        public void handle(String pathInContext, String pathParams, HttpRequest request, HttpResponse response) throws HttpException, IOException {
            if (pathInContext.equals(path)) {
                JettyEndpoint.this.handle(pathParams, request, response);
                request.setHandled(true);
            }
        }
    };
    server.getContext().addHandler(handler);
    handler.start();
}
Also used : HttpRequest(org.mortbay.http.HttpRequest) HttpResponse(org.mortbay.http.HttpResponse) HttpException(org.mortbay.http.HttpException) IOException(java.io.IOException) AbstractHttpHandler(org.mortbay.http.handler.AbstractHttpHandler) Setup(org.apache.axis2.transport.testkit.tests.Setup)

Aggregations

IOException (java.io.IOException)1 Setup (org.apache.axis2.transport.testkit.tests.Setup)1 HttpException (org.mortbay.http.HttpException)1 HttpRequest (org.mortbay.http.HttpRequest)1 HttpResponse (org.mortbay.http.HttpResponse)1 AbstractHttpHandler (org.mortbay.http.handler.AbstractHttpHandler)1