org.mydm.search
Interface Search

All Known Implementing Classes:
AdvancedSearch, SimpleSearch

public interface Search

Main Search Interface. The SimpleSearch and Advanced search will implement this Interface. The performSearch Should run as a new thread and should notify the search results to the Listener Object. The Search query (XPATH) can be passed to the constructor.


Method Summary
 void addListener(SearchResListener srl)
          Adds the Listener to the set of listeners
 SearchResListener performSearch()
          Performs the search and returns a reference to SearchResListener object.
 void performSearch(SearchResListener slistener)
          Performs the search in a new thread.
 void removeListener(SearchResListener srl)
          Removed the listener from the set of listeners.
 boolean status()
          Gives the status of the search.
 void stop()
          Stops the Searching thread.
 

Method Detail

performSearch

public void performSearch(SearchResListener slistener)
                   throws MyDMException
Performs the search in a new thread. Search Results are notified to the listener object passed.

Parameters:
slistener - SearchResListener
Throws:
MyDMException

performSearch

public SearchResListener performSearch()
                                throws MyDMException
Performs the search and returns a reference to SearchResListener object.

Returns:
searchreslistener object
Throws:
MyDMException

addListener

public void addListener(SearchResListener srl)
Adds the Listener to the set of listeners

Parameters:
srl - SearchResListener

removeListener

public void removeListener(SearchResListener srl)
Removed the listener from the set of listeners.

Parameters:
srl -

status

public boolean status()
Gives the status of the search. returns true if the search thread is still running. returns falase if the search thread is not running.

Returns:
true or false.

stop

public void stop()
Stops the Searching thread.