agentland.util.asker
Interface GoodAsker

All Superinterfaces:
Agent, Remote
All Known Subinterfaces:
Asker, BetterAsker, GuiAsker, MultimodalAsker

public interface GoodAsker
extends Agent


Field Summary
static int ERROR
           
static int MAYBE
           
static int NO
           
static int UNKNOWN
           
static int YES
           
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 int ask(String q)
          Asks q, looks for a yes/no/maybe/unknown response
 int ask(String q, int timeout)
           
 Object askChoice(String question, Vector options)
          Asks a question and accepts one of the options as an answer
 Object askChoice(String question, Vector options, Object defaultAnswer)
          As above but includes a default answer
 String askFree(String q)
          Ask free response question--this is not all that usefull given the getDictation method of grammars, but it is better form? Maybe?
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, getOldLogs, shutdown, startup, whereAreYou
 

Field Detail

NO

public static final int NO

YES

public static final int YES

MAYBE

public static final int MAYBE

UNKNOWN

public static final int UNKNOWN

ERROR

public static final int ERROR
Method Detail

ask

public int ask(String q)
        throws RemoteException
Asks q, looks for a yes/no/maybe/unknown response

ask

public int ask(String q,
               int timeout)
        throws RemoteException
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?

askChoice

public Object askChoice(String question,
                        Vector options)
                 throws RemoteException
Asks a question and accepts one of the options as an answer
Parameters:
question - question to ask
options - Vector of strings -- possible answers
Returns:
the answer

askChoice

public Object askChoice(String question,
                        Vector options,
                        Object defaultAnswer)
                 throws RemoteException
As above but includes a default answer