⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 peerconnection.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<DL><DD>Constructor for the PeerConnection object   WARNING: this constructor can  be used for simply testing against existing connection. This constructor  must NOT allocate any resources.<P><DT><B>Parameters:</B><DD><CODE>group</CODE> - group context<DD><CODE>peerid</CODE> - destination peerid<DD><CODE>leaseDuration</CODE> - connection lease duration im miliseconds<DD><CODE>incarnation</CODE> - Connection incarnation id</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setIncarnation(java.lang.String)"><!-- --></A><H3>setIncarnation</H3><PRE>public void <B>setIncarnation</B>(java.lang.String&nbsp;incarnation)</PRE><DL><DD>Sets the incarnation attribute of the PeerConnection object<P><DD><DL><DT><B>Parameters:</B><DD><CODE>incarnation</CODE> - The new incarnation value</DL></DD></DL><HR><A NAME="setLease(long)"><!-- --></A><H3>setLease</H3><PRE>public void <B>setLease</B>(long&nbsp;leaseDuration)</PRE><DL><DD>Sets the lease attribute of the PeerConnection object<P><DD><DL><DT><B>Parameters:</B><DD><CODE>leaseDuration</CODE> - The new lease value</DL></DD></DL><HR><A NAME="setPeer(net.jxta.id.ID)"><!-- --></A><H3>setPeer</H3><PRE>public void <B>setPeer</B>(<A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A>&nbsp;peer)</PRE><DL><DD>Sets the peer attribute of the PeerConnection object<P><DD><DL><DT><B>Parameters:</B><DD><CODE>peer</CODE> - The new peer value</DL></DD></DL><HR><A NAME="getIncarnation()"><!-- --></A><H3>getIncarnation</H3><PRE>public java.lang.String <B>getIncarnation</B>()</PRE><DL><DD>Gets the incarnation attribute of the PeerConnection object<P><DD><DL><DT><B>Returns:</B><DD>The incarnation value</DL></DD></DL><HR><A NAME="getLease()"><!-- --></A><H3>getLease</H3><PRE>public long <B>getLease</B>()</PRE><DL><DD>Get the lease<P><DD><DL><DT><B>Returns:</B><DD>The lease value</DL></DD></DL><HR><A NAME="getPeer()"><!-- --></A><H3>getPeer</H3><PRE>public <A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> <B>getPeer</B>()</PRE><DL><DD>Get the peer id<P><DD><DL><DT><B>Returns:</B><DD>The peer value</DL></DD></DL><HR><A NAME="getPeerName()"><!-- --></A><H3>getPeerName</H3><PRE>public java.lang.String <B>getPeerName</B>()</PRE><DL><DD>Get the peer name. If the symobolic name is available, use it,  otherwise returns the peer id.<P><DD><DL><DT><B>Returns:</B><DD>The peerName value</DL></DD></DL><HR><A NAME="isConnected()"><!-- --></A><H3>isConnected</H3><PRE>public boolean <B>isConnected</B>()</PRE><DL><DD>Test if the connection is up<P><DD><DL><DT><B>Returns:</B><DD>The connected value</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()</PRE><DL><DD>Close the connection. This operation must be idempotent.<P><DD><DL></DL></DD></DL><HR><A NAME="connect()"><!-- --></A><H3>connect</H3><PRE>public void <B>connect</B>()</PRE><DL><DD>Try to connect. This operation is idempotent.<P><DD><DL></DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(java.lang.Object&nbsp;obj)</PRE><DL><DD>performs PeerID comparison<P><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - Description of the Parameter<DT><B>Returns:</B><DD>true of both connections are destined for the same peer</DL></DD></DL><HR><A NAME="finalize()"><!-- --></A><H3>finalize</H3><PRE>public void <B>finalize</B>()</PRE><DL><DD>Just in case the code that allocated an instance of this object forgot to do "close".<P><DD><DL></DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns a hash code value for the destination peerid. This method is supported for the  benefit of hashtables such as those provided by java.util.Hashtable.<P><DD><DL><DT><B>Returns:</B><DD>a hash code value for the destination peerid</DL></DD></DL><HR><A NAME="sendMessage(net.jxta.endpoint.Message, java.lang.String, java.lang.String)"><!-- --></A><H3>sendMessage</H3><PRE>public void <B>sendMessage</B>(<A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A>&nbsp;message,                        java.lang.String&nbsp;svcName,                        java.lang.String&nbsp;svcParam)                 throws java.io.IOException</PRE><DL><DD>Creates a messenger to the destination peer, service/service param<P><DD><DL><DT><B>Parameters:</B><DD><CODE>message</CODE> - Message to send<DD><CODE>svcName</CODE> - Destination Service<DD><CODE>svcParam</CODE> - Service parameter<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if a getMessenger() to destination fails</DL></DD></DL><HR><A NAME="sendMessage(net.jxta.util.endpoint.WeakMessengerCache, net.jxta.endpoint.Message, java.lang.String, java.lang.String)"><!-- --></A><H3>sendMessage</H3><PRE>public void <B>sendMessage</B>(<A HREF="../../../../net/jxta/util/endpoint/WeakMessengerCache.html" title="class in net.jxta.util.endpoint">WeakMessengerCache</A>&nbsp;messengerCache,                        <A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A>&nbsp;message,                        java.lang.String&nbsp;svcName,                        java.lang.String&nbsp;svcParam)                 throws java.io.IOException</PRE><DL><DD>Creates a messenger to the destination peer, service/service param<P><DD><DL><DT><B>Parameters:</B><DD><CODE>messengerCache</CODE> - messengerCache<DD><CODE>message</CODE> - Message to send<DD><CODE>svcName</CODE> - Destination Service<DD><CODE>svcParam</CODE> - Service parameter<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - if a getMessenger() to destination fails</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=3 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/PeerConnection.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>JXTA J2SE</EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../net/jxta/impl/rendezvous/RdvGreeter.html" title="class in net.jxta.impl.rendezvous"><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>  &nbsp;&nbsp;<A HREF="PeerConnection.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<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;FIELD&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></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -