use of com.networknt.body.BodyHandler in project light-rest-4j by networknt.
the class ValidatorHandlerTest method setUp.
@Before
public void setUp() {
if (server == null) {
logger.info("starting server");
HttpHandler handler = getPetStoreHandler();
ValidatorHandler validatorHandler = new ValidatorHandler();
validatorHandler.setNext(handler);
handler = validatorHandler;
BodyHandler bodyHandler = new BodyHandler();
bodyHandler.setNext(handler);
handler = bodyHandler;
OpenApiHandler openApiHandler = new OpenApiHandler();
openApiHandler.setNext(handler);
handler = openApiHandler;
server = Undertow.builder().addHttpListener(8080, "localhost").setHandler(handler).build();
server.start();
}
}
use of com.networknt.body.BodyHandler in project light-rest-4j by networknt.
the class ValidatorHandlerTest method setUp.
@Before
public void setUp() {
if (server == null) {
logger.info("starting server");
HttpHandler handler = getPetStoreHandler();
ValidatorHandler validatorHandler = new ValidatorHandler();
validatorHandler.setNext(handler);
handler = validatorHandler;
BodyHandler bodyHandler = new BodyHandler();
bodyHandler.setNext(handler);
handler = bodyHandler;
SwaggerHandler swaggerHandler = new SwaggerHandler();
swaggerHandler.setNext(handler);
handler = swaggerHandler;
server = Undertow.builder().addHttpListener(8080, "localhost").setHandler(handler).build();
server.start();
}
}
use of com.networknt.body.BodyHandler in project light-4j by networknt.
the class SanitizerHandlerTest method setUp.
@BeforeClass
public static void setUp() {
if (server == null) {
logger.info("starting server");
HttpHandler handler = getTestHandler();
SanitizerHandler sanitizerHandler = new SanitizerHandler();
sanitizerHandler.setNext(handler);
handler = sanitizerHandler;
BodyHandler bodyHandler = new BodyHandler();
bodyHandler.setNext(handler);
handler = bodyHandler;
server = Undertow.builder().addHttpListener(8080, "localhost").setHandler(handler).build();
server.start();
}
}
Aggregations