fipaos.agent.task
Class DFSearchTask

java.lang.Object
  |
  +--fipaos.agent.task.Task
        |
        +--fipaos.agent.task.DFSearchTask

public class DFSearchTask
extends Task

This task class handles agent searches of DFs.


Fields inherited from class fipaos.agent.task.Task
_children, _lock, _owner, _tm
 
Constructor Summary
DFSearchTask(DFAgentDescription desc)
          Constructs the DF search task object which will perform a search using the given description
DFSearchTask(DFAgentDescription df_desc, boolean federated)
          Searches the local platform DF for any agents matching the specified DF description.
DFSearchTask(DFAgentDescription df_desc, SearchConstraints constraints)
          Searches the local platform DF for any agents matching the specified DF description using the specified search constraint.
DFSearchTask(java.lang.String df, DFAgentDescription df_desc, boolean federated)
          Searches the specified DF for any agents matching the specified DF description.
DFSearchTask(java.lang.String df, DFAgentDescription df_desc, SearchConstraints constraints, boolean federated)
          Searches the specified DF for any agents matching the specified DF description using the specified search contraint.
 
Method Summary
 void handleAgree(Conversation conv)
          Handles incoming agree messages.
 void handleFailure(Conversation conv)
          Handles incoming failure messages.
 void handleInform(Conversation conv)
          Handles incoming inform messages.
 void handleNotUnderstood(Conversation conv)
          Handles incoming not-understood messages.
 void handleRefuse(Conversation conv)
          Handles incoming refuse messages.
 boolean searchDF(DFAgentDescription df_desc)
          Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.
 boolean searchDF(DFAgentDescription df_desc, boolean federated)
          Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.
 boolean searchDF(DFAgentDescription df_desc, SearchConstraints constraint)
          Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.
 boolean searchDF(java.lang.String df, DFAgentDescription df_desc, boolean federated)
          Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.
 boolean searchDF(java.lang.String df, DFAgentDescription df_desc, SearchConstraints constraints, boolean federated)
          Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.
protected  void startTask()
          Invoked when the task has started
 
Methods inherited from class fipaos.agent.task.Task
DFSearchResults, done, done, doneDFSearchTask, errorDFSearchTask, forward, forward, getContext, getNewConversation, getState, handleAcceptProposal, handleCfp, handleConfirm, handleDisconfirm, handleInformIf, handleInformRef, handleLateMessage, handleOther, handlePropagate, handlePropose, handleProxy, handleQueryIf, handleQueryRef, handleRejectProposal, handleRequest, handleRequestWhen, handleRequestWhenever, handleSubscribe, handleUndeliverableMessage, newTask, newTask, newTask, newTask, newTask, newTask, newTask, newTask, notify, notifyDone, notifyError, notifyMessageFailure, notifyMessageForEndedConversation, notifyTimeout, sendNotUnderstood, setContext, timeoutDFSearchTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFSearchTask

public DFSearchTask(DFAgentDescription desc)
Constructs the DF search task object which will perform a search using the given description
Parameters:
desc - Description of the Agent to search for

DFSearchTask

public DFSearchTask(DFAgentDescription df_desc,
                    SearchConstraints constraints)
Searches the local platform DF for any agents matching the specified DF description using the specified search constraint. This method will use the following default search parameters:
Parameters:
df_desc - The DF description to search for
constraint - The search constraint

DFSearchTask

public DFSearchTask(DFAgentDescription df_desc,
                    boolean federated)
Searches the local platform DF for any agents matching the specified DF description. The search is optionally federated across other DFs. This method will use the following default search parameters:
Parameters:
df_desc - The DF description to search for
federated - Flag to signal whether this search should be federated or not

DFSearchTask

public DFSearchTask(java.lang.String df,
                    DFAgentDescription df_desc,
                    boolean federated)
Searches the specified DF for any agents matching the specified DF description. The search is optionally federated across other DFs. This method will use the following default search parameters:
Parameters:
df - The DF to search
df_desc - The DF description to search for
federated - Flag to signal whether this search should be federated or not

DFSearchTask

public DFSearchTask(java.lang.String df,
                    DFAgentDescription df_desc,
                    SearchConstraints constraints,
                    boolean federated)
Searches the specified DF for any agents matching the specified DF description using the specified search contraint. The search is optionally federated across other DFs.
Parameters:
df - The DF to search
df_desc - The DF description to search for
constraint - The search constraint
federated - Flag to signal whether this search should be federated or not
Method Detail

startTask

protected void startTask()
Invoked when the task has started
Overrides:
startTask in class Task

handleNotUnderstood

public void handleNotUnderstood(Conversation conv)
Handles incoming not-understood messages. An empty array of DF results is returned to the calling task.
Overrides:
handleNotUnderstood in class Task
Parameters:
conv - The conversation containint the incoming message

handleRefuse

public void handleRefuse(Conversation conv)
Handles incoming refuse messages. An empty array of DF results is returned to the calling task.
Overrides:
handleRefuse in class Task
Parameters:
conv - The conversation containint the incoming message

handleAgree

public void handleAgree(Conversation conv)
Handles incoming agree messages. These messages are ignored.
Overrides:
handleAgree in class Task
Parameters:
conv - The conversation containint the incoming message

handleFailure

public void handleFailure(Conversation conv)
Handles incoming failure messages. An empty array of DF results is returned to the calling task.
Overrides:
handleFailure in class Task
Parameters:
conv - The conversation containint the incoming message

handleInform

public void handleInform(Conversation conv)
Handles incoming inform messages. The content of the inform message is parsed for DF search results, which are then passed to the calling task via a callback method.
Overrides:
handleInform in class Task
Parameters:
conv - The conversation containint the incoming message

searchDF

public boolean searchDF(DFAgentDescription df_desc)
Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.

Searches the local platform DF for any agents matching the specified DF description. This method will use the following default search parameters:
Overrides:
searchDF in class Task
Parameters:
df_desc - The DF description to search for
Returns:
False if the search could not be started, true otherwise - a return value of true does NOT mean that results were found

searchDF

public boolean searchDF(DFAgentDescription df_desc,
                        SearchConstraints constraint)
Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.

Searches the local platform DF for any agents matching the specified DF description using the specified search constraint. This method will use the following default search parameters:
Overrides:
searchDF in class Task
Parameters:
df_desc - The DF description to search for
constraint - The search constraint
Returns:
False if the search could not be started, true otherwise - a return value of true does NOT mean that results were found

searchDF

public boolean searchDF(DFAgentDescription df_desc,
                        boolean federated)
Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.

Searches the local platform DF for any agents matching the specified DF description. The search is optionally federated across other DFs. This method will use the following default search parameters:
Overrides:
searchDF in class Task
Parameters:
df_desc - The DF description to search for
federated - Flag to signal whether this search should be federated or not
Returns:
False if the search could not be started, true otherwise - a return value of true does NOT mean that results were found

searchDF

public boolean searchDF(java.lang.String df,
                        DFAgentDescription df_desc,
                        boolean federated)
Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.

Searches the specified DF for any agents matching the specified DF description. The search is optionally federated across other DFs. This method will use the following default search parameters:
Overrides:
searchDF in class Task
Parameters:
df - The DF to search
df_desc - The DF description to search for
federated - Flag to signal whether this search should be federated or not
Returns:
False if the search could not be started, true otherwise - a return value of true does NOT mean that results were found

searchDF

public boolean searchDF(java.lang.String df,
                        DFAgentDescription df_desc,
                        SearchConstraints constraints,
                        boolean federated)
Deprecated. Please use this task as a sub-task, rather than directly invoking methods on it.

Searches the specified DF for any agents matching the specified DF description using the specified search contraint. The search is optionally federated across other DFs.
Overrides:
searchDF in class Task
Parameters:
df - The DF to search
df_desc - The DF description to search for
constraint - The search constraint
federated - Flag to signal whether this search should be federated or not
Returns:
False if the search could not be started, true otherwise - a return value of true does NOT mean that results were found