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

📄 tcpmessenger.html

📁 jxta的api库
💻 HTML
📖 第 1 页 / 共 3 页
字号:
  Specifically:  <p/><code><pre>      messenger.close();      closed = messenger.isClosed();  </pre></code>  <p/><code>closed</code> may be <code>false</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpMessenger.html#getLogicalDestinationAddress()">getLogicalDestinationAddress</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the logical destination of this messenger. This may be a  different address than is returned by  <A HREF="../../../../../net/jxta/endpoint/EndpointMessenger.html#getDestinationAddress()"><CODE>getDestinationAddress</CODE></A> and refers to  the entity which is located at the destination address.  <p/>By analogy, a telephone number would be the destination address, and  the owner of that telephone number would be the logical destination.  Each logical destination may be known by one or more destination  addresses. <p/>By default the logical destination is the same as the destination.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>(package private) &nbsp;<A HREF="../../../../../net/jxta/impl/endpoint/transportMeter/TransportBindingMeter.html" title="class in net.jxta.impl.endpoint.transportMeter">TransportBindingMeter</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpMessenger.html#getTransportBindingMeter()">getTransportBindingMeter</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="../../../../../net/jxta/impl/endpoint/tcp/TcpMessenger.html#isClosed()">isClosed</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this messenger is closed and no longer   accepting messages to be sent. The messenger should be discarded.</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="../../../../../net/jxta/impl/endpoint/tcp/TcpMessenger.html#isIdle()">isIdle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Since we probe the connection status, we'll keep a messenger as long as the connection is active, even if only on the incoming side. </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="../../../../../net/jxta/impl/endpoint/tcp/TcpMessenger.html#sendMessage(net.jxta.endpoint.Message, java.lang.String, java.lang.String)">sendMessage</A></B>(<A HREF="../../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A>&nbsp;message,            java.lang.String&nbsp;service,            java.lang.String&nbsp;serviceParam)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sends a message to the destination</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpMessenger.html#start()">start</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the underlying connection receive thread if any.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_net.jxta.impl.endpoint.BlockingMessenger"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.impl.endpoint.<A HREF="../../../../../net/jxta/impl/endpoint/BlockingMessenger.html" title="class in net.jxta.impl.endpoint">BlockingMessenger</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../net/jxta/impl/endpoint/BlockingMessenger.html#isSynchronous()">isSynchronous</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BlockingMessenger.html#sendMessage(net.jxta.endpoint.Message, java.lang.String, java.lang.String, net.jxta.endpoint.OutgoingMessageEventListener)">sendMessage</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_net.jxta.impl.endpoint.BasicMessenger"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class net.jxta.impl.endpoint.<A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html" title="class in net.jxta.impl.endpoint">BasicMessenger</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#addPropertyChangeListener(java.beans.PropertyChangeListener)">addPropertyChangeListener</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#getDestAddressToUse(java.lang.String, java.lang.String)">getDestAddressToUse</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#getDestinationAddress()">getDestinationAddress</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#getDestinationAddressObject()">getDestinationAddressObject</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#removePropertyChangeListener(java.beans.PropertyChangeListener)">removePropertyChangeListener</A>, <A HREF="../../../../../net/jxta/impl/endpoint/BasicMessenger.html#sendMessage(net.jxta.endpoint.Message)">sendMessage</A></CODE></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"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_net.jxta.endpoint.Messenger"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface net.jxta.endpoint.<A HREF="../../../../../net/jxta/endpoint/Messenger.html" title="interface in net.jxta.endpoint">Messenger</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../net/jxta/endpoint/Messenger.html#hashCode()">hashCode</A></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"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="conn"><!-- --></A><H3>conn</H3><PRE>volatile <A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpConnection.html" title="class in net.jxta.impl.endpoint.tcp">TcpConnection</A> <B>conn</B></PRE><DL><DD>The connection<P><DL></DL></DL><HR><A NAME="incoming"><!-- --></A><H3>incoming</H3><PRE>boolean <B>incoming</B></PRE><DL><DD>If this is an incoming connection we must not close it when this messenger disapears. It has many reasons to disappear while the connection must keep receiving messages. This is causing some problems for incoming messengers that are managed by some entity, such as the router or the relay. These two do call close explicitly when they discard a messenger, and their intent is truely to nuke the connection. So basically we need to distinguish between incoming messengers that are abandonned without closing (for these we must protect the input side because that's the only reason for the connection being there) and incoming messengers that are explicitly closed (in which case we must let the entire connection be closed).<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"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="TcpMessenger(net.jxta.endpoint.EndpointAddress, net.jxta.impl.endpoint.tcp.TcpConnection, net.jxta.impl.endpoint.tcp.TcpTransport)"><!-- --></A><H3>TcpMessenger</H3><PRE><B>TcpMessenger</B>(<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;destaddr,             <A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpConnection.html" title="class in net.jxta.impl.endpoint.tcp">TcpConnection</A>&nbsp;conn,             <A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpTransport.html" title="class in net.jxta.impl.endpoint.tcp">TcpTransport</A>&nbsp;p)       throws java.io.IOException</PRE><DL><DD>Create a new TcpNonBlockingMessenger for the specified address.<P><DT><B>Parameters:</B><DD><CODE>destaddr</CODE> - the destination of the messenger<DD><CODE>p</CODE> - the tcp MessageSender we are working for.</DL><HR><A NAME="TcpMessenger(net.jxta.endpoint.EndpointAddress, net.jxta.impl.endpoint.tcp.TcpTransport)"><!-- --></A><H3>TcpMessenger</H3><PRE><B>TcpMessenger</B>(<A HREF="../../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A>&nbsp;destaddr,             <A HREF="../../../../../net/jxta/impl/endpoint/tcp/TcpTransport.html" title="class in net.jxta.impl.endpoint.tcp">TcpTransport</A>&nbsp;p)       throws java.io.IOException</PRE><DL><DD>Create a new TcpNonBlockingMessenger for the specified address.<P><DT><B>Parameters:</B><DD><CODE>destaddr</CODE> - the destination of the messenger<DD><CODE>p</CODE> - the tcp MessageSender we are working for.</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="start()"><!-- --></A><H3>start</H3><PRE>

⌨️ 快捷键说明

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