Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 874

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0) on Thu Dec 06 18:47:27 CET 2012 -->
<TITLE>
OtpSelf (Java-Erlang Interface Library)
</TITLE>

<META NAME="keywords" CONTENT="com.ericsson.otp.erlang.OtpSelf class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="OtpSelf (Java-Erlang Interface Library)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../com/ericsson/otp/erlang/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A>&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-all.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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpPeer.html" title="class in com.ericsson.otp.erlang"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpServer.html" title="class in com.ericsson.otp.erlang"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/ericsson/otp/erlang/OtpSelf.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="OtpSelf.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_com.ericsson.otp.erlang.OtpLocalNode">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<A NAME="main"></A>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.ericsson.otp.erlang</FONT>
<BR>
Class OtpSelf</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html" title="class in com.ericsson.otp.erlang">com.ericsson.otp.erlang.AbstractNode</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html" title="class in com.ericsson.otp.erlang">com.ericsson.otp.erlang.OtpLocalNode</A>
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.ericsson.otp.erlang.OtpSelf</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../com/ericsson/otp/erlang/OtpServer.html" title="class in com.ericsson.otp.erlang">OtpServer</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>OtpSelf</B><DT>extends <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html" title="class in com.ericsson.otp.erlang">OtpLocalNode</A></DL>
</PRE>

<P>
Represents an OTP node. It is used to connect to remote nodes or accept
 incoming connections from remote nodes.
 
 <p>
 When the Java node will be connecting to a remote Erlang, Java or C node, it
 must first identify itself as a node by creating an instance of this class,
 after which it may connect to the remote node.
 
 <p>
 When you create an instance of this class, it will bind a socket to a port so
 that incoming connections can be accepted. However the port number will not
 be made available to other nodes wishing to connect until you explicitely
 register with the port mapper daemon by calling <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#publishPort()"><CODE>publishPort()</CODE></A>.
 </p>
 
 <pre>
 OtpSelf self = new OtpSelf(&quot;client&quot;, &quot;authcookie&quot;); // identify self
 OtpPeer other = new OtpPeer(&quot;server&quot;); // identify peer
 
 OtpConnection conn = self.connect(other); // connect to peer
 </pre>
<P>

<P>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_com.ericsson.otp.erlang.OtpLocalNode"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class com.ericsson.otp.erlang.<A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html" title="class in com.ericsson.otp.erlang">OtpLocalNode</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#epmd">epmd</A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#port">port</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#OtpSelf(java.lang.String)">OtpSelf</A></B>(java.lang.String&nbsp;node)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Create a self node using the default cookie.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#OtpSelf(java.lang.String, java.lang.String)">OtpSelf</A></B>(java.lang.String&nbsp;node,
        java.lang.String&nbsp;cookie)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a self node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#OtpSelf(java.lang.String, java.lang.String, int)">OtpSelf</A></B>(java.lang.String&nbsp;node,
        java.lang.String&nbsp;cookie,
        int&nbsp;port)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang">OtpConnection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#accept()">accept</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accept an incoming connection from a remote node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang">OtpConnection</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#connect(com.ericsson.otp.erlang.OtpPeer)">connect</A></B>(<A HREF="../../../../com/ericsson/otp/erlang/OtpPeer.html" title="class in com.ericsson.otp.erlang">OtpPeer</A>&nbsp;other)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open a connection to a remote node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangPid.html" title="class in com.ericsson.otp.erlang">OtpErlangPid</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#pid()">pid</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Erlang PID that will be used as the sender id in all "anonymous"
 messages sent by this node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#publishPort()">publishPort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make public the information needed by remote nodes that may wish to
 connect to this one.</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="../../../../com/ericsson/otp/erlang/OtpSelf.html#unPublishPort()">unPublishPort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Unregister the server node's name and port number from the Erlang port
 mapper, thus preventing any new connections from remote nodes.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.ericsson.otp.erlang.OtpLocalNode"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.ericsson.otp.erlang.<A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html" title="class in com.ericsson.otp.erlang">OtpLocalNode</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#createPid()">createPid</A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#createPort()">createPort</A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#createRef()">createRef</A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#getEpmd()">getEpmd</A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#port()">port</A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html#setEpmd(java.net.Socket)">setEpmd</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.ericsson.otp.erlang.AbstractNode"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.ericsson.otp.erlang.<A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html" title="class in com.ericsson.otp.erlang">AbstractNode</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html#alive()">alive</A>, <A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html#cookie()">cookie</A>, <A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html#host()">host</A>, <A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html#node()">node</A>, <A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html#setCookie(java.lang.String)">setCookie</A>, <A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html#toString()">toString</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="OtpSelf(java.lang.String)"><!-- --></A><H3>
OtpSelf</H3>
<PRE>
public <B>OtpSelf</B>(java.lang.String&nbsp;node)
        throws java.io.IOException</PRE>
<DL>
<DD><p>
 Create a self node using the default cookie. The default cookie is found
 by reading the first line of the .erlang.cookie file in the user's home
 directory. The home directory is obtained from the System property
 "user.home".
 </p>
 
 <p>
 If the file does not exist, an empty string is used. This method makes no
 attempt to create the file.
 </p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - the name of this node.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DL>
<HR>

<A NAME="OtpSelf(java.lang.String, java.lang.String)"><!-- --></A><H3>
OtpSelf</H3>
<PRE>
public <B>OtpSelf</B>(java.lang.String&nbsp;node,
               java.lang.String&nbsp;cookie)
        throws java.io.IOException</PRE>
<DL>
<DD>Create a self node.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - the name of this node.<DD><CODE>cookie</CODE> - the authorization cookie that will be used by this node
                when it communicates with other nodes.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DL>
<HR>

<A NAME="OtpSelf(java.lang.String, java.lang.String, int)"><!-- --></A><H3>
OtpSelf</H3>
<PRE>
public <B>OtpSelf</B>(java.lang.String&nbsp;node,
               java.lang.String&nbsp;cookie,
               int&nbsp;port)
        throws java.io.IOException</PRE>
<DL>
<DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="pid()"><!-- --></A><H3>
pid</H3>
<PRE>
public <A HREF="../../../../com/ericsson/otp/erlang/OtpErlangPid.html" title="class in com.ericsson.otp.erlang">OtpErlangPid</A> <B>pid</B>()</PRE>
<DL>
<DD>Get the Erlang PID that will be used as the sender id in all "anonymous"
 messages sent by this node. Anonymous messages are those sent via send
 methods in <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang"><CODE>OtpConnection</CODE></A> that do not specify a
 sender.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>the Erlang PID that will be used as the sender id in all
         anonymous messages sent by this node.</DL>
</DD>
</DL>
<HR>

<A NAME="publishPort()"><!-- --></A><H3>
publishPort</H3>
<PRE>
public boolean <B>publishPort</B>()
                    throws java.io.IOException</PRE>
<DL>
<DD>Make public the information needed by remote nodes that may wish to
 connect to this one. This method establishes a connection to the Erlang
 port mapper (Epmd) and registers the server node's name and port so that
 remote nodes are able to connect.
 
 <p>
 This method will fail if an Epmd process is not running on the localhost.
 See the Erlang documentation for information about starting Epmd.
 
 <p>
 Note that once this method has been called, the node is expected to be
 available to accept incoming connections. For that reason you should make
 sure that you call <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#accept()"><CODE>accept()</CODE></A> shortly after calling
 <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#publishPort()"><CODE>publishPort()</CODE></A>. When you no longer intend to accept connections
 you should call <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#unPublishPort()"><CODE>unPublishPort()</CODE></A>.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>true if the operation was successful, false if the node was
         already registered.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if the port mapper could not be contacted.</DL>
</DD>
</DL>
<HR>

<A NAME="unPublishPort()"><!-- --></A><H3>
unPublishPort</H3>
<PRE>
public void <B>unPublishPort</B>()</PRE>
<DL>
<DD>Unregister the server node's name and port number from the Erlang port
 mapper, thus preventing any new connections from remote nodes.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="accept()"><!-- --></A><H3>
accept</H3>
<PRE>
public <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang">OtpConnection</A> <B>accept</B>()
                     throws java.io.IOException,
                            <A HREF="../../../../com/ericsson/otp/erlang/OtpAuthException.html" title="class in com.ericsson.otp.erlang">OtpAuthException</A></PRE>
<DL>
<DD>Accept an incoming connection from a remote node. A call to this method
 will block until an incoming connection is at least attempted.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>a connection to a remote node.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - if a remote node attempted to connect but no common
                    protocol was found.
<DD><CODE><A HREF="../../../../com/ericsson/otp/erlang/OtpAuthException.html" title="class in com.ericsson.otp.erlang">OtpAuthException</A></CODE> - if a remote node attempted to connect, but was not
                    authorized to connect.</DL>
</DD>
</DL>
<HR>

<A NAME="connect(com.ericsson.otp.erlang.OtpPeer)"><!-- --></A><H3>
connect</H3>
<PRE>
public <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang">OtpConnection</A> <B>connect</B>(<A HREF="../../../../com/ericsson/otp/erlang/OtpPeer.html" title="class in com.ericsson.otp.erlang">OtpPeer</A>&nbsp;other)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             <A HREF="../../../../com/ericsson/otp/erlang/OtpAuthException.html" title="class in com.ericsson.otp.erlang">OtpAuthException</A></PRE>
<DL>
<DD>Open a connection to a remote node.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the remote node to which you wish to connect.
<DT><B>Returns:</B><DD>a connection to the remote node.
<DT><B>Throws:</B>
<DD><CODE>java.net.UnknownHostException</CODE> - if the remote host could not be found.
<DD><CODE>java.io.IOException</CODE> - if it was not possible to connect to the remote node.
<DD><CODE><A HREF="../../../../com/ericsson/otp/erlang/OtpAuthException.html" title="class in com.ericsson.otp.erlang">OtpAuthException</A></CODE> - if the connection was refused by the remote node.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../com/ericsson/otp/erlang/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A>&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-all.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>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpPeer.html" title="class in com.ericsson.otp.erlang"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/ericsson/otp/erlang/OtpServer.html" title="class in com.ericsson.otp.erlang"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/ericsson/otp/erlang/OtpSelf.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="OtpSelf.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_com.ericsson.otp.erlang.OtpLocalNode">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>