ix.test
Class SimpleIXAgent

java.lang.Object
  extended by ix.icore.IXAgent
      extended by ix.test.SimpleIXAgent

public class SimpleIXAgent
extends IXAgent

An example of a very simple I-X agent. Its IPC name can be given by the "-ipc-name" command-line argument. For example, to pretend to be I-TEST

    java ix.test.SimpleIXAgent -ipc -ipc-name=ITEST
 

See Also:
SimpleIXAgent.java source code

Field Summary
 
Fields inherited from class ix.icore.IXAgent
contactManager, displayName, eventLogger, exitHooks, initialDisplayName, ipcName, ipcStrategyName, iSimTimer, mainAgent, nameListeners, startupDate, startupHooks, symbolName, textFrame
 
Constructor Summary
SimpleIXAgent()
           
 
Method Summary
 void addTool(ToolController tc)
          Adds a tool, usually by adding an entry to a "Tools" menu in the GUI.
static void main(java.lang.String[] argv)
           
protected  void processCommandLineArguments()
          Handles command-line arguments common to all I-X agents.
protected  void startup()
          Method called by the IXAgent.mainStartup(String[] argv) method to perform any setup and initialization that should take place after this agent's constructor has been called and command-line arguments have been processed.
 
Methods inherited from class ix.icore.IXAgent
addAgentNameListener, addExitHook, addStartupHook, adjustLookAndFeel, displayMessage, do_mainStartup, ensureTool, exit, fireSymbolNameChanged, getAgent, getAgentDisplayName, getAgentIPCName, getAgentStartupDate, getAgentSymbolName, getContactManager, getEventLogger, getISimTimer, getKnownAgents, handleInput, handleNewActivity, handleNewChatMessage, handleNewConstraint, handleNewIssue, handleNewReport, handleReceivedReport, installAgentExtensions, installAgentExtensions, isMainAgent, log, mainStartup, notePossibleNewContact, pre_handleInput, preprocessInput, reportInputException, setAgentSymbolName, setEventLogger, setupISimTimer, startServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleIXAgent

public SimpleIXAgent()
Method Detail

processCommandLineArguments

protected void processCommandLineArguments()
Description copied from class: IXAgent
Handles command-line arguments common to all I-X agents. At present, this method also makes any standard I-X changes to the look and feel.

The following are handled directly my this method:

    -debug=boolean
    -ipc=name
    -ipc-name=name
    -symbol-name=name
    -display-name=name
 
debug is used to set Debug.on.

The name in -ipc=name argument will be interpreted by the IPC.makeCommunicationStrategy(String) method.

The name in the -icp-name=name argument sets the name that this agent calls itself for IPC and that is returned by the getAgentIPCName() method.

Needs further explanation of ipc-name, and of symbol-name and display-name. ...

The processCommandLineArguments method of this agent's contact manager is called to handle arguments that list relationships with other agents.

Overrides:
processCommandLineArguments in class IXAgent
See Also:
IFUtil.adjustLookAndFeel(), IPC.makeCommunicationStrategy(String methodName), ContactManager.processCommandLineArguments(), Debug.on, Parameters

startup

protected void startup()
Description copied from class: IXAgent
Method called by the IXAgent.mainStartup(String[] argv) method to perform any setup and initialization that should take place after this agent's constructor has been called and command-line arguments have been processed.

At present, this method does nothing, and all the work is done in subclasses.

Overrides:
startup in class IXAgent

addTool

public void addTool(ToolController tc)
Description copied from class: IXAgent
Adds a tool, usually by adding an entry to a "Tools" menu in the GUI. This method throws an exception that says tool additions are not supported; it should be overridden in subclasses that do allow tools.

Overrides:
addTool in class IXAgent

main

public static void main(java.lang.String[] argv)