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.


Constructor Index

 o RpcSvcServlet()

Method Index

 o doGet(HttpServletRequest, HttpServletResponse)
 o doPost(HttpServletRequest, HttpServletResponse)
 o getServletInfo()
 o initSvc()
Override this function to implement an RPC servlet.
 o translateServerName(String)
Give the Servlet a chance to translate the RPC server host name.
 o validate(HttpServletRequest, String, int, int)
Validate the RPC request, return true if OK.

Constructors

 o RpcSvcServlet
 public RpcSvcServlet()

Methods

 o getServletInfo
 public String getServletInfo()
Overrides:
getServletInfo in class GenericServlet
 o doGet
 public void doGet(HttpServletRequest req,
                   HttpServletResponse resp) throws ServletException, IOException
Overrides:
doGet in class HttpServlet
 o validate
 public boolean validate(HttpServletRequest req,
                         String host,
                         int prog,
                         int ver)
Validate the RPC request, return true if OK.

 o 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.

 o 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();}

 o 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