372 lines
15 KiB
HTML
Raw Permalink Normal View History

2019-05-13 16:45:05 +04:00
<!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.6.0_07) on Fri Mar 13 20:01:30 CET 2009 -->
<TITLE>
Node (Rice Pastry - API Specifications)
</TITLE>
<META NAME="date" CONTENT="2009-03-13">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Node (Rice Pastry - API Specifications)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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="../../../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="class-use/Node.html"><FONT CLASS="NavBarFont1"><B>Use</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>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../rice/p2p/commonapi/MessageReceipt.html" title="interface in rice.p2p.commonapi"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?rice/p2p/commonapi/Node.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Node.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
rice.p2p.commonapi</FONT>
<BR>
Interface Node</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../rice/p2p/past/gc/GCNode.html" title="class in rice.p2p.past.gc">GCNode</A>, <A HREF="../../../rice/p2p/multiring/MultiringNode.html" title="class in rice.p2p.multiring">MultiringNode</A>, <A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>Node</B></DL>
</PRE>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Id: Node.java 3992 2007-12-02 20:09:18Z jeffh $</DD>
<DT><B>Author:</B></DT>
<DD>Alan Mislove, Peter Druschel</DD>
</DL>
<HR>
<P>
<!-- ========== 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="../../../rice/p2p/commonapi/Endpoint.html" title="interface in rice.p2p.commonapi">Endpoint</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/p2p/commonapi/Node.html#buildEndpoint(rice.p2p.commonapi.Application, java.lang.String)">buildEndpoint</A></B>(<A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A>&nbsp;application,
java.lang.String&nbsp;instance)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Same as register application, but returns an unregistered Endpoint.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/p2p/commonapi/Node.html#getEnvironment()">getEnvironment</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the environment.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/p2p/commonapi/Node.html#getId()">getId</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Id of this node</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../rice/p2p/commonapi/IdFactory.html" title="interface in rice.p2p.commonapi">IdFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/p2p/commonapi/Node.html#getIdFactory()">getIdFactory</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a factory for Ids specific to this node's protocol.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/p2p/commonapi/Node.html#getLocalNodeHandle()">getLocalNodeHandle</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a handle to the local node.</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="../../../rice/p2p/commonapi/Node.html#printRouteState()">printRouteState</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For debugging: print the internal routing state of the Node.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../rice/p2p/commonapi/Endpoint.html" title="interface in rice.p2p.commonapi">Endpoint</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/p2p/commonapi/Node.html#registerApplication(rice.p2p.commonapi.Application, java.lang.String)">registerApplication</A></B>(<A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A>&nbsp;application,
java.lang.String&nbsp;instance)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use buildEndpoint(), then call Endpoint.register(), fixes
synchronization problems, related to implicit behavior</I></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="registerApplication(rice.p2p.commonapi.Application, java.lang.String)"><!-- --></A><H3>
registerApplication</H3>
<PRE>
<A HREF="../../../rice/p2p/commonapi/Endpoint.html" title="interface in rice.p2p.commonapi">Endpoint</A> <B>registerApplication</B>(<A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A>&nbsp;application,
java.lang.String&nbsp;instance)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>use buildEndpoint(), then call Endpoint.register(), fixes
synchronization problems, related to implicit behavior</I>
<P>
<DD>This returns a Endpoint specific to the given application and
instance name to the application, which the application can then use in
order to send an receive messages. This method abstracts away the
port number for this application, generating a port by hashing together
the class name with the instance name to generate a unique port.
Developers who wish for more advanced behavior can specify their
port manually, by using the second constructor below.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>application</CODE> - The Application<DD><CODE>instance</CODE> - An identifier for a given instance
<DT><B>Returns:</B><DD>The endpoint specific to this applicationk, which can be used for
message sending/receiving. Endpoint is already registered.</DL>
</DD>
</DL>
<HR>
<A NAME="getId()"><!-- --></A><H3>
getId</H3>
<PRE>
<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A> <B>getId</B>()</PRE>
<DL>
<DD>Returns the Id of this node
<P>
<DD><DL>
<DT><B>Returns:</B><DD>This node's Id</DL>
</DD>
</DL>
<HR>
<A NAME="getIdFactory()"><!-- --></A><H3>
getIdFactory</H3>
<PRE>
<A HREF="../../../rice/p2p/commonapi/IdFactory.html" title="interface in rice.p2p.commonapi">IdFactory</A> <B>getIdFactory</B>()</PRE>
<DL>
<DD>Returns a factory for Ids specific to this node's protocol.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>A factory for creating Ids.</DL>
</DD>
</DL>
<HR>
<A NAME="getLocalNodeHandle()"><!-- --></A><H3>
getLocalNodeHandle</H3>
<PRE>
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> <B>getLocalNodeHandle</B>()</PRE>
<DL>
<DD>Returns a handle to the local node. This node handle is serializable, and
can therefore be sent to other nodes in the network and still be valid.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>A NodeHandle referring to the local node.</DL>
</DD>
</DL>
<HR>
<A NAME="getEnvironment()"><!-- --></A><H3>
getEnvironment</H3>
<PRE>
<A HREF="../../../rice/environment/Environment.html" title="class in rice.environment">Environment</A> <B>getEnvironment</B>()</PRE>
<DL>
<DD>Returns the environment. This allows the nodes to be virtualized within the JVM
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the environment for this node/app.</DL>
</DD>
</DL>
<HR>
<A NAME="buildEndpoint(rice.p2p.commonapi.Application, java.lang.String)"><!-- --></A><H3>
buildEndpoint</H3>
<PRE>
<A HREF="../../../rice/p2p/commonapi/Endpoint.html" title="interface in rice.p2p.commonapi">Endpoint</A> <B>buildEndpoint</B>(<A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A>&nbsp;application,
java.lang.String&nbsp;instance)</PRE>
<DL>
<DD>Same as register application, but returns an unregistered Endpoint. This allows
the application to finish initialization that may require the endpoint
before it receives messages from the network and notification of changes.
When then application is ready, it must call endpoint.register() to receive messages.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>application</CODE> - <DD><CODE>instance</CODE> -
<DT><B>Returns:</B><DD></DL>
</DD>
</DL>
<HR>
<A NAME="printRouteState()"><!-- --></A><H3>
printRouteState</H3>
<PRE>
java.lang.String <B>printRouteState</B>()</PRE>
<DL>
<DD>For debugging: print the internal routing state of the Node.
<P>
<DD><DL>
<DT><B>Returns:</B><DD></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="../../../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="class-use/Node.html"><FONT CLASS="NavBarFont1"><B>Use</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>
Rice Pastry API</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../rice/p2p/commonapi/MessageReceipt.html" title="interface in rice.p2p.commonapi"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?rice/p2p/commonapi/Node.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Node.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>