|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.ip2.ItemHandler ix.ip2.ActivityHandler ix.ip2.QueryHandler
public class QueryHandler
Generates HandlerActions that send queries.
Nested Class Summary | |
---|---|
static class |
QueryHandler.AnswerHandler
Generates HandlerActions that send answers to queries. |
(package private) static class |
QueryHandler.AnswerListener
A listener that waits for a new report that contains an answer to the query. |
(package private) static class |
QueryHandler.QueryAction
Sends a query to a specified agent. |
Field Summary | |
---|---|
(package private) static java.lang.Object |
ANSWER_KEY
|
(package private) static java.lang.Object |
QUERY_BY_KEY
|
(package private) static java.lang.Object |
QUERY_REF_KEY
|
(package private) static Symbol |
S_ANSWER
|
(package private) static Symbol |
S_QUERY
|
Fields inherited from class ix.ip2.ItemHandler |
---|
actionDescription |
Constructor Summary | |
---|---|
QueryHandler()
|
Method Summary | |
---|---|
void |
addHandlerActions(AgendaItem item)
Called to add any HandlerAction s that this
handler regards as appropriate for the specified AgendaItem. |
boolean |
appliesTo(AgendaItem item)
Gives this handler a say in whether it should add actions to an item. |
java.util.List |
getSyntaxList()
Returns a list of patterns representing the item pattern syntaxes this handler can process, or null if no particular syntax is required. |
Methods inherited from class ix.ip2.ActivityHandler |
---|
toString |
Methods inherited from class ix.ip2.ItemHandler |
---|
getActionDescription, handle, isAutomatic, makeHandler, reviseHandlerActions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final Symbol S_QUERY
static final Symbol S_ANSWER
static final java.lang.Object QUERY_BY_KEY
static final java.lang.Object QUERY_REF_KEY
static final java.lang.Object ANSWER_KEY
Constructor Detail |
---|
public QueryHandler()
Method Detail |
---|
public java.util.List getSyntaxList()
ItemHandler
ItemHandler.appliesTo(AgendaItem)
method.
getSyntaxList
in class ItemHandler
AgendaItem.getPattern()
public boolean appliesTo(AgendaItem item)
ItemHandler
appliesTo
in class ItemHandler
AgendaItem.wantsActionsFrom(ItemHandler handler)
public void addHandlerActions(AgendaItem item)
ItemHandler
HandlerAction
s that this
handler regards as appropriate for the specified AgendaItem.
This method is called only if both this handler's
ItemHandler.appliesTo(AgendaItem)
and the specified item's
AgendaItem.wantsActionsFrom(ItemHandler)
methods
return true.
The method provided by the ItemHandler class just adds
an action that calls this handler's ItemHandler.handle(AgendaItem)
method. This allows suitably simple handlers to avoid
working directly with HandlerActions.
Note that actions are added by calling an item's
AgendaItem.addAction(HandlerAction)
method.
addHandlerActions
in class ItemHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |