FreePastry/docs/javadoc/rice/tutorial/scribe/MyScribeClient.html

686 lines
30 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:02 CET 2009 -->
<TITLE>
MyScribeClient (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="MyScribeClient (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/MyScribeClient.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../rice/tutorial/scribe/MyScribeContent.html" title="class in rice.tutorial.scribe"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?rice/tutorial/scribe/MyScribeClient.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MyScribeClient.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
rice.tutorial.scribe</FONT>
<BR>
Class MyScribeClient</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>rice.tutorial.scribe.MyScribeClient</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A>, <A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>MyScribeClient</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A>, <A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></DL>
</PRE>
<P>
We implement the Application interface to receive regular timed messages (see lesson5).
We implement the ScribeClient interface to receive scribe messages (called ScribeContent).
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Jeff Hoye</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 &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/tutorial/scribe/MyScribeClient.html#endpoint">endpoint</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Endpoint represents the underlieing node.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#MyScribeClient(rice.p2p.commonapi.Node)">MyScribeClient</A></B>(<A HREF="../../../rice/p2p/commonapi/Node.html" title="interface in rice.p2p.commonapi">Node</A>&nbsp;node)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The constructor for this scribe client.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#anycast(rice.p2p.scribe.Topic, rice.p2p.scribe.ScribeContent)">anycast</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called when we receive an anycast.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childAdded</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;child)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Informs this client that a child was added to a topic in
which it was interested in.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childRemoved</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;child)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Informs this client that a child was removed from a topic in
which it was interested in.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)">deliver</A></B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A>&nbsp;id,
<A HREF="../../../rice/p2p/commonapi/Message.html" title="interface in rice.p2p.commonapi">Message</A>&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Part of the Application interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#deliver(rice.p2p.scribe.Topic, rice.p2p.scribe.ScribeContent)">deliver</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called whenever we receive a published message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#forward(rice.p2p.commonapi.RouteMessage)">forward</A></B>(<A HREF="../../../rice/p2p/commonapi/RouteMessage.html" title="interface in rice.p2p.commonapi">RouteMessage</A>&nbsp;message)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is invoked on applications when the underlying node
is about to forward the given message with the provided target to
the specified next hop.</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/tutorial/scribe/MyScribeClient.html#getChildren()">getChildren</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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/tutorial/scribe/MyScribeClient.html#getParent()">getParent</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#isRoot()">isRoot</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Some passthrough accessors for the myScribe</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#sendAnycast()">sendAnycast</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends an anycast message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#sendMulticast()">sendMulticast</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends the multicast message.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#startPublishTask()">startPublishTask</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the publish task.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#subscribe()">subscribe</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subscribes to myTopic.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#subscribeFailed(rice.p2p.scribe.Topic)">subscribeFailed</A></B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Informs the client that a subscribe on the given topic failed
- the client should retry the subscribe or take appropriate
action.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../rice/tutorial/scribe/MyScribeClient.html#update(rice.p2p.commonapi.NodeHandle, boolean)">update</A></B>(<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;handle,
boolean&nbsp;joined)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is invoked to inform the application that the given node
has either joined or left the neighbor set of the local node, as the set
would be returned by the neighborSet call.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<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="endpoint"><!-- --></A><H3>
endpoint</H3>
<PRE>
protected <A HREF="../../../rice/p2p/commonapi/Endpoint.html" title="interface in rice.p2p.commonapi">Endpoint</A> <B>endpoint</B></PRE>
<DL>
<DD>The Endpoint represents the underlieing node. By making calls on the
Endpoint, it assures that the message will be delivered to a MyApp on whichever
node the message is intended for.
<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="MyScribeClient(rice.p2p.commonapi.Node)"><!-- --></A><H3>
MyScribeClient</H3>
<PRE>
public <B>MyScribeClient</B>(<A HREF="../../../rice/p2p/commonapi/Node.html" title="interface in rice.p2p.commonapi">Node</A>&nbsp;node)</PRE>
<DL>
<DD>The constructor for this scribe client. It will construct the ScribeApplication.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>node</CODE> - the PastryNode</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="subscribe()"><!-- --></A><H3>
subscribe</H3>
<PRE>
public void <B>subscribe</B>()</PRE>
<DL>
<DD>Subscribes to myTopic.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="startPublishTask()"><!-- --></A><H3>
startPublishTask</H3>
<PRE>
public void <B>startPublishTask</B>()</PRE>
<DL>
<DD>Starts the publish task.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)"><!-- --></A><H3>
deliver</H3>
<PRE>
public void <B>deliver</B>(<A HREF="../../../rice/p2p/commonapi/Id.html" title="interface in rice.p2p.commonapi">Id</A>&nbsp;id,
<A HREF="../../../rice/p2p/commonapi/Message.html" title="interface in rice.p2p.commonapi">Message</A>&nbsp;message)</PRE>
<DL>
<DD>Part of the Application interface. Will receive PublishContent every so often.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/Application.html#deliver(rice.p2p.commonapi.Id, rice.p2p.commonapi.Message)">deliver</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - The destination id of the message<DD><CODE>message</CODE> - The message being sent</DL>
</DD>
</DL>
<HR>
<A NAME="sendMulticast()"><!-- --></A><H3>
sendMulticast</H3>
<PRE>
public void <B>sendMulticast</B>()</PRE>
<DL>
<DD>Sends the multicast message.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="deliver(rice.p2p.scribe.Topic, rice.p2p.scribe.ScribeContent)"><!-- --></A><H3>
deliver</H3>
<PRE>
public void <B>deliver</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</PRE>
<DL>
<DD>Called whenever we receive a published message.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#deliver(rice.p2p.scribe.Topic, rice.p2p.scribe.ScribeContent)">deliver</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic the message was published to<DD><CODE>content</CODE> - The content which was published</DL>
</DD>
</DL>
<HR>
<A NAME="sendAnycast()"><!-- --></A><H3>
sendAnycast</H3>
<PRE>
public void <B>sendAnycast</B>()</PRE>
<DL>
<DD>Sends an anycast message.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="anycast(rice.p2p.scribe.Topic, rice.p2p.scribe.ScribeContent)"><!-- --></A><H3>
anycast</H3>
<PRE>
public boolean <B>anycast</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/scribe/ScribeContent.html" title="interface in rice.p2p.scribe">ScribeContent</A>&nbsp;content)</PRE>
<DL>
<DD>Called when we receive an anycast. If we return
false, it will be delivered elsewhere. Returning true
stops the message here.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#anycast(rice.p2p.scribe.Topic, rice.p2p.scribe.ScribeContent)">anycast</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic the message was anycasted to<DD><CODE>content</CODE> - The content which was anycasted
<DT><B>Returns:</B><DD>Whether or not the anycast should continue, true if we will accept the anycast</DL>
</DD>
</DL>
<HR>
<A NAME="childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)"><!-- --></A><H3>
childAdded</H3>
<PRE>
public void <B>childAdded</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;child)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">ScribeClient</A></CODE></B></DD>
<DD>Informs this client that a child was added to a topic in
which it was interested in.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#childAdded(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childAdded</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic to unsubscribe from<DD><CODE>child</CODE> - The child that was added</DL>
</DD>
</DL>
<HR>
<A NAME="childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)"><!-- --></A><H3>
childRemoved</H3>
<PRE>
public void <B>childRemoved</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic,
<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;child)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">ScribeClient</A></CODE></B></DD>
<DD>Informs this client that a child was removed from a topic in
which it was interested in.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#childRemoved(rice.p2p.scribe.Topic, rice.p2p.commonapi.NodeHandle)">childRemoved</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic to unsubscribe from<DD><CODE>child</CODE> - The child that was removed</DL>
</DD>
</DL>
<HR>
<A NAME="subscribeFailed(rice.p2p.scribe.Topic)"><!-- --></A><H3>
subscribeFailed</H3>
<PRE>
public void <B>subscribeFailed</B>(<A HREF="../../../rice/p2p/scribe/Topic.html" title="class in rice.p2p.scribe">Topic</A>&nbsp;topic)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#subscribeFailed(rice.p2p.scribe.Topic)">ScribeClient</A></CODE></B></DD>
<DD>Informs the client that a subscribe on the given topic failed
- the client should retry the subscribe or take appropriate
action.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html#subscribeFailed(rice.p2p.scribe.Topic)">subscribeFailed</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/scribe/ScribeClient.html" title="interface in rice.p2p.scribe">ScribeClient</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>topic</CODE> - The topic which the subscribe failed on</DL>
</DD>
</DL>
<HR>
<A NAME="forward(rice.p2p.commonapi.RouteMessage)"><!-- --></A><H3>
forward</H3>
<PRE>
public boolean <B>forward</B>(<A HREF="../../../rice/p2p/commonapi/RouteMessage.html" title="interface in rice.p2p.commonapi">RouteMessage</A>&nbsp;message)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/commonapi/Application.html#forward(rice.p2p.commonapi.RouteMessage)">Application</A></CODE></B></DD>
<DD>This method is invoked on applications when the underlying node
is about to forward the given message with the provided target to
the specified next hop. Applications can change the contents of
the message, specify a different nextHop (through re-routing), or
completely terminate the message.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/Application.html#forward(rice.p2p.commonapi.RouteMessage)">forward</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>message</CODE> - The message being sent, containing an internal message
along with a destination key and nodeHandle next hop.
<DT><B>Returns:</B><DD>Whether or not to forward the message further</DL>
</DD>
</DL>
<HR>
<A NAME="update(rice.p2p.commonapi.NodeHandle, boolean)"><!-- --></A><H3>
update</H3>
<PRE>
public void <B>update</B>(<A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>&nbsp;handle,
boolean&nbsp;joined)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../rice/p2p/commonapi/Application.html#update(rice.p2p.commonapi.NodeHandle, boolean)">Application</A></CODE></B></DD>
<DD>This method is invoked to inform the application that the given node
has either joined or left the neighbor set of the local node, as the set
would be returned by the neighborSet call.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../rice/p2p/commonapi/Application.html#update(rice.p2p.commonapi.NodeHandle, boolean)">update</A></CODE> in interface <CODE><A HREF="../../../rice/p2p/commonapi/Application.html" title="interface in rice.p2p.commonapi">Application</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handle</CODE> - The handle that has joined/left<DD><CODE>joined</CODE> - Whether the node has joined or left</DL>
</DD>
</DL>
<HR>
<A NAME="isRoot()"><!-- --></A><H3>
isRoot</H3>
<PRE>
public boolean <B>isRoot</B>()</PRE>
<DL>
<DD>Some passthrough accessors for the myScribe
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getParent()"><!-- --></A><H3>
getParent</H3>
<PRE>
public <A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A> <B>getParent</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getChildren()"><!-- --></A><H3>
getChildren</H3>
<PRE>
public <A HREF="../../../rice/p2p/commonapi/NodeHandle.html" title="class in rice.p2p.commonapi">NodeHandle</A>[] <B>getChildren</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</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/MyScribeClient.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;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../rice/tutorial/scribe/MyScribeContent.html" title="class in rice.tutorial.scribe"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?rice/tutorial/scribe/MyScribeClient.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MyScribeClient.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright &#169; 2001-2005 - Rice Pastry.</i>
</BODY>
</HTML>