com.k_int.z3950.server.demo
Class DemoSearchable
java.lang.Object
|
+--com.k_int.z3950.server.demo.DemoSearchable
- All Implemented Interfaces:
- Searchable
- public class DemoSearchable
- extends java.lang.Object
- implements Searchable
A sample implementation of searchable that returns random numbers of hits
and random result records
|
Method Summary |
SearchTask |
createTask(IRQuery q,
java.lang.Object user_data)
Create a SearchTask. |
SearchTask |
createTask(IRQuery q,
java.lang.Object user_data,
java.util.Observer[] observers)
Create a SearchTask. |
void |
destroy()
destroy the searchable object. |
int |
getManagerType()
Provide information about the type of Searchable object this realisation is |
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DemoSearchable
public DemoSearchable()
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
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
getManagerType
public int getManagerType()
- Description copied from interface:
Searchable
- Provide information about the type of Searchable object this realisation is
- Specified by:
getManagerType in interface Searchable
- Following copied from interface:
com.k_int.IR.Searchable
- See Also:
Searchable.SPECIFIC_SOURCE,
Searchable.GROUP_COORDINATOR
createTask
public SearchTask createTask(IRQuery q,
java.lang.Object user_data)
- Description copied from interface:
Searchable
- Create a SearchTask. Evaluate the query with the Tasks evaluate method.
- Specified by:
createTask in interface Searchable
createTask
public SearchTask createTask(IRQuery q,
java.lang.Object user_data,
java.util.Observer[] observers)
- Description copied from interface:
Searchable
- Create a SearchTask. Evaluate the query with the Tasks evaluate method.
Any observers will be passwd to the SearchTask and will be notified of search events.
- Specified by:
createTask in interface Searchable
Copyright © 2001 Knowledge Integration Ltd. All Rights Reserved.