com.andreani.xtol.node
Class TolerantServlet
java.lang.Object
|
+--javax.servlet.GenericServlet
|
+--javax.servlet.http.HttpServlet
|
+--com.andreani.xtol.node.TolerantServlet
- All Implemented Interfaces:
- EventListener, Serializable, ServiceIDListener, Servlet, ServletConfig
- public class TolerantServlet
- extends HttpServlet
- implements ServiceIDListener
This class realize the agent that joins the network and offers to it its
services. Is is a simple Servlet that uses its init() method to make it
visible as service into the network. A developer who wants to load balance
accesses to his server and make it fail tolerant must subclass this class
and call super.init() and super.doGet() at the beginning of these
local methods.
- Version:
- 1.0
- Author:
- Stefano Andreani
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cat
protected Category cat
TolerantServlet
public TolerantServlet()
init
public void init(ServletConfig sconf)
- Registers itself into the lookup service.
Always invoke super.init(ServletConfig) as first operation when you override
this method.
- Overrides:
init
in class GenericServlet
destroy
public void destroy()
- Overrides:
destroy
in class GenericServlet
doGet
public void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
IOException
- Always invoke super.doGet(req,resp) as first operation when you override
this method.
- Overrides:
doGet
in class HttpServlet
rebuildSession
public void rebuildSession(String globsessid,
HttpServletRequest req)
- This method create a new HttpSession retrieving session data from a
SessionSpace. It is usually used if the session server failed.
serviceIDNotify
public void serviceIDNotify(ServiceID id)
- Debbugging purpose
- Specified by:
serviceIDNotify
in interface ServiceIDListener
Copyright © 2001 Stefano Andreani - No Rights Reserved ;-)