|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.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(HashedKeyword keyhash,
UrlResource url)
Instantiate a new Gnutant by setting the query to be satisfied and the hash value to be searched. |
Method Summary | |
String |
getSpecies()
Returns the identifier of the "species" of this ant. |
void |
init(AntView view)
Initialize the InsertGnutant at the originating nest. |
void |
readExternal(ObjectInput in)
Describe readExternal method here. |
void |
run(AntView view)
This method encapsulate the computation performed by the ant. |
void |
writeExternal(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(HashedKeyword keyhash, UrlResource url)
Method Detail |
public 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(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
method here.
readExternal
in interface Externalizable
in
- an ObjectInput
value
IOException
- if an error occurs
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
method here.
writeExternal
in interface Externalizable
out
- an ObjectOutput
value
IOException
- if an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |