agentland.help
Class AFAIKActionAgent

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--metaglue.AgentAgent
                          |
                          +--agentland.util.GoodAgent
                                |
                                +--agentland.resource.ManagedAgent
                                      |
                                      +--agentland.help.AFAIKActionAgent
All Implemented Interfaces:
AFAIKAction, Agent, Good, Managed, MetagluePrimitives, Remote, Serializable, Spy

public class AFAIKActionAgent
extends ManagedAgent
implements AFAIKAction

AFAIKActionAgent takes information from AFAIK and AFAIKSpeech, and presents it via AFAIKNavigator or SpeechTextOutput. This class is also used as an interpreter for hypertext-like commands from AFAIKNavigator, such as "say://Hello World"

See Also:
ManagedAgent, AFAIKAction, Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Fields inherited from class agentland.resource.ManagedAgent
rm, society
 
Fields inherited from class agentland.util.GoodAgent
alert, notifier
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
AFAIKActionAgent()
          Creates a new AFAIKActionAgent instance.
 
Method Summary
 boolean interpretHyperlink(String sHyperlink)
          interpretHyperlink interprets hyperlink-like commands, such as "say://" or "helpfile://" in HTML files, and calls the requested action.
 void present(HelpFile hFile)
          Present the HelpFile using the AFAIKNavigator.
 void present(HelpFile hFile, String sText)
          Present the HelpFile using the AFAIKNavigator and speak the associated text using the speech synthesizer.
 void present(String sText)
          Speak the text using a speech synthesizer.
 
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, tell
 
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
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface agentland.resource.Managed
getNeed, replace, replace, resources, yank, yank
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Constructor Detail

AFAIKActionAgent

public AFAIKActionAgent()
                 throws RemoteException
Creates a new AFAIKActionAgent instance.
Throws:
RemoteException - if an error occurs
Method Detail

interpretHyperlink

public boolean interpretHyperlink(String sHyperlink)
interpretHyperlink interprets hyperlink-like commands, such as "say://" or "helpfile://" in HTML files, and calls the requested action. You can add to this method to implement your own actions.
Specified by:
interpretHyperlink in interface AFAIKAction
Parameters:
sHyperlink - a String value
Returns:
a boolean value
Throws:
RemoteException - if an error occurs

present

public void present(HelpFile hFile,
                    String sText)
Present the HelpFile using the AFAIKNavigator and speak the associated text using the speech synthesizer.
Specified by:
present in interface AFAIKAction
Parameters:
hFile - a HelpFile value
sText - a String value

present

public void present(HelpFile hFile)
Present the HelpFile using the AFAIKNavigator.
Specified by:
present in interface AFAIKAction
Parameters:
hFile - a HelpFile value

present

public void present(String sText)
Speak the text using a speech synthesizer.
Specified by:
present in interface AFAIKAction
Parameters:
sText - a String value