summaryrefslogtreecommitdiff
path: root/same/src/main/java/com/orbekk/same/http/RpcServlet.java
blob: 9450d677cbc2f53b13b1a0f13c3cc4c8b6dcb610 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package com.orbekk.same.http;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.googlecode.jsonrpc4j.JsonRpcServer;

public class RpcServlet extends HttpServlet {
    JsonRpcServer rpcServer;

    public RpcServlet(JsonRpcServer rpcServer) {
        super();
        this.rpcServer = rpcServer;
    }

    @Override
    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws IOException {
        rpcServer.handle(request, response);
    }
}