Compile Deploy Run
From Indus Communities
[edit] Compiling, Deploying and Running your first Agent
Once implemented, the agent in section 1.1 above can be compiled, deployed into the Indus container (see Chapter 5 for details) running either on a local host, and then run either on local or remote host.
- 1.2.1 icompile
Indus files are compiled by the Indus compiler and converted to byte code. This is done using the command icompile
Syntax:
- indus -icompile <agent name/component name>
where, agent name/component name – Name of the component / agent Indus implementation file (class file that implements an agent or component) which needs to be compiled. An agent or component definition file can also be separately compiled. However, compiling an agent or component implementation file also automatically compiles an agent or component definition file.
In the example in section 1.1 :
- D:\> indus -icompile MyTeacher
where,
- MyTeacher is the agent implementation file that generates MyTeacher.class.
- 1.2.2 irun
Once an agent or component is implemented, it needs to be deployed into the Indus container. The container enables deployed agents and components to use and provide services across a distributed network. An agent and component become capable of instantiation once they are deployed into an Indus container.
Syntax:
- indus -irun <agent name> | <component name> <agent idoptional>
where,
- agent name – Name of the agent to be deployed
- component name – Name of the component to be deployed
- agentID – The Id by which a User agent is instantiated
In the example in Section 1.1 :
- D:\>indus –irun MyTeacher Mary
Which will execute MyTeacher and display the result on console.
The irun command behaves differently for different implementation types of agents and components in Indus. The details are available in Section 1.6.
Next : Context, newType and Main
