Sophie

Sophie

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

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>
com.ericsson.otp.erlang (Java-Erlang Interface Library)
</TITLE>

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

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

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="com.ericsson.otp.erlang (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="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</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-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;PREV PACKAGE&nbsp;
&nbsp;NEXT PACKAGE</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/ericsson/otp/erlang/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.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>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<A NAME="main"></A>
<H2>
Package com.ericsson.otp.erlang
</H2>
 This package provides support for communication with Erlang and
representation of Erlang datatypes.
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/AbstractConnection.html" title="class in com.ericsson.otp.erlang">AbstractConnection</A></B></TD>
<TD>Maintains a connection between a Java process and a remote Erlang, Java or C
 node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/AbstractNode.html" title="class in com.ericsson.otp.erlang">AbstractNode</A></B></TD>
<TD>
 Represents an OTP node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/GenericQueue.html" title="class in com.ericsson.otp.erlang">GenericQueue</A></B></TD>
<TD>This class implements a generic FIFO queue.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang">OtpConnection</A></B></TD>
<TD>Maintains a connection between a Java process and a remote Erlang, Java or C
 node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpCookedConnection.html" title="class in com.ericsson.otp.erlang">OtpCookedConnection</A></B></TD>
<TD>
 Maintains a connection between a Java process and a remote Erlang, Java or C
 node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpEpmd.html" title="class in com.ericsson.otp.erlang">OtpEpmd</A></B></TD>
<TD>Provides methods for registering, unregistering and looking up nodes with the
 Erlang portmapper daemon (Epmd).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangAtom.html" title="class in com.ericsson.otp.erlang">OtpErlangAtom</A></B></TD>
<TD>Provides a Java representation of Erlang atoms.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangBinary.html" title="class in com.ericsson.otp.erlang">OtpErlangBinary</A></B></TD>
<TD>Provides a Java representation of Erlang binaries.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangBitstr.html" title="class in com.ericsson.otp.erlang">OtpErlangBitstr</A></B></TD>
<TD>Provides a Java representation of Erlang bitstrs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangBoolean.html" title="class in com.ericsson.otp.erlang">OtpErlangBoolean</A></B></TD>
<TD>Provides a Java representation of Erlang booleans, which are special cases of
 atoms with values 'true' and 'false'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangByte.html" title="class in com.ericsson.otp.erlang">OtpErlangByte</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangChar.html" title="class in com.ericsson.otp.erlang">OtpErlangChar</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangDouble.html" title="class in com.ericsson.otp.erlang">OtpErlangDouble</A></B></TD>
<TD>Provides a Java representation of Erlang floats and doubles.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangExternalFun.html" title="class in com.ericsson.otp.erlang">OtpErlangExternalFun</A></B></TD>
<TD>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangFloat.html" title="class in com.ericsson.otp.erlang">OtpErlangFloat</A></B></TD>
<TD>Provides a Java representation of Erlang floats and doubles.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangFun.html" title="class in com.ericsson.otp.erlang">OtpErlangFun</A></B></TD>
<TD>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangInt.html" title="class in com.ericsson.otp.erlang">OtpErlangInt</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangList.html" title="class in com.ericsson.otp.erlang">OtpErlangList</A></B></TD>
<TD>Provides a Java representation of Erlang lists.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangList.SubList.html" title="class in com.ericsson.otp.erlang">OtpErlangList.SubList</A></B></TD>
<TD>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangLong.html" title="class in com.ericsson.otp.erlang">OtpErlangLong</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangObject.html" title="class in com.ericsson.otp.erlang">OtpErlangObject</A></B></TD>
<TD>Base class of the Erlang data type classes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangObject.Hash.html" title="class in com.ericsson.otp.erlang">OtpErlangObject.Hash</A></B></TD>
<TD>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangPid.html" title="class in com.ericsson.otp.erlang">OtpErlangPid</A></B></TD>
<TD>Provides a Java representation of Erlang PIDs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangPort.html" title="class in com.ericsson.otp.erlang">OtpErlangPort</A></B></TD>
<TD>Provides a Java representation of Erlang ports.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangRef.html" title="class in com.ericsson.otp.erlang">OtpErlangRef</A></B></TD>
<TD>Provides a Java representation of Erlang refs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangShort.html" title="class in com.ericsson.otp.erlang">OtpErlangShort</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangString.html" title="class in com.ericsson.otp.erlang">OtpErlangString</A></B></TD>
<TD>Provides a Java representation of Erlang strings.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangTuple.html" title="class in com.ericsson.otp.erlang">OtpErlangTuple</A></B></TD>
<TD>Provides a Java representation of Erlang tuples.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangUInt.html" title="class in com.ericsson.otp.erlang">OtpErlangUInt</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangUShort.html" title="class in com.ericsson.otp.erlang">OtpErlangUShort</A></B></TD>
<TD>Provides a Java representation of Erlang integral types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpExternal.html" title="class in com.ericsson.otp.erlang">OtpExternal</A></B></TD>
<TD>Provides a collection of constants used when encoding and decoding Erlang
 terms.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpInputStream.html" title="class in com.ericsson.otp.erlang">OtpInputStream</A></B></TD>
<TD>Provides a stream for decoding Erlang terms from external format.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpLocalNode.html" title="class in com.ericsson.otp.erlang">OtpLocalNode</A></B></TD>
<TD>This class represents local node types.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpMbox.html" title="class in com.ericsson.otp.erlang">OtpMbox</A></B></TD>
<TD>
 Provides a simple mechanism for exchanging messages with Erlang processes or
 other instances of this class.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpMsg.html" title="class in com.ericsson.otp.erlang">OtpMsg</A></B></TD>
<TD>
 Provides a carrier for Erlang messages.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpNode.html" title="class in com.ericsson.otp.erlang">OtpNode</A></B></TD>
<TD>
 Represents a local OTP node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpNodeStatus.html" title="class in com.ericsson.otp.erlang">OtpNodeStatus</A></B></TD>
<TD>
 Provides a callback mechanism for receiving status change information about
 other nodes in the system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpOutputStream.html" title="class in com.ericsson.otp.erlang">OtpOutputStream</A></B></TD>
<TD>Provides a stream for encoding Erlang terms to external format, for
 transmission or storage.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpPeer.html" title="class in com.ericsson.otp.erlang">OtpPeer</A></B></TD>
<TD>Represents a remote OTP node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html" title="class in com.ericsson.otp.erlang">OtpSelf</A></B></TD>
<TD>Represents an OTP node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpServer.html" title="class in com.ericsson.otp.erlang">OtpServer</A></B></TD>
<TD><B>Deprecated.</B>&nbsp;<I>the functionality of this class has been moved to <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html" title="class in com.ericsson.otp.erlang"><CODE>OtpSelf</CODE></A>.</I></TD>
</TR>
</TABLE>
&nbsp;

<P>

<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Exception Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpAuthException.html" title="class in com.ericsson.otp.erlang">OtpAuthException</A></B></TD>
<TD>Exception raised when a node attempts to establish a communication channel
 when it is not authorized to do so, or when a node sends a message containing
 an invalid cookie on an established channel.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangDecodeException.html" title="class in com.ericsson.otp.erlang">OtpErlangDecodeException</A></B></TD>
<TD>Exception raised when an attempt is made to create an Erlang term by decoding
 a sequence of bytes that does not represent the type of term that was
 requested.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangException.html" title="class in com.ericsson.otp.erlang">OtpErlangException</A></B></TD>
<TD>Base class for the other OTP erlang exception classes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangExit.html" title="class in com.ericsson.otp.erlang">OtpErlangExit</A></B></TD>
<TD>Exception raised when a communication channel is broken.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpErlangRangeException.html" title="class in com.ericsson.otp.erlang">OtpErlangRangeException</A></B></TD>
<TD>Exception raised when an attempt is made to create an Erlang term with data
 that is out of range for the term in question.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../com/ericsson/otp/erlang/OtpException.html" title="class in com.ericsson.otp.erlang">OtpException</A></B></TD>
<TD>Base class for the other OTP exception classes.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package com.ericsson.otp.erlang Description
</H2>

<P>
<p> This package provides support for communication with Erlang and
representation of Erlang datatypes.

<p><em>Note:</em> By default, <code>jinterface</code> is only guaranteed
to be compatible with other Erlang/OTP components from the same release as
<code>jinterface</code> itself. For example, <code>jinterface</code>
from the OTP R10 release is not compatible with an Erlang emulator from
the OTP R9 release by default. <code>jinterface</code> can be set in
compatibility mode of an earlier release (not earlier that R7), though.
The compatibility mode is set by usage of the <code>OtpCompatRel</code>
property. By starting the jvm with the command-line argument
<code>-DOtpCompatRel=9</code>, <code>jinterface</code> will be compatible
with the R9 release of OTP. <em>Warning!</em> You may run into trouble if
this feature is used carelessly. Always make sure that all communicating
components are either from the same Erlang/OTP release, or from release
X and release Y where all components from release Y are in compatibility
mode of release X.

<p> The classes 
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangList.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangList</CODE></A>, 
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangTuple.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangTuple</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangBinary.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangBinary</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangAtom.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangAtom</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangBoolean.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangBoolean</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangByte.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangByte</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangChar.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangChar</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangDouble.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangDouble</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangFloat.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangFloat</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangLong.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangLong</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangInt.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangInt</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangUInt.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangUInt</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangShort.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangShort</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangUShort.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangUShort</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangString.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangString</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangObject.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangObject</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangPid.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangPid</CODE></A>,
<A HREF="../../../../com/ericsson/otp/erlang/OtpErlangPort.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangPort</CODE></A>,
and <A HREF="../../../../com/ericsson/otp/erlang/OtpErlangRef.html" title="class in com.ericsson.otp.erlang"><CODE>OtpErlangRef</CODE></A>
represent the various Erlang datatypes.


<p> There are two basic mechanisms for communicating with Erlang,
described briefly here. Note that the two mechanisms are not intended
to be used together. Which mechanism you choose depends on your
application and the level of control it needs. </p>

<p> You can use <A HREF="../../../../com/ericsson/otp/erlang/OtpNode.html" title="class in com.ericsson.otp.erlang"><CODE>OtpNode</CODE></A>, which can
manage incoming and outgoing connections for you. With <A HREF="../../../../com/ericsson/otp/erlang/OtpNode.html" title="class in com.ericsson.otp.erlang"><CODE>OtpNode</CODE></A> a thread is automatically started to
listen for incoming connections, make necessary outgoing connections,
and dispatch messages to their recipients. <A HREF="../../../../com/ericsson/otp/erlang/OtpNode.html" title="class in com.ericsson.otp.erlang"><CODE>OtpNode</CODE></A> supports the concept of <A HREF="../../../../com/ericsson/otp/erlang/OtpMbox.html" title="class in com.ericsson.otp.erlang"><CODE>mailboxes</CODE></A>, allowing you to have
several Java components communicating independently with Erlang.
</p>

<pre>
  OtpNode node = new OtpNode("bingo");
  OtpMbox mbox = node.createMbox();
  
  mbox.send("foo@localhost",new OtpErlangAtom("hej"));
</pre>

<p> If you need more control (but less support from the library), you
can manage connections yourself using the <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html" title="class in com.ericsson.otp.erlang"><CODE>OtpSelf</CODE></A> and <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang"><CODE>OtpConnection</CODE></A> classes, in which case you can
control explicitly which connections are made and which messages are
sent. Received messages are not dispatched by <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang"><CODE>OtpConnection</CODE></A>. </p>

<p> The classes <A HREF="../../../../com/ericsson/otp/erlang/OtpPeer.html" title="class in com.ericsson.otp.erlang"><CODE>OtpPeer</CODE></A>, <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html" title="class in com.ericsson.otp.erlang"><CODE>OtpSelf</CODE></A> and <A HREF="../../../../com/ericsson/otp/erlang/OtpServer.html" title="class in com.ericsson.otp.erlang"><CODE>OtpServer</CODE></A> are used to represent OTP nodes and
are neccessary in order to set up communication between the Java
thread and a remote node. Once a connection has been established, it
is represented by an <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang"><CODE>OtpConnection</CODE></A>,
through which all communication goes.

<p> Setting up a connection with a remote node is straightforward. You
create objects representing the local and remote nodes, then call the
local node's <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#connect(com.ericsson.otp.erlang.OtpPeer)"><CODE>connect()</CODE></A> method:

<pre>
  OtpSelf self = new OtpSelf("client","cookie");
  OtpPeer other = new OtpPeer("server");
  OtpConnection conn = self.connect(other);
</pre>

<p>If you wish to be able to accept incoming connections as well as
make outgoing ones, you first must register the listen port with EPMD
(described in the Erlang documentation). Once that is done, you can
accept incoming connections:

<pre>
  OtpServer self = new OtpSelf("server","cookie");
  self.publishPort();
  OtpConnection conn = self.accept();
</pre>


<p>Once the connection is established by one of the above methods (<A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#connect(com.ericsson.otp.erlang.OtpPeer)"><CODE>connect()</CODE></A> or <A HREF="../../../../com/ericsson/otp/erlang/OtpSelf.html#accept()"><CODE>accept()</CODE></A>), you can use the resulting <A HREF="../../../../com/ericsson/otp/erlang/OtpConnection.html" title="class in com.ericsson.otp.erlang"><CODE>OtpConnection</CODE></A> to send and
receive messages:

<pre>
  OtpErlangAtom msg = new ErlangOtpAtom("hello");
  conn.send("echoserver", msg);
  
  OtpErlangObject reply = conn.receive();
  System.out.println("Received " + reply);
</pre>

<p> Finally, you can get an even greater level of control (and even
less support from the library) by subclassing <A HREF="../../../../com/ericsson/otp/erlang/AbstractConnection.html" title="class in com.ericsson.otp.erlang"><CODE>AbstractConnection</CODE></A> and implementing the
communication primitives needed by your application. </p>
<P>

<P>
<DL>
</DL>
<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="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</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-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;PREV PACKAGE&nbsp;
&nbsp;NEXT PACKAGE</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/ericsson/otp/erlang/package-summary.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="package-summary.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>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>