public class SearchInitiator extends SingleRequestInitiator
Modifier and Type | Field and Description |
---|---|
static Result |
NO_RESULTS |
static Result |
RESULTS_FOUND |
FAILURE_EXCEPTION, NOT_UNDERSTOOD_EXCEPTION, REFUSE_EXCEPTION, REPLY_NOT_UNDERSTOOD_EXCEPTION
Constructor and Description |
---|
SearchInitiator(BehaviorController controller,
AgentDescription query)
Instantiates this directory search behavior.
|
SearchInitiator(BehaviorController controller,
AgentDescription query,
long maxResults)
Instantiates this auxiliary behavior.
|
Modifier and Type | Method and Description |
---|---|
AgentDescription[] |
getSearchResults()
The search results.
|
void |
handleReplyNotUnderstood(Message reply)
Callback method in order to handle that messages received from the
directory cannot be interpreted (either because they are unreadable or
because they have unexpected content).
|
void |
handleSearchResults(AgentDescription[] results)
Callback method in order to handle the search results.
|
getIdentifier, handleFailure, handleNotUnderstood, handleRefuse, isFinished, result, run, waitingFor
public static final Result RESULTS_FOUND
public static final Result NO_RESULTS
public SearchInitiator(BehaviorController controller, AgentDescription query)
Instantiates this directory search behavior. This constructor does not limit the maximum number of search results.
Note that not limiting the maximum number of results deviates from the FIPA standard which limits the maximum results to one by default.
controller
- the agent controller of the initiating agentquery
- the querypublic SearchInitiator(BehaviorController controller, AgentDescription query, long maxResults)
controller
- the agent controller of the initiating agentquery
- the querymaxResults
- the maximum number of resultspublic void handleSearchResults(AgentDescription[] results)
results
- the search resultspublic AgentDescription[] getSearchResults()
public void handleReplyNotUnderstood(Message reply)
reply
- the reply that is unreadable or that has unexpected contentCopyright © Aimpulse Intelligent Systems GmbH
All rights reserved.