📄 locateregistry.html
字号:
<!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: Class LocateRegistry</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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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"> PREV CLASS NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="LocateRegistry.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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>Class LocateRegistry</H2><PRE>java.lang.Object | +--<B>java.rmi.registry.LocateRegistry</B></PRE><HR><DL><DT>public final class <B>LocateRegistry</B><DT>extends java.lang.Object</DL><P><code>LocateRegistry</code> is used to obtain a reference to a bootstrap remote object registry on a particular host (including the local host), or to create a remote object registry that accepts calls on a specific port. <p> Note that a <code>getRegistry</code> call does not actually make a connection to the remote host. It simply creates a local reference to the remote registry and will succeed even if no registry is running on the remote host. Therefore, a subsequent method invocation to a remote registry returned as a result of this method may fail.<P><DL><DT><B>Since: </B><DD>JDK1.1</DD><DT><B>See Also: </B><DD><A HREF="../../../java/rmi/registry/Registry.html"><CODE>Registry</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== 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>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#createRegistry(int)">createRegistry</A></B>(int port)</CODE><BR> Creates and exports a <code>Registry</code> on the local host that accepts requests on the specified <code>port</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#createRegistry(int, java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory)">createRegistry</A></B>(int port, <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A> csf, <A HREF="../../../java/rmi/server/RMIServerSocketFactory.html">RMIServerSocketFactory</A> ssf)</CODE><BR> Creates and exports a <code>Registry</code> on the local host that uses custom socket factories for communication with that registry.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#getRegistry()">getRegistry</A></B>()</CODE><BR> Returns a reference to the the remote object <code>Registry</code> for the local host on the default registry port of 1099.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#getRegistry(int)">getRegistry</A></B>(int port)</CODE><BR> Returns a reference to the the remote object <code>Registry</code> for the local host on the specified <code>port</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#getRegistry(java.lang.String)">getRegistry</A></B>(java.lang.String host)</CODE><BR> Returns a reference to the remote object <code>Registry</code> on the specified <code>host</code> on the default registry port of 1099.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#getRegistry(java.lang.String, int)">getRegistry</A></B>(java.lang.String host, int port)</CODE><BR> Returns a reference to the remote object <code>Registry</code> on the specified <code>host</code> and <code>port</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../java/rmi/registry/Registry.html">Registry</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/rmi/registry/LocateRegistry.html#getRegistry(java.lang.String, int, java.rmi.server.RMIClientSocketFactory)">getRegistry</A></B>(java.lang.String host, int port, <A HREF="../../../java/rmi/server/RMIClientSocketFactory.html">RMIClientSocketFactory</A> csf)</CODE><BR> Returns a locally created remote reference to the remote object <code>Registry</code> on the specified <code>host</code> and <code>port</code>.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -