blob: 311f9853db29ea38a0f3292712e3a883f74a6b30 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.application.container.handlers;
import com.yahoo.jdisc.handler.AbstractRequestHandler;
import com.yahoo.jdisc.handler.ContentChannel;
import com.yahoo.jdisc.handler.FastContentWriter;
import com.yahoo.jdisc.handler.ResponseDispatch;
import com.yahoo.jdisc.handler.ResponseHandler;
/**
* @author gjoranv
* @author ollivir
*/
public class TestHandler extends AbstractRequestHandler {
public static final String RESPONSE = "Hello, World!";
public ContentChannel handleRequest(com.yahoo.jdisc.Request request, ResponseHandler handler) {
FastContentWriter writer = ResponseDispatch.newInstance(com.yahoo.jdisc.Response.Status.OK)
.connectFastWriter(handler);
writer.write(RESPONSE);
writer.close();
return null;
}
}
|