org.xnap.search
Class SearchController

java.lang.Object
  extended by org.xnap.search.SearchController
All Implemented Interfaces:
SearchHandler

public class SearchController
extends java.lang.Object
implements SearchHandler

Controls a search object. Groups search results.


Constructor Summary
SearchController(Search search, ListListener llResults, StatusListener slStatus)
           
 
Method Summary
 void addListListener(ListListener listener)
          listener is notified when a result is received, regardless of any filters.
 SearchFilter getFilter()
           
 int getResultCount()
           
 Search getSearch()
          Returns the search object that is controlled by this controller.
 java.lang.String getStatus()
           
 boolean isDone()
           
 void removeListListener(ListListener listener)
           
 void resultReceived(SearchResult result)
          Invoked when result is received.
 void setFilter(SearchFilter fiter)
           
 void start()
           
 void stateChanged(Search search)
          Invoked when the state of search changes.
 void stop()
          Cancels the controlled search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchController

public SearchController(Search search,
                        ListListener llResults,
                        StatusListener slStatus)
Method Detail

addListListener

public void addListListener(ListListener listener)
listener is notified when a result is received, regardless of any filters.


getFilter

public SearchFilter getFilter()

getResultCount

public int getResultCount()

getSearch

public Search getSearch()
Returns the search object that is controlled by this controller.


getStatus

public java.lang.String getStatus()

isDone

public boolean isDone()

removeListListener

public void removeListListener(ListListener listener)
See Also:
addListListener(ListListener)

resultReceived

public void resultReceived(SearchResult result)
Description copied from interface: SearchHandler
Invoked when result is received.

Specified by:
resultReceived in interface SearchHandler

setFilter

public void setFilter(SearchFilter fiter)

stateChanged

public void stateChanged(Search search)
Description copied from interface: SearchHandler
Invoked when the state of search changes.

Specified by:
stateChanged in interface SearchHandler

start

public void start()

stop

public void stop()
Cancels the controlled search.



Copyright © 2001-2005 XNap Team. All Rights Reserved.