All Packages Class Hierarchy This Package Previous Next Index
Class netbula.ORPC.RpcSvcServlet
java.lang.Object
|
+----javax.servlet.GenericServlet
|
+----javax.servlet.http.HttpServlet
|
+----netbula.ORPC.RpcSvcServlet
- public abstract class RpcSvcServlet
- extends HttpServlet
An abstract class which serves as the base to create an in-process
RPC servlet.
To implement a RPC servlet, override the initSvc() function, which returns
a Svc derived object for yout RPC service.
-
RpcSvcServlet()
-
-
doGet(HttpServletRequest, HttpServletResponse)
-
-
doPost(HttpServletRequest, HttpServletResponse)
-
-
getServletInfo()
-
-
initSvc()
- Override this function to implement an RPC servlet.
-
translateServerName(String)
- Give the Servlet a chance to translate the RPC server host name.
-
validate(HttpServletRequest, String, int, int)
- Validate the RPC request, return true if OK.
RpcSvcServlet
public RpcSvcServlet()
getServletInfo
public String getServletInfo()
- Overrides:
- getServletInfo in class GenericServlet
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse resp) throws ServletException, IOException
- Overrides:
- doGet in class HttpServlet
validate
public boolean validate(HttpServletRequest req,
String host,
int prog,
int ver)
- Validate the RPC request, return true if OK.
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.
initSvc
public abstract Svc initSvc()
- Override this function to implement an RPC servlet.
Use the Msg RPC as an example, this function is simply
public Svc initSvc() { return new MsgSvc();}
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse resp) throws ServletException, IOException
- Overrides:
- doPost in class HttpServlet
All Packages Class Hierarchy This Package Previous Next Index