📄 jxtasocket.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#JxtaSocket()">JxtaSocket</A></B>()</CODE><BR> Constructor for the JxtaSocket, this constructor does not establish a connection use this constructor when altering the default parameters, and options of the socket by default connections are unreliable, and the default timeout is 60 seconds to alter a connection a call to create(true) changes the connectin to a reliable one.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected </CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#JxtaSocket(net.jxta.peergroup.PeerGroup, net.jxta.endpoint.Messenger, net.jxta.protocol.PipeAdvertisement, boolean)">JxtaSocket</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/endpoint/Messenger.html" title="interface in net.jxta.endpoint">Messenger</A> msgr, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipe, boolean isStream)</CODE><BR> Constructor for the JxtaSocket, this constructor does not establish a connection use this constructor when altering the default parameters, and options of the socket by default connections are unreliable, and the default timeout is 60 seconds to alter a connection a call to create(true) changes the connectin to a reliable one.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#JxtaSocket(net.jxta.peergroup.PeerGroup, net.jxta.peer.PeerID, net.jxta.protocol.PipeAdvertisement, int)">JxtaSocket</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> peerid, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd, int timeout)</CODE><BR> Create a JxtaSocket to any peer listening on pipeAdv this attempts establish a connection to specified pipe within a context of group and within timeout specified in milliseconds</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#JxtaSocket(net.jxta.peergroup.PeerGroup, net.jxta.peer.PeerID, net.jxta.protocol.PipeAdvertisement, int, boolean)">JxtaSocket</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> peerid, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd, int timeout, boolean stream)</CODE><BR> Create a JxtaSocket to any peer listening on pipeAdv this attempts establish a connection to specified pipe within a context of group and within timeout specified in milliseconds</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#JxtaSocket(net.jxta.peergroup.PeerGroup, net.jxta.protocol.PipeAdvertisement)">JxtaSocket</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd)</CODE><BR> Create a JxtaSocket to any peer listening on pipeAdv</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> </CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#JxtaSocket(net.jxta.peergroup.PeerGroup, net.jxta.protocol.PipeAdvertisement, int)">JxtaSocket</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd, int timeout)</CODE><BR> Create a JxtaSocket to any peer listening on pipeAdv this attempts establish a connection to specified pipe within the context of the specified group within timeout specified in milliseconds</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>protected int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#available()">available</A></B>()</CODE><BR> Performs on behalf of JxtaSocketInputStream.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#checkCred(net.jxta.document.StructuredDocument)">checkCred</A></B>(<A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A> cred)</CODE><BR> Check the validity of a credential it is not implemented due to lack of meaningful default membership service. it will be implemented as soon as one is available.</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/socket/JxtaSocket.html#close()">close</A></B>()</CODE><BR> Closes this socket.</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/socket/JxtaSocket.html#closeCommon()">closeCommon</A></B>()</CODE><BR> In stream mode, closes everything but the input stream. closeFromRemote() leaves it open until EOF is reached. </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/socket/JxtaSocket.html#closeFromRemote()">closeFromRemote</A></B>()</CODE><BR> This is called when closure is initiated on the remote side. </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/socket/JxtaSocket.html#connect(net.jxta.peergroup.PeerGroup, net.jxta.peer.PeerID, net.jxta.protocol.PipeAdvertisement, int)">connect</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/peer/PeerID.html" title="class in net.jxta.peer">PeerID</A> peerid, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd, int timeout)</CODE><BR> Connects to a remote JxtaSocket on a specific peer within a timeout specified in milliseconds</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/socket/JxtaSocket.html#connect(net.jxta.peergroup.PeerGroup, net.jxta.protocol.PipeAdvertisement)">connect</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd)</CODE><BR> Connects to a remote JxtaSocket on any peer within the default timeout of 60 seconds</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/socket/JxtaSocket.html#connect(net.jxta.peergroup.PeerGroup, net.jxta.protocol.PipeAdvertisement, int)">connect</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd, int timeout)</CODE><BR> Connects to a remote JxtaSocket on any peer within a timeout specified in milliseconds</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/socket/JxtaSocket.html#create(boolean)">create</A></B>(boolean stream)</CODE><BR> Creates either a stream or a datagram socket. default is a datagram</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <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/socket/JxtaSocket.html#createOpenMessage(net.jxta.peergroup.PeerGroup, net.jxta.protocol.PipeAdvertisement)">createOpenMessage</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAd)</CODE><BR> Create a connection request message</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static <A HREF="../../../net/jxta/document/StructuredDocument.html" title="interface in net.jxta.document">StructuredDocument</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#getCredDoc(net.jxta.peergroup.PeerGroup)">getCredDoc</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group)</CODE><BR> obtain the cred doc from the group object</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.InputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#getInputStream()">getInputStream</A></B>()</CODE><BR> Returns an input stream for this socket.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.io.OutputStream</CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#getOutputStream()">getOutputStream</A></B>()</CODE><BR> Returns an output stream for this socket.</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="../../../net/jxta/socket/JxtaSocket.html#getOutputStreamBufferSize()">getOutputStreamBufferSize</A></B>()</CODE><BR> Returns the OutputStream buffer size</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="../../../net/jxta/socket/JxtaSocket.html#getSoTimeout()">getSoTimeout</A></B>()</CODE><BR> Gets the Timeout attribute of the JxtaServerSocket object</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="../../../net/jxta/socket/JxtaSocket.html#getWindowSize()">getWindowSize</A></B>()</CODE><BR> When in reliable mode, gets the Reliable library window size</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/socket/JxtaSocket.html#isBound()">isBound</A></B>()</CODE><BR> Returns the binding state of the JxtaServerSocket.</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/socket/JxtaSocket.html#isClosed()">isClosed</A></B>()</CODE><BR> Returns the closed state of the JxtaServerSocket.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static <A HREF="../../../net/jxta/endpoint/Messenger.html" title="interface in net.jxta.endpoint">Messenger</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../net/jxta/socket/JxtaSocket.html#lightweightOutputPipe(net.jxta.peergroup.PeerGroup, net.jxta.protocol.PipeAdvertisement, net.jxta.protocol.PeerAdvertisement)">lightweightOutputPipe</A></B>(<A HREF="../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> group, <A HREF="../../../net/jxta/protocol/PipeAdvertisement.html" title="class in net.jxta.protocol">PipeAdvertisement</A> pipeAdv, <A HREF="../../../net/jxta/protocol/PeerAdvertisement.html" title="class in net.jxta.protocol">PeerAdvertisement</A> peer)</CODE><BR> A lightweight output pipe constructor, note the return type Since all the info needed is available, there's no need for to use the pipe service to resolve the pipe we have all we need to construct a messenger.</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/socket/JxtaSocket.html#listen(int)">listen</A></B>(int backlog)</CODE><BR> Sets the maximum queue length for incoming connection indications (a request to connect) to the <code>count</code> argument. </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/socket/JxtaSocket.html#outputPipeEvent(net.jxta.pipe.OutputPipeEvent)">outputPipeEvent</A></B>(<A HREF="../../../net/jxta/pipe/OutputPipeEvent.html" title="class in net.jxta.pipe">OutputPipeEvent</A> event)</CODE><BR> the output pipe event</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/socket/JxtaSocket.html#pipeMsgEvent(net.jxta.pipe.PipeMsgEvent)">pipeMsgEvent</A></B>(<A HREF="../../../net/jxta/pipe/PipeMsgEvent.html" title="class in net.jxta.pipe">PipeMsgEvent</A> event)</CODE><BR> we got a message</TD></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="../../../net/jxta/socket/JxtaSocket.html#read()">read</A></B>()</CODE><BR> Performs on behalf of JxtaSocketInputStream.</TD></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="../../../net/jxta/socket/JxtaSocket.html#read(byte[], int, int)">read</A></B>(byte[] b, int off, int len)</CODE><BR> Performs on behalf of JxtaSocketInputStream.</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/socket/JxtaSocket.html#setInputPipe(net.jxta.pipe.InputPipe)">setInputPipe</A></B>(<A HREF="../../../net/jxta/pipe/InputPipe.html" title="interface in net.jxta.pipe">InputPipe</A> in)</CODE><BR> Sets the inputPipe attribute of the JxtaSocket object</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/socket/JxtaSocket.html#setOutputStreamBufferSize(int)">setOutputStreamBufferSize</A></B>(int size)</CODE><BR> Sets the OutputStream buffer size this operation is only valid prior to any call to getOutputStream</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/socket/JxtaSocket.html#setSoTimeout(int)">setSoTimeout</A></B>(int timeout)</CODE><BR> Sets the Timeout attribute of the JxtaServerSocket a timeout of 0 blocks forever, by default this Socket's timeout is set to 0</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/socket/JxtaSocket.html#setWindowSize(int)">setWindowSize</A></B>(int windowSize)</CODE><BR> When in reliable mode, sets the Reliable library window size</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -