|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjade.core.Agent
gr.demokritos.iit.jinsect.distributed.MobileAgent
gr.demokritos.iit.jinsect.distributed.NGramDocumentComparatorAgent
public class NGramDocumentComparatorAgent
A mobile agent that manages the comparison between two documents. It has the ability to migrate and inform its dispatcher of its arrival. Then it performs any calculation it receives via agent messages.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class jade.core.Agent |
---|
jade.core.Agent.Interrupted |
Field Summary | |
---|---|
static int |
ACTIVE_STATE
|
static int |
CALC_STATE
|
static int |
FINISHED_STATE
|
static int |
INVALID_STATE
|
static int |
MIGRATE_STATE
|
protected double |
MigrationProbability
|
protected jade.core.AID |
ResultConsumer
|
protected java.lang.String |
sDocument1
|
protected java.lang.String |
sDocument2
|
static java.lang.String |
TERMINATION_MESSAGE
|
Fields inherited from class gr.demokritos.iit.jinsect.distributed.MobileAgent |
---|
CLONE_EVENT, CONTINUE_EVENT, EXIT, Locations, MOVE_EVENT, REFRESH_EVENT, STOP_EVENT |
Fields inherited from class jade.core.Agent |
---|
AP_ACTIVE, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_WAITING, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN |
Constructor Summary | |
---|---|
NGramDocumentComparatorAgent()
Creates a new instance of NGramDocumentComparatorAgent |
Method Summary | |
---|---|
protected void |
afterMove()
Updates dispatcher upon arrival to target container. |
protected void |
beforeMove()
Displays debug info before migration. |
jade.core.Location[] |
getActiveContainerList()
Returns an array of active locations. |
void |
setResult(SimilarityArray saResult,
java.lang.String sID)
Prepares and sends a calculated result. |
void |
setup()
Parses arguments and initializes migration. |
void |
takeDown()
Offers debug info for the termination of the agent. |
void |
updateLocations(java.util.Iterator iIter)
Updates the location list and schedules migrations. |
Methods inherited from class gr.demokritos.iit.jinsect.distributed.MobileAgent |
---|
afterLoad, afterReload, afterThaw, beforeFreeze, beforeReload |
Methods inherited from class jade.core.Agent |
---|
addBehaviour, afterClone, beforeClone, blockingReceive, blockingReceive, blockingReceive, blockingReceive, changeStateTo, clean, doActivate, doClone, doDelete, doMove, doSuspend, doTimeOut, doWait, doWait, doWake, getAgentState, getAID, getAMS, getArguments, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getProperty, getQueueSize, getState, here, join, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, receive, receive, removeBehaviour, restartLater, restore, restoreBufferedState, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setQueueSize, waitUntilStarted, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INVALID_STATE
public static final int ACTIVE_STATE
public static final int MIGRATE_STATE
public static final int CALC_STATE
public static final int FINISHED_STATE
public static final java.lang.String TERMINATION_MESSAGE
protected jade.core.AID ResultConsumer
protected java.lang.String sDocument1
protected java.lang.String sDocument2
protected double MigrationProbability
Constructor Detail |
---|
public NGramDocumentComparatorAgent()
Method Detail |
---|
public void setResult(SimilarityArray saResult, java.lang.String sID)
saResult
- The similarity array to return.sID
- The unique comparison identifier.public void setup()
setup
in class MobileAgent
protected void beforeMove()
beforeMove
in class MobileAgent
protected void afterMove()
afterMove
in class MobileAgent
public void takeDown()
takeDown
in class jade.core.Agent
public jade.core.Location[] getActiveContainerList()
public void updateLocations(java.util.Iterator iIter)
updateLocations
in class MobileAgent
iIter
- An iterator of candidate locations.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |