com.oreilly.servlet
Class RemoteHttpServlet

java.lang.Object
  extended by HttpServlet
      extended by 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

Constructor Summary
RemoteHttpServlet()
           
 
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
 

Constructor Detail

RemoteHttpServlet

public RemoteHttpServlet()
Method Detail

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().