com.oreilly.servlet
类 RemoteHttpServlet

java.lang.Object
  继承者 javax.servlet.GenericServlet
      继承者 javax.servlet.http.HttpServlet
          继承者 com.oreilly.servlet.RemoteHttpServlet
所有已实现的接口:
Serializable, Remote, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class RemoteHttpServlet
extends javax.servlet.http.HttpServlet
implements 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().

版本:
1.0, 98/09/18
作者:
Jason Hunter, Copyright © 1998
另请参见:
RemoteDaemonHttpServlet, 序列化表格

字段摘要
protected  Registry registry
          The registry for the servlet
 
构造方法摘要
RemoteHttpServlet()
           
 
方法摘要
protected  void bind()
          Binds the servlet to the registry.
 void destroy()
          Halts the servlet's RMI operations.
protected  String getRegistryName()
          Returns the name under which the servlet should be bound in the registry.
protected  int getRegistryPort()
          Returns the port where the registry should be running.
 void init(javax.servlet.ServletConfig config)
          Begins the servlet's RMI operations.
protected  void unbind()
          Unbinds the servlet from the registry.
 
从类 javax.servlet.http.HttpServlet 继承的方法
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
从类 javax.servlet.GenericServlet 继承的方法
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

registry

protected Registry registry
The registry for the servlet

构造方法详细信息

RemoteHttpServlet

public RemoteHttpServlet()
方法详细信息

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.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).

指定者:
接口 javax.servlet.Servlet 中的 init
覆盖:
javax.servlet.GenericServlet 中的 init
参数:
config - the servlet config
抛出:
javax.servlet.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().

指定者:
接口 javax.servlet.Servlet 中的 destroy
覆盖:
javax.servlet.GenericServlet 中的 destroy

getRegistryName

protected String getRegistryName()
Returns the name under which the servlet should be bound in the registry. By default the name is the servlet's class name. This can be overridden with the registryName init parameter.

返回:
the name under which the servlet should be bound in the registry

getRegistryPort

protected int getRegistryPort()
Returns the port where the registry should be running. By default the port is the default registry port (1099). This can be overridden with the registryPort init parameter.

返回:
the port for the registry

bind

protected void bind()
Binds the servlet to the registry. Creates the registry if necessary. Logs any errors.


unbind

protected void unbind()
Unbinds the servlet from the registry. Logs any errors.



Copyright © 2013. All Rights Reserved.