com.k_int.hss
Class HeterogeneousSetOfSearchable

java.lang.Object
  |
  +--com.k_int.hss.HeterogeneousSetOfSearchable
All Implemented Interfaces:
Searchable

public class HeterogeneousSetOfSearchable
extends java.lang.Object
implements Searchable

HeterogeneousSetOfSearchable is a realisation of the com.k_int.IR.searchable interface that deals with collecting together a Heterogeneous group of objects all themselves implementing the Searchable interface. It is the responsiblilty of this class to distribute a query to each of the Searchable objects that might be identified by the hints parameter in the IRQuery object passed to the evaluateQuery method

Version:
$Id: HeterogeneousSetOfSearchable.java,v 1.12 2001/06/10 13:15:36 ianibbo Exp $
Author:
Ian Ibbotson
See Also:
Searchable, IRQuery

Fields inherited from interface com.k_int.IR.Searchable
GROUP_COORDINATOR, SPECIFIC_SOURCE
 
Constructor Summary
HeterogeneousSetOfSearchable()
           
 
Method Summary
 SearchTask createTask(IRQuery q, java.lang.Object user_info)
          Create a HSS task.
 SearchTask createTask(IRQuery q, java.lang.Object user_info, java.util.Observer[] observers)
          Create a HSS task.
 void destroy()
          destroy the searchable object.
protected  void finalize()
           
 int getManagerType()
          Returns information about the kind of Searchable object this is.
 void init(java.util.Properties p)
          Properties for this realisation of the Searchable interface.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeterogeneousSetOfSearchable

public HeterogeneousSetOfSearchable()
Method Detail

finalize

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

init

public void init(java.util.Properties p)
Properties for this realisation of the Searchable interface. For HeterogeneousSetOfSearchable, this must include the properties for the initial naming context in use. This will be used to find active Searchable objects. We also need the location of the repositories xml configuration file that tells us how to map generic collection id's into repositories and repository specific collections.
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()
Returns information about the kind of Searchable object this is. in this case, always return Searchable.GROUP_COORDINATOR to indicate that this realisation of searchable does not itself search a resource directly, instead, it's task is to coordinate several other Searchable objects and make them appear to be a single resource.
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_info)
Create a HSS task.
Specified by:
createTask in interface Searchable
See Also:
com.k_int.IR.Searchable#evaluateQuery(IRQuery, int, object), IRQuery

createTask

public SearchTask createTask(IRQuery q,
                             java.lang.Object user_info,
                             java.util.Observer[] observers)
Create a HSS task.
Specified by:
createTask in interface Searchable
See Also:
com.k_int.IR.Searchable#evaluateQuery(IRQuery, int, Object, Observer[]), IRQuery


Copyright © 2001 Knowledge Integration Ltd. All Rights Reserved.