📄 wirepipe.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><TITLE>WirePipe (Project JXTA J2SE)</TITLE><META NAME="keywords" CONTENT="net.jxta.impl.pipe.WirePipe class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="WirePipe (Project JXTA J2SE)";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 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/WirePipe.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><a href='http://www.jxta.org' target='_blank'>Project JXTA</a></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../net/jxta/impl/pipe/WireHeader.html" title="class in net.jxta.impl.pipe"><B>PREV CLASS</B></A> <A HREF="../../../../net/jxta/impl/pipe/WirePipeImpl.html" title="class in net.jxta.impl.pipe"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="WirePipe.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">net.jxta.impl.pipe</FONT><BR>Class WirePipe</H2><PRE>java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>net.jxta.impl.pipe.WirePipe</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../net/jxta/endpoint/EndpointListener.html" title="interface in net.jxta.endpoint">EndpointListener</A>, <A HREF="../../../../net/jxta/pipe/InputPipe.html" title="interface in net.jxta.pipe">InputPipe</A>, <A HREF="../../../../net/jxta/impl/pipe/PipeRegistrar.html" title="interface in net.jxta.impl.pipe">PipeRegistrar</A></DD></DL><HR><DL><DT>public class <B>WirePipe</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../net/jxta/endpoint/EndpointListener.html" title="interface in net.jxta.endpoint">EndpointListener</A>, <A HREF="../../../../net/jxta/pipe/InputPipe.html" title="interface in net.jxta.pipe">InputPipe</A>, <A HREF="../../../../net/jxta/impl/pipe/PipeRegistrar.html" title="interface in net.jxta.impl.pipe">PipeRegistrar</A></DL><P>This class implements the JXTA-WIRE pipe.<P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#DefaultTTL">DefaultTTL</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"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#WirePipe(net.jxta.peergroup.PeerGroup, net.jxta.impl.pipe.PipeResolver, net.jxta.impl.pipe.WirePipeImpl, net.jxta.protocol.PipeAdvertisement)">WirePipe</A></B>(<A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> g, <A HREF="../../../../net/jxta/impl/pipe/PipeResolver.html" title="class in net.jxta.impl.pipe">PipeResolver</A> pipeResolver, <A HREF="../../../../net/jxta/impl/pipe/WirePipeImpl.html" title="class in net.jxta.impl.pipe">WirePipeImpl</A> pipeService, <A HREF="../../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> adv)</CODE><BR> Constructor</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"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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="../../../../net/jxta/impl/pipe/WirePipe.html#close()">close</A></B>()</CODE><BR> Close the pipe. No additional messages will be received on this pipe.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#createMsgId()">createMsgId</A></B>()</CODE><BR> Create a unique (mostly) identifier for this message</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="../../../../net/jxta/impl/pipe/WirePipe.html#finalize()">finalize</A></B>()</CODE><BR> <p/>Closes the pipe.</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="../../../../net/jxta/impl/pipe/WirePipe.html#forget(net.jxta.pipe.InputPipe)">forget</A></B>(<A HREF="../../../../net/jxta/pipe/InputPipe.html" title="interface in net.jxta.pipe">InputPipe</A> wireinputpipe)</CODE><BR> This peer is no longer listening on the specified pipe.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#getAdvertisement()">getAdvertisement</A></B>()</CODE><BR> Gets the pipe advertisement</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#getName()">getName</A></B>()</CODE><BR> Gets the pipe name</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#getPipeID()">getPipeID</A></B>()</CODE><BR> Gets the pipe id</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#getType()">getType</A></B>()</CODE><BR> Gets the pipe type</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#poll(int)">poll</A></B>(int timeout)</CODE><BR> Poll for a message from the pipe. If there is no message available then wait the specified amount of time. if timeout is zero then wait indefinitely.</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="../../../../net/jxta/impl/pipe/WirePipe.html#processIncomingMessage(net.jxta.endpoint.Message, net.jxta.endpoint.EndpointAddress, net.jxta.endpoint.EndpointAddress)">processIncomingMessage</A></B>(<A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> message, <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> srcAddr, <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> dstAddr)</CODE><BR> This method is invoked by the EndpointService for each incoming message which is addressed to this listener.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#processIncomingMessage(net.jxta.endpoint.Message, net.jxta.impl.pipe.WireHeader, net.jxta.endpoint.EndpointAddress, net.jxta.endpoint.EndpointAddress)">processIncomingMessage</A></B>(<A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> message, <A HREF="../../../../net/jxta/impl/pipe/WireHeader.html" title="class in net.jxta.impl.pipe">WireHeader</A> header, <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> srcAddr, <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> dstAddr)</CODE><BR> local version with the wire header already parsed. </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="../../../../net/jxta/impl/pipe/WirePipe.html#register(net.jxta.pipe.InputPipe)">register</A></B>(<A HREF="../../../../net/jxta/pipe/InputPipe.html" title="interface in net.jxta.pipe">InputPipe</A> wireinputpipe)</CODE><BR> Register that this peer is an InputPipe for the specified Pipe ID.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#repropagate(net.jxta.endpoint.Message, net.jxta.impl.pipe.WireHeader)">repropagate</A></B>(<A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> message, <A HREF="../../../../net/jxta/impl/pipe/WireHeader.html" title="class in net.jxta.impl.pipe">WireHeader</A> header)</CODE><BR> Repropagate a message</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#sendMessage(net.jxta.endpoint.Message, java.util.Set)">sendMessage</A></B>(<A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> msg, java.util.Set peers)</CODE><BR> Send the message</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/pipe/WirePipe.html#waitForMessage()">waitForMessage</A></B>()</CODE><BR> wait for a message to be received</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"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, 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"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="DefaultTTL"><!-- --></A><H3>DefaultTTL</H3><PRE>static final int <B>DefaultTTL</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#net.jxta.impl.pipe.WirePipe.DefaultTTL">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="WirePipe(net.jxta.peergroup.PeerGroup, net.jxta.impl.pipe.PipeResolver, net.jxta.impl.pipe.WirePipeImpl, net.jxta.protocol.PipeAdvertisement)"><!-- --></A><H3>WirePipe</H3><PRE>public <B>WirePipe</B>(<A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> g, <A HREF="../../../../net/jxta/impl/pipe/PipeResolver.html" title="class in net.jxta.impl.pipe">PipeResolver</A> pipeResolver, <A HREF="../../../../net/jxta/impl/pipe/WirePipeImpl.html" title="class in net.jxta.impl.pipe">WirePipeImpl</A> pipeService, <A HREF="../../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> adv)</PRE><DL><DD>Constructor<P><DT><B>Parameters:</B><DD><CODE>g</CODE> - The Group associated with this service<DD><CODE>pipeResolver</CODE> - the associated pipe resolver<DD><CODE>pipeService</CODE> - The pipe service associated with this pipe<DD><CODE>adv</CODE> - pipe advertisement</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -