Project JXTA

net.jxta.endpoint
Class ListenerAdaptor

java.lang.Object
  extended bynet.jxta.endpoint.ListenerAdaptor
All Implemented Interfaces:
Runnable

public class ListenerAdaptor
extends Object
implements Runnable


Constructor Summary
ListenerAdaptor(ThreadGroup threadGroup)
           
 
Method Summary
 void run()
           
 void shutdown()
           
 boolean watchMessage(OutgoingMessageEventListener listener, Message m)
          Select the given message and invoke the given listener when the message sending is complete.
 boolean watchMessenger(MessengerEventListener listener, Messenger m)
          Select the given messenger and invoke the given listener when the messenger is resolved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListenerAdaptor

public ListenerAdaptor(ThreadGroup threadGroup)
Method Detail

shutdown

public void shutdown()

watchMessage

public boolean watchMessage(OutgoingMessageEventListener listener,
                            Message m)
Select the given message and invoke the given listener when the message sending is complete.

Parameters:
listener - The listener to invoke. If null the resolution will take place, but obviously no listener will be invoked.
m - The message being sent.
Returns:
true if the message was registered succesfully or the listener is null. If true it is guaranteed that the listener will be invoked unless null. If false, it is guaranteed that the listener will not be invoked.

watchMessenger

public boolean watchMessenger(MessengerEventListener listener,
                              Messenger m)
Select the given messenger and invoke the given listener when the messenger is resolved.

Parameters:
listener - The listener to invoke. If null the resolution will take place, but obviously no listener will be invoked.
m - The messenger being resolved.
Returns:
true if the messenger was registered succesfully or the listener is null. If true it is garanteed that the listener will be invoked unless null. If false, it is guaranteed that the listener will not be invoked.

run

public void run()
Specified by:
run in interface Runnable

JXTA J2SE