Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.k_int.test.z3950.BadServer
Class BadServerSearchable  view BadServerSearchable download BadServerSearchable.java

java.lang.Object
  extended bycom.k_int.test.z3950.BadServer.BadServerSearchable
All Implemented Interfaces:
com.k_int.IR.Scanable, com.k_int.IR.Searchable

public class BadServerSearchable
extends java.lang.Object
implements com.k_int.IR.Searchable, com.k_int.IR.Scanable

A sample implementation of searchable that returns random numbers of hits and random result records


Field Summary
private static LoggingContext cat
           
private  javax.naming.Context naming_context
           
private  java.util.Hashtable properties
           
 
Fields inherited from interface com.k_int.IR.Searchable
GROUP_COORDINATOR, SPECIFIC_SOURCE
 
Constructor Summary
BadServerSearchable()
           
 
Method Summary
 com.k_int.IR.SearchTask createTask(com.k_int.IR.IRQuery q, java.lang.Object user_data)
          Create a SearchTask.
 com.k_int.IR.SearchTask createTask(com.k_int.IR.IRQuery q, java.lang.Object user_data, java.util.Observer[] observers)
          Create a SearchTask.
 void destroy()
          destroy the searchable object.
 com.k_int.IR.ScanInformation doScan(com.k_int.IR.ScanRequestInfo req)
          doScan MUST return a vector of TermInformation
 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.
 void init(java.util.Properties p, javax.naming.Context naming_context)
           
 boolean isScanSupported()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

properties

private java.util.Hashtable properties

cat

private static LoggingContext cat

naming_context

private javax.naming.Context naming_context
Constructor Detail

BadServerSearchable

public BadServerSearchable()
Method Detail

init

public void init(java.util.Properties p)
Description copied from interface: com.k_int.IR.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. Create a new naming context for this object.

Specified by:
init in interface com.k_int.IR.Searchable

init

public void init(java.util.Properties p,
                 javax.naming.Context naming_context)

destroy

public void destroy()
Description copied from interface: com.k_int.IR.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 com.k_int.IR.Searchable

getManagerType

public int getManagerType()
Description copied from interface: com.k_int.IR.Searchable
Provide information about the type of Searchable object this realisation is

Specified by:
getManagerType in interface com.k_int.IR.Searchable

createTask

public com.k_int.IR.SearchTask createTask(com.k_int.IR.IRQuery q,
                                          java.lang.Object user_data)
Description copied from interface: com.k_int.IR.Searchable
Create a SearchTask. Evaluate the query with the Tasks evaluate method.

Specified by:
createTask in interface com.k_int.IR.Searchable

createTask

public com.k_int.IR.SearchTask createTask(com.k_int.IR.IRQuery q,
                                          java.lang.Object user_data,
                                          java.util.Observer[] observers)
Description copied from interface: com.k_int.IR.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 com.k_int.IR.Searchable

isScanSupported

public boolean isScanSupported()
Specified by:
isScanSupported in interface com.k_int.IR.Scanable

doScan

public com.k_int.IR.ScanInformation doScan(com.k_int.IR.ScanRequestInfo req)
Description copied from interface: com.k_int.IR.Scanable
doScan MUST return a vector of TermInformation

Specified by:
doScan in interface com.k_int.IR.Scanable