Class AbstractSearchListener
package: net.jxta.myjxta.search
public abstract class AbstractSearchListener
Implements:
net.jxta.myjxta.search.SearchListener
Version:
$Id: AbstractSearchListener.java,v 1.1 2004/12/19 23:55:12 gonzo Exp $
Author:
james todd [gonzo at jxta dot org]
Field Summary
private List
   The list of JxtaNode instance discovered by this listener
 
Method Summary
public void
add(List nodes)
   Add a list of JxtaNode instances to the registered SearchListener.
 
public abstract void
   Add a new JxtaNode to the registered SearchListener
 
protected synchronized boolean
inCache(Object o)
   Check whether the indicated object exists in the cache of the current search.
 
public void
   Inform the registered listener that the search was terminated.
 
Field Detail
nodes
private List nodes = null
The list of JxtaNode instance discovered by this listener
Method Detail
add
public void add(List nodes)
Add a list of JxtaNode instances to the registered SearchListener. This implementation iterates through the list and calls add for each element.
Parameters:
node the list of JxtaNode instances to add

add
public abstract void add(JxtaNode node)
Add a new JxtaNode to the registered SearchListener
Parameters:
node the JxtaNode to add

inCache
protected synchronized boolean inCache(Object o)
Check whether the indicated object exists in the cache of the current search. If it does not exist in the current cache, it is added
Parameters:
o the object to check for
Return:
true if the object existed in the current cache, false otherwise

terminate
public void terminate()
Inform the registered listener that the search was terminated. This instance clears its cache, i.e. nodes.