anthill
Interface AntFactory
- All Superinterfaces:
- Clearable
- All Known Implementing Classes:
- GnutantFactory, GnutantFactory, GnutantFactory, MessorAntFactory, RandomAntFactory
- public interface AntFactory
- extends Clearable
Factory interface for creating ants. This interface is used by
nest to create ants which will be used to satisfy requests
in the Anthill network.
- Version:
- $Revision: 1.8 $
- Author:
- Alberto Montresor
Field Summary |
static String |
NAME
Identifier used in the configuration files |
Method Summary |
Ant[] |
getAnts(RequestId rid,
Object request,
NestId requestor)
Factory method for creating a set of ants aimed at satisfying
a particular request. |
NAME
public static final String NAME
- Identifier used in the configuration files
- See Also:
- Constant Field Values
getAnts
public Ant[] getAnts(RequestId rid,
Object request,
NestId requestor)
throws IllegalArgumentException
- Factory method for creating a set of ants aimed at satisfying
a particular request. Multiple ants created for the same
request are completely independent. The interpretation of the
request is left to ant implementations.
- Parameters:
request
- the object containing the request to be satisfied
- Throws:
IllegalArgumentException
- if the ants generated by this
factory are not capable to deal with the specified request.