⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 registry.html

📁 请笑纳 请笑纳 请笑纳 请笑纳 请笑纳 请笑纳
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu May 30 13:46:51 EDT 2002 --><TITLE>J2ME RMI Optional Package Specification v1.0: Interface  Registry</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>J2ME RMI Optional Package</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Registry.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.rmi.registry</FONT><BR>Interface  Registry</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../java/rmi/Remote.html">Remote</A></DD></DL><HR><DL><DT>public interface <B>Registry</B><DT>extends <A HREF="../../../java/rmi/Remote.html">Remote</A></DL><P><code>Registry</code> is a remote interface to a simple remote object registry that provides methods for storing and retrieving remote object references bound with arbitrary string names.  The <code>bind</code>, <code>unbind</code>, and <code>rebind</code> methods are used to alter the name bindings in the registry, and the <code>lookup</code> and <code>list</code> methods are used to query the current name bindings. <p>In its typical usage, a <code>Registry</code> enables RMI client bootstrapping: it provides a simple means for a client to obtain an initial reference to a remote object.  Therefore, a registry's remote object implementation is typically exported with a well-known address, such as with a well-known <A HREF="../../../java/rmi/server/ObjID.html#REGISTRY_ID"><CODE>ObjID</CODE></A> and TCP port number (default is <A HREF="../../../java/rmi/registry/Registry.html#REGISTRY_PORT"><CODE>1099</CODE></A>). <p>The <A HREF="../../../java/rmi/registry/LocateRegistry.html"><CODE>LocateRegistry</CODE></A> class provides a programmatic API for constructing a bootstrap reference to a <code>Registry</code> at a remote address (see the static <code>getRegistry</code> methods) and for creating and exporting a <code>Registry</code> in the current VM on a particular local address (see the static <code>createRegistry</code> methods). <p>A <code>Registry</code> implementation may choose to restrict access to some or all of its methods (for example, methods that mutate the registry's bindings may be restricted to calls originating from the local host).  If a <code>Registry</code> method chooses to deny access for a given invocation, its implementation may throw <A HREF="../../../java/rmi/AccessException.html"><CODE>AccessException</CODE></A>, which (because it extends <A HREF="../../../java/rmi/RemoteException.html"><CODE>RemoteException</CODE></A>) will be wrapped in a <A HREF="../../../java/rmi/ServerException.html"><CODE>ServerException</CODE></A> when caught by a remote client. <p>The names used for bindings in a <code>Registry</code> are pure strings, not parsed.  A service which stores its remote reference in a <code>Registry</code> may wish to use a package name as a prefix in the name binding to reduce the likelihood of name collisions in the registry.<P><DL><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../../java/rmi/registry/LocateRegistry.html"><CODE>LocateRegistry</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/Registry.html#REGISTRY_PORT">REGISTRY_PORT</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Well known port for registry.</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/Registry.html#bind(java.lang.String, java.rmi.Remote)">bind</A></B>(java.lang.String&nbsp;name,     <A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Binds a remote reference to the specified <code>name</code> in this registry.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/Registry.html#list()">list</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an array of the names bound in this registry.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/rmi/Remote.html">Remote</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/Registry.html#lookup(java.lang.String)">lookup</A></B>(java.lang.String&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the remote reference bound to the specified <code>name</code> in this registry.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/Registry.html#rebind(java.lang.String, java.rmi.Remote)">rebind</A></B>(java.lang.String&nbsp;name,       <A HREF="../../../java/rmi/Remote.html">Remote</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces the binding for the specified <code>name</code> in this registry with the supplied remote reference.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/Registry.html#unbind(java.lang.String)">unbind</A></B>(java.lang.String&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the binding for the specified <code>name</code> in this registry.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -