ants.gnutant
Class GnutantFactory

java.lang.Object
  |
  +--ants.gnutant.GnutantFactory
All Implemented Interfaces:
AntFactory, Clearable

public class GnutantFactory
extends Object
implements AntFactory

Version:
$Revision: 1.3 $
Author:
Alberto Montresor
, Hein Meling

Field Summary
 
Fields inherited from interface anthill.AntFactory
NAME
 
Constructor Summary
GnutantFactory(Factory factory, String name)
          Factory for creating Gnutant ant species.
 
Method Summary
 void clear()
          Restores the object to its initial state.
 Ant[] getAnts(RequestId rid, Object request, NestId requestor)
          Returns a set of ants for a query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GnutantFactory

public GnutantFactory(Factory factory,
                      String name)
Factory for creating Gnutant ant species.

Parameters:
factory - the factory to be used to read configuration arguments and to create other configurable objects
name - the name that is associated to this instance in the configuration file
Method Detail

clear

public void clear()
Restores the object to its initial state.

Specified by:
clear in interface Clearable

getAnts

public Ant[] getAnts(RequestId rid,
                     Object request,
                     NestId requestor)
Returns a set of ants for a query. Each ant will take care of the research of a distinct token of the query string.

Specified by:
getAnts in interface AntFactory
Parameters:
request - the object containing the request to be satisfied