mirror of
https://github.com/ChronosX88/FreePastry.git
synced 2025-01-16 09:36:27 +00:00
1080 lines
48 KiB
HTML
1080 lines
48 KiB
HTML
<!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:37 CET 2009 -->
|
|
<TITLE>
|
|
PastryAppl (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="PastryAppl (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> </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="class-use/PastryAppl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-all.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>
|
|
Rice Pastry API</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../rice/pastry/client/NodeIsNotReadyException.html" title="class in rice.pastry.client"><B>PREV CLASS</B></A>
|
|
NEXT CLASS</FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/pastry/client/PastryAppl.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="PastryAppl.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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.pastry.client</FONT>
|
|
<BR>
|
|
Class PastryAppl</H2>
|
|
<PRE>
|
|
java.lang.Object
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.pastry.client.PastryAppl</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../rice/pastry/client/CommonAPIAppl.html" title="class in rice.pastry.client">CommonAPIAppl</A>, <A HREF="../../../rice/pastry/peerreview/FetchLeafsetApp.html" title="class in rice.pastry.peerreview">FetchLeafsetApp</A>, <A HREF="../../../rice/pastry/testing/HelloWorldApp.html" title="class in rice.pastry.testing">HelloWorldApp</A>, <A HREF="../../../rice/pastry/commonapi/PastryEndpoint.html" title="class in rice.pastry.commonapi">PastryEndpoint</A>, <A HREF="../../../rice/pastry/standard/PeriodicLeafSetProtocol.html" title="class in rice.pastry.standard">PeriodicLeafSetProtocol</A>, <A HREF="../../../rice/pastry/testing/Ping.html" title="class in rice.pastry.testing">Ping</A>, <A HREF="../../../rice/pastry/testing/PingClient.html" title="class in rice.pastry.testing">PingClient</A>, <A HREF="../../../rice/pastry/pns/PNSApplication.html" title="class in rice.pastry.pns">PNSApplication</A>, <A HREF="../../../rice/pastry/socket/nat/probe/ProbeApp.html" title="class in rice.pastry.socket.nat.probe">ProbeApp</A>, <A HREF="../../../rice/pastry/socket/nat/rendezvous/RendezvousApp.html" title="class in rice.pastry.socket.nat.rendezvous">RendezvousApp</A>, <A HREF="../../../rice/pastry/standard/StandardJoinProtocol.html" title="class in rice.pastry.standard">StandardJoinProtocol</A>, <A HREF="../../../rice/pastry/standard/StandardLeafSetProtocol.html" title="class in rice.pastry.standard">StandardLeafSetProtocol</A>, <A HREF="../../../rice/pastry/standard/StandardRouter.html" title="class in rice.pastry.standard">StandardRouter</A>, <A HREF="../../../rice/pastry/standard/StandardRouteSetProtocol.html" title="class in rice.pastry.standard">StandardRouteSetProtocol</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public abstract class <B>PastryAppl</B><DT>extends java.lang.Object</DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A PastryAppl is an abstract class that every Pastry application
|
|
extends. This is the external Pastry API.
|
|
<P>
|
|
|
|
<P>
|
|
<DL>
|
|
<DT><B>Version:</B></DT>
|
|
<DD>$Id: PastryAppl.java 4226 2008-05-28 14:56:19Z jeffh $</DD>
|
|
<DT><B>Author:</B></DT>
|
|
<DD>Peter Druschel</DD>
|
|
</DL>
|
|
<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>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#address">address</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#deserializer">deserializer</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected java.lang.String</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#instance">instance</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#logger">logger</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected java.util.Map<java.lang.String,java.lang.Object></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#options">options</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#receiver">receiver</A></B></CODE>
|
|
|
|
<BR>
|
|
holds the receiverSocket</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected <A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#thePastryNode">thePastryNode</A></B></CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ======== 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="../../../rice/pastry/client/PastryAppl.html#PastryAppl(rice.pastry.PastryNode)">PastryAppl</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn)</CODE>
|
|
|
|
<BR>
|
|
Constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#PastryAppl(rice.pastry.PastryNode, int)">PastryAppl</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
int port)</CODE>
|
|
|
|
<BR>
|
|
Constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#PastryAppl(rice.pastry.PastryNode, java.lang.String)">PastryAppl</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
java.lang.String instance)</CODE>
|
|
|
|
<BR>
|
|
Constructor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#PastryAppl(rice.pastry.PastryNode, java.lang.String, int, rice.p2p.commonapi.rawserialization.MessageDeserializer)">PastryAppl</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
java.lang.String instance,
|
|
int address,
|
|
<A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> md)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#PastryAppl(rice.pastry.PastryNode, java.lang.String, int, rice.p2p.commonapi.rawserialization.MessageDeserializer, rice.environment.logging.Logger)">PastryAppl</A></B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
java.lang.String instance,
|
|
int address,
|
|
<A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> md,
|
|
<A HREF="../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A> logger)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== 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> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#accept(rice.p2p.commonapi.appsocket.AppSocketReceiver)">accept</A></B>(<A HREF="../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A> receiver)</CODE>
|
|
|
|
<BR>
|
|
Sets an AppSocketReceiver to be called when the next socket arrives.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#canReceiveSocket()">canReceiveSocket</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Calls receiver.receiveSocket(), then sets receiver to null.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#connect(rice.p2p.commonapi.NodeHandle, rice.p2p.commonapi.appsocket.AppSocketReceiver, int)">connect</A></B>(<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> handle,
|
|
<A HREF="../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A> receiver,
|
|
int timeout)</CODE>
|
|
|
|
<BR>
|
|
Called to open an ApplicationLevelSocket</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#deliverWhenNotReady()">deliverWhenNotReady</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Instructs the MessageDispatch how to behave when the PastryNode is not ready.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#destroy()">destroy</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Called when PastryNode is destroyed.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#enrouteMessage(rice.pastry.messaging.Message, rice.pastry.Id, rice.pastry.NodeHandle, rice.pastry.routing.SendOptions)">enrouteMessage</A></B>(<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nextHop,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt)</CODE>
|
|
|
|
<BR>
|
|
Called by pastry when a message is enroute and is passing through this node.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#finishReceiveSocket(rice.p2p.commonapi.appsocket.AppSocket)">finishReceiveSocket</A></B>(<A HREF="../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A> socket)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#getAddress()">getAddress</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Returns the address of this application.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#getDeserializer()">getDeserializer</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#getLeafSet()">getLeafSet</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Called by a layered Pastry application to obtain a copy of the leaf
|
|
set.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#getNodeHandle()">getNodeHandle</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the handle of the Pastry node associated with this client</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#getNodeId()">getNodeId</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Gets the node id associated with this client.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/pastry/routing/RoutingTable.html" title="class in rice.pastry.routing">RoutingTable</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#getRoutingTable()">getRoutingTable</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Called by a layered Pastry application to obtain a copy of the
|
|
routing table.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#isClosest(rice.pastry.Id)">isClosest</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</CODE>
|
|
|
|
<BR>
|
|
Called by the layered Pastry application to check if the local
|
|
pastry node is the one that is currently closest to the object key id.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#leafSetChange(rice.pastry.NodeHandle, boolean)">leafSetChange</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh,
|
|
boolean wasAdded)</CODE>
|
|
|
|
<BR>
|
|
Called by pastry when the leaf set changes.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>abstract void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#messageForAppl(rice.pastry.messaging.Message)">messageForAppl</A></B>(<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg)</CODE>
|
|
|
|
<BR>
|
|
Called by pastry when a message arrives for this application.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#notifyReady()">notifyReady</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Invoked when the Pastry node has joined the overlay network and
|
|
is ready to send and receive messages
|
|
|
|
As of FreePastry 1.4.1, replaced by PastryNode Observer pattern.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#receiveMessage(rice.pastry.messaging.Message)">receiveMessage</A></B>(<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg)</CODE>
|
|
|
|
<BR>
|
|
Called by pastry to deliver a message to this client.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#receiveMessageInternal(rice.pastry.messaging.RawMessageDelivery)">receiveMessageInternal</A></B>(<A HREF="../../../rice/pastry/messaging/RawMessageDelivery.html" title="interface in rice.pastry.messaging">RawMessageDelivery</A> msg)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#register()">register</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#routeMsg(rice.pastry.Id, rice.pastry.messaging.Message, rice.pastry.routing.SendOptions)">routeMsg</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
|
<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt)</CODE>
|
|
|
|
<BR>
|
|
Routes a message to the live node D with nodeId numerically
|
|
closest to key (at the time of delivery).</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../rice/p2p/commonapi/MessageReceipt.html" title="interface in rice.p2p.commonapi">MessageReceipt</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#routeMsg(rice.pastry.Id, rice.pastry.messaging.Message, rice.pastry.routing.SendOptions, rice.p2p.commonapi.DeliveryNotification)">routeMsg</A></B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
|
<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt,
|
|
<A HREF="../../../rice/p2p/commonapi/DeliveryNotification.html" title="interface in rice.p2p.commonapi">DeliveryNotification</A> deliverAckToMe)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> boolean</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#routeMsgDirect(rice.pastry.NodeHandle, rice.pastry.messaging.Message, rice.pastry.routing.SendOptions)">routeMsgDirect</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> dest,
|
|
<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt)</CODE>
|
|
|
|
<BR>
|
|
Sends a message to the Pastry node identified by dest.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#routeSetChange(rice.pastry.NodeHandle, boolean)">routeSetChange</A></B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh,
|
|
boolean wasAdded)</CODE>
|
|
|
|
<BR>
|
|
Called by pastry when the route set changes.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../rice/pastry/client/PastryAppl.html#setDeserializer(rice.p2p.commonapi.rawserialization.MessageDeserializer)">setDeserializer</A></B>(<A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> deserializer)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<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, toString, wait, wait, wait</CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
|
|
<A NAME="field_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>Field Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="deserializer"><!-- --></A><H3>
|
|
deserializer</H3>
|
|
<PRE>
|
|
protected <A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> <B>deserializer</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="instance"><!-- --></A><H3>
|
|
instance</H3>
|
|
<PRE>
|
|
protected java.lang.String <B>instance</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="thePastryNode"><!-- --></A><H3>
|
|
thePastryNode</H3>
|
|
<PRE>
|
|
protected <A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> <B>thePastryNode</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="address"><!-- --></A><H3>
|
|
address</H3>
|
|
<PRE>
|
|
protected int <B>address</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="logger"><!-- --></A><H3>
|
|
logger</H3>
|
|
<PRE>
|
|
protected <A HREF="../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A> <B>logger</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="options"><!-- --></A><H3>
|
|
options</H3>
|
|
<PRE>
|
|
protected java.util.Map<java.lang.String,java.lang.Object> <B>options</B></PRE>
|
|
<DL>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="receiver"><!-- --></A><H3>
|
|
receiver</H3>
|
|
<PRE>
|
|
protected <A HREF="../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A> <B>receiver</B></PRE>
|
|
<DL>
|
|
<DD>holds the receiverSocket
|
|
<P>
|
|
<DL>
|
|
</DL>
|
|
</DL>
|
|
|
|
<!-- ========= 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="PastryAppl(rice.pastry.PastryNode)"><!-- --></A><H3>
|
|
PastryAppl</H3>
|
|
<PRE>
|
|
public <B>PastryAppl</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn)</PRE>
|
|
<DL>
|
|
<DD>Constructor.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>pn</CODE> - the pastry node that client will attach to.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="PastryAppl(rice.pastry.PastryNode, java.lang.String)"><!-- --></A><H3>
|
|
PastryAppl</H3>
|
|
<PRE>
|
|
public <B>PastryAppl</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
java.lang.String instance)</PRE>
|
|
<DL>
|
|
<DD>Constructor. This constructor will perform the same tasks as the
|
|
above constructor, but will also create a Pastry address for this
|
|
application, which is dependent upon the given instance name and
|
|
the class name.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>pn</CODE> - the pastry node that client will attach to.<DD><CODE>instance</CODE> - The instance name of this appl.</DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="PastryAppl(rice.pastry.PastryNode, java.lang.String, int, rice.p2p.commonapi.rawserialization.MessageDeserializer)"><!-- --></A><H3>
|
|
PastryAppl</H3>
|
|
<PRE>
|
|
public <B>PastryAppl</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
java.lang.String instance,
|
|
int address,
|
|
<A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> md)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="PastryAppl(rice.pastry.PastryNode, java.lang.String, int, rice.p2p.commonapi.rawserialization.MessageDeserializer, rice.environment.logging.Logger)"><!-- --></A><H3>
|
|
PastryAppl</H3>
|
|
<PRE>
|
|
public <B>PastryAppl</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
java.lang.String instance,
|
|
int address,
|
|
<A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> md,
|
|
<A HREF="../../../rice/environment/logging/Logger.html" title="class in rice.environment.logging">Logger</A> logger)</PRE>
|
|
<DL>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="PastryAppl(rice.pastry.PastryNode, int)"><!-- --></A><H3>
|
|
PastryAppl</H3>
|
|
<PRE>
|
|
public <B>PastryAppl</B>(<A HREF="../../../rice/pastry/PastryNode.html" title="class in rice.pastry">PastryNode</A> pn,
|
|
int port)</PRE>
|
|
<DL>
|
|
<DD>Constructor. This constructor will perform the same tasks as the
|
|
above constructor, but will also create a Pastry address for this
|
|
application, using the specified port.
|
|
|
|
Need to call register on this.
|
|
<P>
|
|
<DL>
|
|
<DT><B>Parameters:</B><DD><CODE>pn</CODE> - the pastry node that client will attach to.<DD><CODE>instance</CODE> - The instance name of this appl.</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="register()"><!-- --></A><H3>
|
|
register</H3>
|
|
<PRE>
|
|
public void <B>register</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getAddress()"><!-- --></A><H3>
|
|
getAddress</H3>
|
|
<PRE>
|
|
public int <B>getAddress</B>()</PRE>
|
|
<DL>
|
|
<DD>Returns the address of this application.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the address.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="receiveMessageInternal(rice.pastry.messaging.RawMessageDelivery)"><!-- --></A><H3>
|
|
receiveMessageInternal</H3>
|
|
<PRE>
|
|
public void <B>receiveMessageInternal</B>(<A HREF="../../../rice/pastry/messaging/RawMessageDelivery.html" title="interface in rice.pastry.messaging">RawMessageDelivery</A> msg)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setDeserializer(rice.p2p.commonapi.rawserialization.MessageDeserializer)"><!-- --></A><H3>
|
|
setDeserializer</H3>
|
|
<PRE>
|
|
protected void <B>setDeserializer</B>(<A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> deserializer)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getDeserializer()"><!-- --></A><H3>
|
|
getDeserializer</H3>
|
|
<PRE>
|
|
public <A HREF="../../../rice/p2p/commonapi/rawserialization/MessageDeserializer.html" title="interface in rice.p2p.commonapi.rawserialization">MessageDeserializer</A> <B>getDeserializer</B>()</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="receiveMessage(rice.pastry.messaging.Message)"><!-- --></A><H3>
|
|
receiveMessage</H3>
|
|
<PRE>
|
|
public void <B>receiveMessage</B>(<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg)</PRE>
|
|
<DL>
|
|
<DD>Called by pastry to deliver a message to this client.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>msg</CODE> - the message that is arriving.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNodeId()"><!-- --></A><H3>
|
|
getNodeId</H3>
|
|
<PRE>
|
|
public final <A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> <B>getNodeId</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the node id associated with this client.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the node id.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNodeHandle()"><!-- --></A><H3>
|
|
getNodeHandle</H3>
|
|
<PRE>
|
|
public <A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> <B>getNodeHandle</B>()</PRE>
|
|
<DL>
|
|
<DD>Gets the handle of the Pastry node associated with this client
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the node handle</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="routeMsgDirect(rice.pastry.NodeHandle, rice.pastry.messaging.Message, rice.pastry.routing.SendOptions)"><!-- --></A><H3>
|
|
routeMsgDirect</H3>
|
|
<PRE>
|
|
public boolean <B>routeMsgDirect</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> dest,
|
|
<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt)</PRE>
|
|
<DL>
|
|
<DD>Sends a message to the Pastry node identified by dest. If that
|
|
node has failed or no point-to-point connection can be
|
|
established to the node from the local node in the Internet,
|
|
the operation fails. Note that in this case, it may still be
|
|
possible to send the message to that node using routeMsg.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>dest</CODE> - the destination node<DD><CODE>msg</CODE> - the message to deliver.<DD><CODE>cred</CODE> - credentials that verify the authenticity of the message.<DD><CODE>opt</CODE> - send options that describe how the message is to be routed.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="routeMsg(rice.pastry.Id, rice.pastry.messaging.Message, rice.pastry.routing.SendOptions)"><!-- --></A><H3>
|
|
routeMsg</H3>
|
|
<PRE>
|
|
public void <B>routeMsg</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
|
<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt)</PRE>
|
|
<DL>
|
|
<DD>Routes a message to the live node D with nodeId numerically
|
|
closest to key (at the time of delivery). The message is
|
|
delivered to the application with address addr at D, and at
|
|
each Pastry node encountered along the route to D.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key<DD><CODE>msg</CODE> - the message to deliver.<DD><CODE>cred</CODE> - credentials that verify the authenticity of the message.<DD><CODE>opt</CODE> - send options that describe how the message is to be routed.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="routeMsg(rice.pastry.Id, rice.pastry.messaging.Message, rice.pastry.routing.SendOptions, rice.p2p.commonapi.DeliveryNotification)"><!-- --></A><H3>
|
|
routeMsg</H3>
|
|
<PRE>
|
|
public <A HREF="../../../rice/p2p/commonapi/MessageReceipt.html" title="interface in rice.p2p.commonapi">MessageReceipt</A> <B>routeMsg</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
|
<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt,
|
|
<A HREF="../../../rice/p2p/commonapi/DeliveryNotification.html" title="interface in rice.p2p.commonapi">DeliveryNotification</A> deliverAckToMe)</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLeafSet()"><!-- --></A><H3>
|
|
getLeafSet</H3>
|
|
<PRE>
|
|
public <A HREF="../../../rice/pastry/leafset/LeafSet.html" title="class in rice.pastry.leafset">LeafSet</A> <B>getLeafSet</B>()</PRE>
|
|
<DL>
|
|
<DD>Called by a layered Pastry application to obtain a copy of the leaf
|
|
set. The leaf set contains the nodeId to IP address binding of the
|
|
l/2 nodes with numerically closest counterclockwise and the l/2 nodes with
|
|
numerically closest clockwise nodeIds, relatively to the local node's
|
|
id.
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>the local node's leaf set</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getRoutingTable()"><!-- --></A><H3>
|
|
getRoutingTable</H3>
|
|
<PRE>
|
|
public <A HREF="../../../rice/pastry/routing/RoutingTable.html" title="class in rice.pastry.routing">RoutingTable</A> <B>getRoutingTable</B>()</PRE>
|
|
<DL>
|
|
<DD>Called by a layered Pastry application to obtain a copy of the
|
|
routing table. The routing table contains the nodeId to IP
|
|
address bindings of R nodes that share the local node's id in
|
|
the first n digits, and differ in the n+1th digit, for 0 <= n
|
|
<= ceiling(log_2^b N), where N is the total number of currently
|
|
live nodes in the Pastry network. The routing table may be
|
|
incomplete, may contain nodes that cannot be reached from the
|
|
local node or have failed, and the table may change at any
|
|
time.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="isClosest(rice.pastry.Id)"><!-- --></A><H3>
|
|
isClosest</H3>
|
|
<PRE>
|
|
public boolean <B>isClosest</B>(<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key)</PRE>
|
|
<DL>
|
|
<DD>Called by the layered Pastry application to check if the local
|
|
pastry node is the one that is currently closest to the object key id.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the object key id
|
|
<DT><B>Returns:</B><DD>true if the local node is currently the closest to the key.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="messageForAppl(rice.pastry.messaging.Message)"><!-- --></A><H3>
|
|
messageForAppl</H3>
|
|
<PRE>
|
|
public abstract void <B>messageForAppl</B>(<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg)</PRE>
|
|
<DL>
|
|
<DD>Called by pastry when a message arrives for this application.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>msg</CODE> - the message that is arriving.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="enrouteMessage(rice.pastry.messaging.Message, rice.pastry.Id, rice.pastry.NodeHandle, rice.pastry.routing.SendOptions)"><!-- --></A><H3>
|
|
enrouteMessage</H3>
|
|
<PRE>
|
|
public boolean <B>enrouteMessage</B>(<A HREF="../../../rice/pastry/messaging/Message.html" title="class in rice.pastry.messaging">Message</A> msg,
|
|
<A HREF="../../../rice/pastry/Id.html" title="class in rice.pastry">Id</A> key,
|
|
<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nextHop,
|
|
<A HREF="../../../rice/pastry/routing/SendOptions.html" title="class in rice.pastry.routing">SendOptions</A> opt)</PRE>
|
|
<DL>
|
|
<DD>Called by pastry when a message is enroute and is passing through this node. If this
|
|
method is not overridden, the default behaviour is to let the message pass through.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>msg</CODE> - the message that is passing through.<DD><CODE>key</CODE> - the key<DD><CODE>nextHop</CODE> - the default next hop for the message.<DD><CODE>opt</CODE> - the send options the message was sent with.
|
|
<DT><B>Returns:</B><DD>true if the message should be routed, false if the message should be cancelled.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="leafSetChange(rice.pastry.NodeHandle, boolean)"><!-- --></A><H3>
|
|
leafSetChange</H3>
|
|
<PRE>
|
|
public void <B>leafSetChange</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh,
|
|
boolean wasAdded)</PRE>
|
|
<DL>
|
|
<DD>Called by pastry when the leaf set changes.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>nh</CODE> - the handle of the node that was added or removed.<DD><CODE>wasAdded</CODE> - true if the node was added, false if the node was removed.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="routeSetChange(rice.pastry.NodeHandle, boolean)"><!-- --></A><H3>
|
|
routeSetChange</H3>
|
|
<PRE>
|
|
public void <B>routeSetChange</B>(<A HREF="../../../rice/pastry/NodeHandle.html" title="class in rice.pastry">NodeHandle</A> nh,
|
|
boolean wasAdded)</PRE>
|
|
<DL>
|
|
<DD>Called by pastry when the route set changes.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>nh</CODE> - the handle of the node that was added or removed.<DD><CODE>wasAdded</CODE> - true if the node was added, false if the node was removed.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="notifyReady()"><!-- --></A><H3>
|
|
notifyReady</H3>
|
|
<PRE>
|
|
public void <B>notifyReady</B>()</PRE>
|
|
<DL>
|
|
<DD>Invoked when the Pastry node has joined the overlay network and
|
|
is ready to send and receive messages
|
|
|
|
As of FreePastry 1.4.1, replaced by PastryNode Observer pattern.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="deliverWhenNotReady()"><!-- --></A><H3>
|
|
deliverWhenNotReady</H3>
|
|
<PRE>
|
|
public boolean <B>deliverWhenNotReady</B>()</PRE>
|
|
<DL>
|
|
<DD>Instructs the MessageDispatch how to behave when the PastryNode is not ready.
|
|
|
|
An application can override this method to return true if it wishes to receive
|
|
messages before Pastry is ready().
|
|
|
|
Most applications should leave this as false, so that their application does
|
|
not have inconsistent routing. However Pastry's protocols (such as the join protocol)
|
|
need to receive messages before pastry is ready(). This is because they are attempting
|
|
to make pastry ready().
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>false unless the node is a service</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="destroy()"><!-- --></A><H3>
|
|
destroy</H3>
|
|
<PRE>
|
|
public void <B>destroy</B>()</PRE>
|
|
<DL>
|
|
<DD>Called when PastryNode is destroyed. Can be overloaded by applications.
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="connect(rice.p2p.commonapi.NodeHandle, rice.p2p.commonapi.appsocket.AppSocketReceiver, int)"><!-- --></A><H3>
|
|
connect</H3>
|
|
<PRE>
|
|
public void <B>connect</B>(<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> handle,
|
|
<A HREF="../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A> receiver,
|
|
int timeout)</PRE>
|
|
<DL>
|
|
<DD>Called to open an ApplicationLevelSocket
|
|
<P>
|
|
<DD><DL>
|
|
</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="accept(rice.p2p.commonapi.appsocket.AppSocketReceiver)"><!-- --></A><H3>
|
|
accept</H3>
|
|
<PRE>
|
|
public void <B>accept</B>(<A HREF="../../../rice/p2p/commonapi/appsocket/AppSocketReceiver.html" title="interface in rice.p2p.commonapi.appsocket">AppSocketReceiver</A> receiver)</PRE>
|
|
<DL>
|
|
<DD>Sets an AppSocketReceiver to be called when the next socket arrives.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>receiver</CODE> - </DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="canReceiveSocket()"><!-- --></A><H3>
|
|
canReceiveSocket</H3>
|
|
<PRE>
|
|
public boolean <B>canReceiveSocket</B>()</PRE>
|
|
<DL>
|
|
<DD>Calls receiver.receiveSocket(), then sets receiver to null.
|
|
|
|
It sets it to null to allow the application to provide SocketInitiationBackpressure
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>socket</CODE> - the new socket from the network
|
|
<DT><B>Returns:</B><DD>false if receiver was null, true receiveSocket() was called</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="finishReceiveSocket(rice.p2p.commonapi.appsocket.AppSocket)"><!-- --></A><H3>
|
|
finishReceiveSocket</H3>
|
|
<PRE>
|
|
public void <B>finishReceiveSocket</B>(<A HREF="../../../rice/p2p/commonapi/appsocket/AppSocket.html" title="interface in rice.p2p.commonapi.appsocket">AppSocket</A> socket)
|
|
throws java.io.IOException</PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE>java.io.IOException</CODE></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> </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="class-use/PastryAppl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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-all.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>
|
|
Rice Pastry API</EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../rice/pastry/client/NodeIsNotReadyException.html" title="class in rice.pastry.client"><B>PREV CLASS</B></A>
|
|
NEXT CLASS</FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?rice/pastry/client/PastryAppl.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="PastryAppl.html" target="_top"><B>NO FRAMES</B></A>
|
|
<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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<i>Copyright © 2001-2005 - Rice Pastry.</i>
|
|
</BODY>
|
|
</HTML>
|