com.oreilly.servlet
Class RemoteHttpServlet
java.lang.Object
HttpServlet
com.oreilly.servlet.RemoteHttpServlet
- All Implemented Interfaces:
- java.rmi.Remote
public abstract class RemoteHttpServlet
- extends HttpServlet
- implements java.rmi.Remote
A superclass for any HTTP servlet that wishes to act as an RMI server.
RemoteHttpServlet begins listening for RMI calls in its
init() method and stops listening in its destroy()
method. To register itself it uses the registry on the local machine
on the port determined by getRegistryPort(). It registers
under the name determined by getRegistryName().
- Version:
- 1.0, 98/09/18
- Author:
- Jason Hunter, Copyright © 1998
- See Also:
RemoteDaemonHttpServlet
Method Summary |
void |
destroy()
Halts the servlet's RMI operations. |
void |
init(ServletConfig config)
Begins the servlet's RMI operations. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RemoteHttpServlet
public RemoteHttpServlet()
init
public void init(ServletConfig config)
throws ServletException
- Begins the servlet's RMI operations. Causes the servlet to export
itself and then bind itself to the registry. Logs any errors.
Subclasses that override this method must be sure to first call
super.init(config).
- Parameters:
config
- the servlet config
- Throws:
ServletException
- if a servlet exception occurs
destroy
public void destroy()
- Halts the servlet's RMI operations. Causes the servlet to
unbind itself from the registry. Logs any errors. Subclasses that
override this method must be sure to first call super.destroy().