📄 endpointserviceinterface.html
字号:
service name and service parameter specified in the destination address of the message.</li> <li>The service name matches exactly the service name from the message destination address and service parameter is null.</li> </ol></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/endpoint/EndpointServiceInterface.html#addListener(java.lang.String, net.jxta.endpoint.EndpointListener)">addListener</A></B>(java.lang.String address, <A HREF="../../../../net/jxta/endpoint/EndpointListener.html" title="interface in net.jxta.endpoint">EndpointListener</A> listener)</CODE><BR> Registers an incoming messages listener. <p/>Each incoming message addressed to the queue specified by the given address will be passed to the given listener. The address is usually formed by concatenating the the name of the invoking service and a parameter unique to that service accross all groups (the group ID is normally included for that purpose). <p/>For a message to match this address, it must have been sent through an EndpointMessenger obtained by providing an EndpointAddress constructed with matching serviceName and serviceParam (see newEndpointAddress and getMessenger), or by invoking propagate with matching serviceName and serviceParam. <p/>If a listener is already registered with the given address, an IllegalArgumentException is thrown.</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/endpoint/EndpointServiceInterface.html#addMessageTransport(net.jxta.endpoint.MessageTransport)">addMessageTransport</A></B>(<A HREF="../../../../net/jxta/endpoint/MessageTransport.html" title="interface in net.jxta.endpoint">MessageTransport</A> transpt)</CODE><BR> Adds the specified MessageTransport to this endpoint. A MessageTransport may only be added if there are no other equivalent MessageTransports available (as determined by <CODE>equals()</CODE>). <p/>The MessageTransport becomes usable by the endpoint service to send unicast messages and optionaly propagation and ping messages if it is a <A HREF="../../../../net/jxta/endpoint/MessageSender.html" title="interface in net.jxta.endpoint"><CODE>MessageSender</CODE></A>. The endpoint service becomes usable by this MessageTransport to handle incoming messages if it is a <A HREF="../../../../net/jxta/endpoint/MessageReceiver.html" title="interface in net.jxta.endpoint"><CODE>MessageReceiver</CODE></A>.</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/endpoint/EndpointServiceInterface.html#addMessengerEventListener(net.jxta.endpoint.MessengerEventListener, int)">addMessengerEventListener</A></B>(<A HREF="../../../../net/jxta/endpoint/MessengerEventListener.html" title="interface in net.jxta.endpoint">MessengerEventListener</A> listener, int prio)</CODE><BR> Adds the specified listener for all messenger creation.</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/endpoint/EndpointServiceInterface.html#addOutgoingMessageFilterListener(net.jxta.endpoint.MessageFilterListener, java.lang.String, java.lang.String)">addOutgoingMessageFilterListener</A></B>(<A HREF="../../../../net/jxta/endpoint/MessageFilterListener.html" title="interface in net.jxta.endpoint">MessageFilterListener</A> listener, java.lang.String namespace, java.lang.String name)</CODE><BR> Registers a message filter listener. Each message will be tested against the list of filters as part of its sending or receiving. <p/>The listener is invoked for a message when: <ul> <li>The message contains an element which matches exactly the values specified by namespace and name.</li> <li>The message contains an element who's namespace value matches exactly the specified namespace value and the specified name is null.</li> <li>The message contains an element who's names value matches exactly the specified name value and the specified namespace is null.</li> <li>The specified name value and the specified namespace are both null.</li> </ul></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/endpoint/EndpointServiceInterface.html#demux(net.jxta.endpoint.Message)">demux</A></B>(<A HREF="../../../../net/jxta/endpoint/Message.html" title="class in net.jxta.endpoint">Message</A> msg)</CODE><BR> Delivers the provided message to the correct listener as specified by the message's destination address.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Iterator</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/endpoint/EndpointServiceInterface.html#getAllMessageTransports()">getAllMessageTransports</A></B>()</CODE><BR> Get an iterator of the MessageTransports available to this EndpointService.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/endpoint/EndpointServiceInterface.html#getGroup()">getGroup</A></B>()</CODE><BR> Returns the group to which this EndpointService is attached.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/endpoint/EndpointServiceInterface.html#getImplAdvertisement()">getImplAdvertisement</A></B>()</CODE><BR> Returns the advertisment for this service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/service/Service.html" title="interface in net.jxta.service">Service</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/endpoint/EndpointServiceInterface.html#getInterface()">getInterface</A></B>()</CODE><BR> Service objects are not manipulated directly to protect usage of the service. A Service interface is returned to access the service methods. Sort of absurd but this is part of the API we're implementing. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/endpoint/MessageTransport.html" title="interface in net.jxta.endpoint">MessageTransport</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/endpoint/EndpointServiceInterface.html#getMessageTransport(java.lang.String)">getMessageTransport</A></B>(java.lang.String name)</CODE><BR> Get a MessageTransport by name</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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/impl/endpoint/EndpointServiceInterface.html#getMessenger(net.jxta.endpoint.EndpointAddress)">getMessenger</A></B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr)</CODE><BR> Builds and returns an Messager that may be used to send messages via this endpoint to the specified destination.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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/impl/endpoint/EndpointServiceInterface.html#getMessenger(net.jxta.endpoint.EndpointAddress, java.lang.Object)">getMessenger</A></B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr, java.lang.Object hint)</CODE><BR> Builds and returns an Messager that may be used to send messages via this endpoint to the specified destination.</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/endpoint/EndpointServiceInterface.html#getMessenger(net.jxta.endpoint.MessengerEventListener, net.jxta.endpoint.EndpointAddress, java.lang.Object)">getMessenger</A></B>(<A HREF="../../../../net/jxta/endpoint/MessengerEventListener.html" title="interface in net.jxta.endpoint">MessengerEventListener</A> listener, <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr, java.lang.Object hint)</CODE><BR> Asynchronously acquire a messenger for the specified address. The listener will be called when the messenger has been constructed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../net/jxta/endpoint/MessengerEventListener.html" title="interface in net.jxta.endpoint">MessengerEventListener</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../net/jxta/impl/endpoint/EndpointServiceInterface.html#getMessengerEventListener()">getMessengerEventListener</A></B>()</CODE><BR> Get the Messenger event listener</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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/impl/endpoint/EndpointServiceInterface.html#getMessengerQ(net.jxta.endpoint.EndpointAddress, java.lang.Object, boolean)">getMessengerQ</A></B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr, java.lang.Object hint, boolean check)</CODE><BR> </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/endpoint/EndpointServiceInterface.html#init(net.jxta.peergroup.PeerGroup, net.jxta.id.ID, net.jxta.document.Advertisement)">init</A></B>(<A HREF="../../../../net/jxta/peergroup/PeerGroup.html" title="interface in net.jxta.peergroup">PeerGroup</A> pg, <A HREF="../../../../net/jxta/id/ID.html" title="class in net.jxta.id">ID</A> id, <A HREF="../../../../net/jxta/document/Advertisement.html" title="class in net.jxta.document">Advertisement</A> ia)</CODE><BR> Initialize the module, passing it its peer group and advertisement. <p/>Note: when subclassing one of the existing PeerGroup implementations (which implement Module), it may not be recommended to overload the init method. See the documentation of the PeerGroup class being subclassed. <p/>FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <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/EndpointServiceInterface.html#newEndpointAddress(java.lang.String)">newEndpointAddress</A></B>(java.lang.String Uri)</CODE><BR> Builds an EndpointAddress out the the given URI string. The resulting EndpointAddress uniquely identifies a message listener at a given network address.</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/endpoint/EndpointServiceInterface.html#newMessage()">newMessage</A></B>()</CODE><BR> Returns a new Message object suitable for use with this endpoint service.</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/endpoint/EndpointServiceInterface.html#ping(net.jxta.endpoint.EndpointAddress)">ping</A></B>(<A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> addr)</CODE><BR> Verifies that the given address can be reached. The verification is performed by the endpoint protocol designated by the given address, as returned by the getProtocolName() method of this address. <p/>The method, and accuracy of the verification depends upon each endpoint protocol.</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/endpoint/EndpointServiceInterface.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> source, <A HREF="../../../../net/jxta/endpoint/EndpointAddress.html" title="class in net.jxta.endpoint">EndpointAddress</A> destination)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -