com.k_int.IR
Class DefaultSearchable

java.lang.Object
  |
  +--com.k_int.IR.DefaultSearchable
All Implemented Interfaces:
Searchable

public abstract class DefaultSearchable
extends java.lang.Object
implements Searchable

DefaultSearchable : A default implementation of the searchable interface that contains reusable code for the event notification framework, leaving the developer just to override the evaluate query and other abstract functons.


Field Summary
protected  java.util.Properties properties
           
 
Fields inherited from interface com.k_int.IR.Searchable
GROUP_COORDINATOR, SPECIFIC_SOURCE
 
Constructor Summary
DefaultSearchable()
           
 
Method Summary
 void destroy()
          destroy the searchable object.
 SearchTask evaluateQuery(IRQuery q, int wait_for, java.lang.Object user_data)
          Backwards compat.
abstract  SearchTask evaluateQuery(IRQuery q, int wait_for, java.lang.Object user_data, java.util.Observer[] observers)
          evaluateQuery: Take a query and create a search task that tracks the evaluation of that query.
protected  void finalize()
           
abstract  int getManagerType()
          Developers must override this function, to indicate the type of Searchable object.
 java.lang.String getProperty(java.lang.String propname)
           
 void init(java.util.Properties p)
          Init and Set any properties needed for an instance of Searchable.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.k_int.IR.Searchable
createTask, createTask
 

Field Detail

properties

protected java.util.Properties properties
Constructor Detail

DefaultSearchable

public DefaultSearchable()
Method Detail

init

public void init(java.util.Properties p)
Description copied from interface: Searchable
Init and Set any properties needed for an instance of Searchable. Often different realisations will require different parameters to be avaialable, for example ServerHost and ServerPort or JDBCPoolName
Specified by:
init in interface Searchable

getProperty

public java.lang.String getProperty(java.lang.String propname)

destroy

public void destroy()
Description copied from interface: Searchable
destroy the searchable object. Shut down the searchable object entirely. Release all held resources, make the object ready for GC. Try to release in here instead of on finalize.
Specified by:
destroy in interface Searchable

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object

getManagerType

public abstract int getManagerType()
Developers must override this function, to indicate the type of Searchable object.
Specified by:
getManagerType in interface Searchable
Following copied from interface: com.k_int.IR.Searchable
See Also:
Searchable.SPECIFIC_SOURCE, Searchable.GROUP_COORDINATOR

evaluateQuery

public SearchTask evaluateQuery(IRQuery q,
                                int wait_for,
                                java.lang.Object user_data)
                         throws SearchException
Backwards compat. evaluate query implementation

evaluateQuery

public abstract SearchTask evaluateQuery(IRQuery q,
                                         int wait_for,
                                         java.lang.Object user_data,
                                         java.util.Observer[] observers)
                                  throws SearchException
evaluateQuery: Take a query and create a search task that tracks the evaluation of that query. Your implementation MUST add the created search task to the protected active_searches hashtable member so the lookupTask can retrieve the task later on. SearchTask is also an abstract class and you will need to return an XXXSearchTask that knows how to interact with your searchable object.


Copyright © 2001 Knowledge Integration Ltd. All Rights Reserved.