agentland.gui.tools
Class GuiAskerAgent
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--metaglue.AgentAgent
|
+--agentland.util.GoodAgent
|
+--agentland.resource.ManagedAgent
|
+--agentland.gui.tools.GuiAskerAgent
- All Implemented Interfaces:
- Agent, BetterAsker, Good, GoodAsker, GuiAsker, Managed, MetagluePrimitives, Remote, Serializable, Spy
- public class GuiAskerAgent
- extends ManagedAgent
- implements GuiAsker
- See Also:
- Serialized Form
Methods inherited from class agentland.resource.ManagedAgent |
connect, getAlert, getNeed, isAvailable, isAvailable, reliesOn, reliesOn, replace, replace, request, request, request, requestAgent, requestAgent, resources, resourcesByAgentID, setNeed, tiedTo, yank, yank, yank |
Methods inherited from class agentland.util.GoodAgent |
addSpy, addSpy, alert, alertString, beep, error, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou |
answers
protected Hashtable answers
gmd
protected GuiManagerDaemon gmd
GuiAskerAgent
public GuiAskerAgent()
throws RemoteException
ask
public Question ask(Question q)
throws RemoteException
- Specified by:
ask
in interface BetterAsker
ask
public int ask(String q)
throws RemoteException
- Asks q, looks for a yes/no/maybe/unknown response
- Specified by:
ask
in interface GoodAsker
ask
public int ask(String q,
int timeout)
throws RemoteException
- Specified by:
ask
in interface GoodAsker
- Parameters:
timeout
- number of seconds until it gives up on your sorry
ass.
askFree
public String askFree(String q)
throws RemoteException
- Ask free response question--this is not all that usefull given
the getDictation method of grammars, but it is better form?
Maybe?
- Specified by:
askFree
in interface GoodAsker
askChoice
public Object askChoice(String q,
Vector options,
Object defaultAnswer)
throws RemoteException
- Asks a question and accepts one of the options as an answer
- Specified by:
askChoice
in interface GoodAsker
- Parameters:
question
- question to askoptions
- Vector of strings -- possible answers- Returns:
- the answer
testAskChoice
public String testAskChoice()
throws RemoteException
- A testing method
- Specified by:
testAskChoice
in interface GuiAsker
askChoice
public Object askChoice(String question,
Vector options)
throws RemoteException
- Description copied from interface:
GoodAsker
- Asks a question and accepts one of the options as an answer
- Specified by:
askChoice
in interface GoodAsker
- Following copied from interface:
agentland.util.asker.GoodAsker
- Parameters:
question
- question to askoptions
- Vector of strings -- possible answers- Returns:
- the answer
waitForAnswer
protected void waitForAnswer(String q)
- Waits for an answer to the question; when it is woken up, it
checks if the answer has been given to this question. If so, it
returns, otherwise it waits again.
- Parameters:
q
- The question we are waiting on
tell
public void tell(Secret s)
throws RemoteException
- Description copied from interface:
Spy
- This is called if the Agent is to receive a particular
secret.
- Specified by:
tell
in interface Spy
- Overrides:
tell
in class GoodAgent
- Following copied from interface:
agentland.util.Spy
- Parameters:
secret
- a Secret
value- Throws:
RemoteException
- if an error occurs