Name
EndpointFilterListener
Synopsis
Objects that implement this
interface can be registered with the endpoint service. When the
endpoint receives a message that contains a certain element, the
processIncomingMessage( )
method of the listener
will be called. The object that implements this interface is
registered with the endpoint service’s
addFilterListener( )
method, which allows you to
specify the element that you want to listen for.
The endpoint filter listener has the opportunity to modify the
message before it is processed further; the
processIncomingMessage( )
method returns the
modified message. After calling all of the filters, the endpoint
service will finish processing the message (calling all of the
registered EndpointListener
objects).
Note that this interface is not a
standard event listener: it does not extend the
EventListener
interface and does not receive an
EventObject
.
public interface EndpointFilterListener { // Public Instance Methods public abstract Message processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr); }
Passed To
EndpointService.{addFilterListener()
,
removeFilterListener()}
Get JXTA in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.