freenetant
Class FreenetAntFactory
java.lang.Object
|
+--freenetant.FreenetAntFactory
- All Implemented Interfaces:
- AntFactory, Clearable
- public class FreenetAntFactory
- extends java.lang.Object
- implements AntFactory
- Version:
- $Revision$
- Author:
- Andrea Piergallini, Luca Vagnozzi
Field Summary |
static java.lang.String |
COPY_PROB
String name of the parameter used to determine the copy probability
used by these ants. |
static java.lang.String |
FAKE_PROB
|
Method Summary |
void |
clear()
Restores the object to its initial state. |
Ant[] |
getAnts(RequestId rid,
java.lang.Object request,
NestId requestor)
Returns a freenet ant for a query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPY_PROB
public static final java.lang.String COPY_PROB
- String name of the parameter used to determine the copy probability
used by these ants.
FAKE_PROB
public static final java.lang.String FAKE_PROB
FreenetAntFactory
public FreenetAntFactory(Factory factory,
int copyProb,
int fakeProb)
- Constructor for the freenet ant. Set the factory and the copy
probability.
clear
public void clear()
- Restores the object to its initial state.
- Specified by:
clear
in interface Clearable
getAnts
public Ant[] getAnts(RequestId rid,
java.lang.Object request,
NestId requestor)
- Returns a freenet ant for a query. This ant will take care of
the research of a query string (hash value).
- Specified by:
getAnts
in interface AntFactory
- Following copied from interface:
anthill.AntFactory
- Parameters:
request
- the object containing the request to be satisfied