mirror of
https://github.com/valitydev/three-ds-server-storage.git
synced 2024-11-06 08:25:16 +00:00
BJ-917: Add servlets
This commit is contained in:
parent
5970d849f4
commit
fa37fe0e30
@ -0,0 +1,34 @@
|
||||
package com.rbkmoney.threeds.server.storage.servlet;
|
||||
|
||||
import com.rbkmoney.damsel.three_ds_server_storage.CardRangesStorageSrv;
|
||||
import com.rbkmoney.threeds.server.storage.handler.CardRangesStorageHandler;
|
||||
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/card-ranges")
|
||||
public class CardRangesStorageServlet extends GenericServlet {
|
||||
|
||||
private final CardRangesStorageHandler handler;
|
||||
|
||||
private Servlet servlet;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig config) throws ServletException {
|
||||
super.init(config);
|
||||
servlet = new THServiceBuilder()
|
||||
.build(CardRangesStorageSrv.Iface.class, handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void service(
|
||||
ServletRequest request,
|
||||
ServletResponse response) throws ServletException, IOException {
|
||||
servlet.service(request, response);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
package com.rbkmoney.threeds.server.storage.servlet;
|
||||
|
||||
import com.rbkmoney.damsel.three_ds_server_storage.RReqTransactionInfoStorageSrv;
|
||||
import com.rbkmoney.threeds.server.storage.handler.RReqTransactionInfoStorageHandler;
|
||||
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/rreq-transaction-info")
|
||||
public class RReqTransactionInfoStorageServlet extends GenericServlet {
|
||||
|
||||
private final RReqTransactionInfoStorageHandler handler;
|
||||
|
||||
private Servlet servlet;
|
||||
|
||||
@Override
|
||||
public void init(ServletConfig config) throws ServletException {
|
||||
super.init(config);
|
||||
servlet = new THServiceBuilder()
|
||||
.build(RReqTransactionInfoStorageSrv.Iface.class, handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void service(
|
||||
ServletRequest request,
|
||||
ServletResponse response) throws ServletException, IOException {
|
||||
servlet.service(request, response);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user