netbula.ORPC
Class RpcProxyServlet
HttpServletnetbula.ORPC.RpcProxyServlet
public class RpcProxyServlet
extends HttpServlet
A http servlet function as a generic RPC gataway for a http client to call another RPC
server accessible by the servlet.
To use this servlet, create a ClientHTTP object with the servlet's URL.
See the http/ sample program for details.
void | doGet(HttpServletRequest req, HttpServletResponse resp)
|
void | doPost(HttpServletRequest req, HttpServletResponse resp)
|
String | getServletInfo()
|
String | translateServerName(String specified_host)- Give the Servlet a chance to translate the RPC server host name.
|
boolean | validate(HttpServletRequest req, String host, int prog, int ver)- Validate the RPC request, return true if OK.
|
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
getServletInfo
public String getServletInfo()
translateServerName
public String translateServerName(String specified_host)
Give the Servlet a chance to translate the RPC server host name.
Override this function to do your hostname translation.
Default simply returns the hostname specified in the ClientHTTP.setServer() function
sent from client.
validate
public boolean validate(HttpServletRequest req,
String host,
int prog,
int ver)Validate the RPC request, return true if OK.