|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnutant.Insant
Ant implementation for inserting a document into the anthill network. An insertion involves a user make a document available in her upload repository and sending out a number of ants to make the anthill network aware of the document. The user must supply a couple of keywords that describes the document, and this will generate one ant for each supplied keyword. Each of these ants are routed along a single trail, leaving information about the document at each nest along the trail. Routing will follow the lexicographical closeness of the keywords. The Insant is of the Gnutant species.
Constructor Summary | |
Insant()
Default constructor for externalization. |
|
Insant(KeyHash keyhash,
UrlResource url)
Instantiate a new Gnutant by setting the query to be satisfied and the hash value to be searched. |
Method Summary | |
java.lang.String |
getSpecies()
Returns the identifier of the "species" of this ant. |
void |
init(AntView view)
Initialize the InsertGnutant at the originating nest. |
void |
readExternal(java.io.ObjectInput in)
Describe readExternal method here. |
void |
run(AntView view)
This method encapsulate the computation performed by the ant. |
void |
writeExternal(java.io.ObjectOutput out)
Describe writeExternal method here. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Insant()
public Insant(KeyHash keyhash, UrlResource url)
Method Detail |
public java.lang.String getSpecies()
Ant
getSpecies
in interface Ant
public void init(AntView view)
init
in interface Ant
view
- an AntView
valuepublic void run(AntView view)
run
in interface Ant
view
- reference to the AntView object which
constitutes the controlled environment of the antpublic void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
method here.readExternal
in interface java.io.Externalizable
in
- an ObjectInput
valuejava.io.IOException
- if an error occurspublic void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
method here.writeExternal
in interface java.io.Externalizable
out
- an ObjectOutput
valuejava.io.IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |