BJ-988: Add PreparationFlowServiceServlet just in case

This commit is contained in:
a.romanov 2020-09-21 12:12:37 +03:00 committed by a.romanov
parent 06d51573c3
commit 303c675524

View File

@ -0,0 +1,33 @@
package com.rbkmoney.threeds.server.storage.servlet;
import com.rbkmoney.damsel.three_ds_server_storage.PreparationFlowServiceSrv;
import com.rbkmoney.threeds.server.storage.handler.PreparationFlowServiceHandler;
import com.rbkmoney.woody.thrift.impl.http.THServiceBuilder;
import lombok.RequiredArgsConstructor;
import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;
@RequiredArgsConstructor
@WebServlet("/three-ds-server-storage/preparation-flow")
public class PreparationFlowServiceServlet extends GenericServlet {
private final PreparationFlowServiceHandler handler;
private Servlet servlet;
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
servlet = new THServiceBuilder()
.build(PreparationFlowServiceSrv.Iface.class, handler);
}
@Override
public void service(
ServletRequest request,
ServletResponse response) throws ServletException, IOException {
servlet.service(request, response);
}
}