JADE Programmer’s GUIDE 1 JADE ADMINISTRATOR’S GUIDE USAGE RESTRICTED ACCORDING
JADE Programmer’s GUIDE 1 JADE ADMINISTRATOR’S GUIDE USAGE RESTRICTED ACCORDING TO LICENSE AGREEMENT. Last update: 29-January-2002. JADE 2.5 Authors: Fabio Bellifemine, Giovanni Caire, Tiziana Trucco (TILAB S.p.A., formerly CSELT) Giovanni Rimassa (University of Parma) Copyright (C) 2000 CSELT S.p.A. Copyright (C) 2001 TILAB S.p.A. Copyright (C) 2002 TILAB S.p.A. JADE - Java Agent DEvelopment Framework is a framework to develop multi-agent systems in compliance with the FIPA specifications. JADE successfully passed the 1st FIPA interoperability test in Seoul (Jan. 99) and the 2nd FIPA interoperability test in London (Apr. 01). Copyright (C) 2000 CSELT S.p.A., 2001 TILab S.p.A., 2002 TILab S.p.A. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. JADE Programmer’s GUIDE 2 TABLE OF CONTENTS 1 INTRODUCTION 4 2 RUNNING THE AGENT PLATFORM 4 2.1 Software requirements 4 2.2 Getting the software 4 2.3 Running JADE from the binary distribution 4 2.3.1 Command line syntax 5 2.3.2 Options available from the command line 5 2.3.3 Launching agents from the command line 7 2.3.4 Example 7 2.4 Building JADE from the source distribution 8 2.4.1 Building the JADE framework 8 2.4.2 Building JADE libraries 8 2.4.3 Building JADE HTML documentation 8 2.4.4 Building JADE examples and demo application 9 2.4.5 Cleaning up the source tree 9 2.5 Support for inter-platform messaging with plug-in Message Transport Protocols 9 2.5.1 Command line options for MTP management 10 2.5.2 Configuring MTPs from the graphical management console. 10 2.5.3 Agent address management 11 2.5.4 Writing new MTPs for JADE 11 2.5.4.1 The Basic IIOP MTP 11 2.5.4.2 The ORBacus MTP 12 2.5.4.3 The HTTP MTP 12 2.6 Support for ACL Codec 13 2.6.1 XML Codec 13 2.6.2 Bit Efficient ACL Codec 13 3 AGENT IDENTIFIERS AND SENDING MESSAGES TO REMOTE AGENTS 13 4 GRAPHICAL USER INTERFACE TO MANAGE AND MONITOR THE AP ACTIVITY 14 4.1 Remote Monitoring Agent 14 4.2 DummyAgent 18 4.3 DF GUI 19 4.4 Sniffer Agent 20 4.5 Introspector Agent 21 JADE Programmer’s GUIDE 3 5 LIST OF ACRONYMS AND ABBREVIATED TERMS 22 JADE Programmer’s GUIDE 4 1 INTRODUCTION This administrator's guide describes how to install and launch JADE. It is complemented by the HTML documentation available in the directory jade/doc and the JADE Programmer's Guide. If and where conflict arises between what is reported in the HTML documentation and this guide, preference should be given to the HTML documentation that is updated more frequently. 2 RUNNING THE AGENT PLATFORM 2.1 Software requirements The only software requirement to execute the system is the Java Run Time Environment version 1.2. In order to build the system the JDK1.2 is sufficient because pre-built IDL stubs and Java parser classes are included with the JADE source distribution. Those users, who wish to regenerate IDL stubs and Java parser classes, should also have the JavaCC parser generator (version 0.8pre or version 1.1; available from http://www.metamata.com), and the IDL to Java compiler (available from the Sun Developer Connection). Notice that the old idltojava compiler available with JDK1.2 generates wrong code and it should never be used, instead the new idlj compiler, that is distributed with JDK1.3, should be used. 2.2 Getting the software All the software is distributed under the LGPL license limitations and it can be downloaded from the JADE web site http://jade.cselt.it/. Five compressed files are available: 1. The source code of JADE 2. The source code of the examples 3. The documentation, including the javadoc of the JADE API and this programmer's guide 4. The binary of JADE, i.e. the jar files with all the Java classes 5. A full distribution with all the previous files 2.3 Running JADE from the binary distribution Having uncompressed the archive file, a directory tree is generated whose root is jade and with a lib subdirectory. This subdirectory contains some JAR files that have to be added to the CLASSPATH environment variable. Having set the classpath, the following command can be used to launch the main container of the platform. The main container is composed of the DF agent, the AMS agent, and the RMI registry (that is used by JADE for intra-platform communication). java jade.Boot [options] [AgentSpecifier list] Additional agent containers can be then launched on the same host, or on remote hosts, that connect themselves with the main container of the Agent Platform, resulting in a distributed system that seems a single Agent Platform from the outside. An Agent Container can be started using the command: java jade.Boot –container [options] [AgentSpecifier list] JADE Programmer’s GUIDE 5 An alternative way of launching JADE is to use the following command, that does not need to set the CLASSPATH: java –jar lib\jade.jar –nomtp [options] [AgentSpecifier list] Remind to use the “–nomtp” option, otherwise an exception will be thrown because the library iiop.jar is not found. 2.3.1 Command line syntax The full EBNF syntax of the command line is the following, where common rules apply for the token definitions: java jade.Boot Option* AgentSpecifier* Option = "-container" | "-host" HostName | "-port" PortNumber | "-name" PlatformName | "-gui" | "-mtp" ClassName "(" Argument* ")" (";" ClassName "(" Argument* ")")* | "-nomtp" | "-aclcodec" ClassName (";" ClassName )* | "-nomobility" | "-version" | "-help" | "-conf" FileName? ClassName = PackageName? Word PackageName = (Word ".")+ Argument = Word | Number | String HostName = Word ( "." Word )* PortNumber = Number AgentSpecifier = AgentName ":" ClassName ("(" Argument* ")")? AgentName = Word PlatformName = Word 2.3.2 Options available from the command line -container specifies that this instance of JADE is a container and, as such, that it must join with a main-container (by default this option is unselected) -host specifies the host name where the RMI registry should be created (for the main- JADE Programmer’s GUIDE 6 container) / located (for the ordinary containers); its value is defaulted to localhost. This option can also be used when launching the main-container in order to override the value of localhost; a typical example of this kind of usage is to include the full domain of the host (e.g. –host kim.cselt.it when the localhost would have returned just ‘kim’) such that the main-container can be contacted even from outside the local domain. -port this option allows to specify the port number where the RMI registry should be created (for the main-container) / located (for the ordinary containers). By default the port number 1099 is used. -name this option specifies the symbolic name to be used as the platform name; this option will be considered only in the case of a main container; the default is to generate a unique name from the values of the main container's host name and port number. Please note that this option is strongly discouraged since uniqueness of the HAP is not enforced. This might result in non-unique agent names. -gui specifies that the RMA (Remote Monitoring Agent) GUI of JADE should be launched (by default this option is unselected) -mtp specifies a list of external Message Transport Protocols to be activated on this container (by default the JDK1.2 IIOP is activated on the mai n-container and no MTP is activated on the other containers) -nomtp has precedence over -mtp and overrides it. It should be used to override the default behaviour of the main-container (by default the -nomtp option unselected) -aclcodec By default all messages are encoded by the String-based ACLCodec. This option allows to specify a list of additional ACLCodec that will become available to the agents of the launched container in order to encode/decode messages. JADE will provide automatically to use these codec when agents set the right value in the field aclRepresentation of the Envelope of the sent/received ACLMessages. Look at the FIPA specifications for the standard names of these codecs -nomobility disable the mobility and cloning support in the launched container. In this way the container will not accept requests for agent migration or agent cloning, option that might be useful to enhance the level of security for the host where this container is running. Notice that the platform can include both containers where mobility is enabled and containers where it is disabled. In this case an agent that tries to move from/to the containers where mobility is disabled will die because of a Runtime Exception. Notice that, even if this option was selected, the container would still be able to launch new agents (e.g. via the RMA GUI) if their class can be reached via the local CLASSPATH. By default this uploads/Geographie/ administrators-guide 3 .pdf
Documents similaires










-
29
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Aoû 29, 2021
- Catégorie Geography / Geogra...
- Langue French
- Taille du fichier 0.8620MB