agentland.info
Interface StartInterface

All Superinterfaces:
Agent, Good, Managed, Mess, Remote, Spy
All Known Implementing Classes:
StartInterfaceAgent

public interface StartInterface
extends Mess

Interface for StartInterfaceAgent.

See Also:
Mess

Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Method Summary
 void closeConnectionToStart()
          Close the connection to START.
 boolean connectToStart()
          Call this to set up connection to START
 boolean doAssert(String assertion)
          Make an assertion.
 boolean doCommand(String object, String args)
          Execute a command.
 String doQuery(String object, String args)
          Execute a query and return the result.
 String fread(String input)
          Call START's fread function.
 void hearStateChange(Secret s)
           
 void help()
          Prints the queries and commands that this agent can handle on System.out.
 boolean isConnected()
           
 void showFacts()
          Prints the facts in the system on System.out
 
Methods inherited from interface mess.Mess
addUserfunction, assert, assert, assertAttribute, assertSpeechTag, clear, execCommand, facts, fetch, fetchInt, loadFacts, loadFile, loadScript, loadString, loadURL, newFact, newFact, reset, retract, retract, run, saveFacts, store
 
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
 

Method Detail

doCommand

public boolean doCommand(String object,
                         String args)
                  throws RemoteException
Execute a command.
Parameters:
object - the object you are asking about
args - other parts of the command
Returns:
true if successful, false otherwise
Throws:
RemoteException - if an error occurs

doQuery

public String doQuery(String object,
                      String args)
               throws RemoteException
Execute a query and return the result.
Parameters:
object - the object you are asking about
args - other parts of the query
Returns:
the answer to the query if successful, null otherwise
Throws:
RemoteException - if an error occurs

doAssert

public boolean doAssert(String assertion)
                 throws RemoteException
Make an assertion.
Parameters:
assertion - the fact to be asserted
Returns:
true if successful, false otherwise
Throws:
RemoteException - if an error occurs

hearStateChange

public void hearStateChange(Secret s)
                     throws RemoteException

help

public void help()
          throws RemoteException
Prints the queries and commands that this agent can handle on System.out.
Throws:
RemoteException - if an error occurs

showFacts

public void showFacts()
               throws RemoteException
Prints the facts in the system on System.out
Throws:
RemoteException - if an error occurs

connectToStart

public boolean connectToStart()
                       throws RemoteException
Call this to set up connection to START
Returns:
true if successful
Throws:
RemoteException - if an error occurs

fread

public String fread(String input)
             throws RemoteException
Call START's fread function.
Parameters:
input - a string to give to fread
Returns:
START's response

closeConnectionToStart

public void closeConnectionToStart()
                            throws RemoteException
Close the connection to START.
Throws:
RemoteException - if an error occurs

isConnected

public boolean isConnected()
                    throws RemoteException