Managing the Agent / Network via RMI

 



 

Overview

 

Running the RMI system and managing the agent via RMI, involves starting the RMI registry, starting the RMI server (agent / network which is accessible via RMI) and starting the RMI Client.

 

The RMI client can access the RMI server, only if the remote object is created and references to them are accessible. Simulation Toolkit provides option to make the simulated SNMP/TL1 agent and the network devices accessible through RMI.

 

In this topic, we will learn to start the RMI registry,  make the agent accessible through RMI, start the RMI server, and start the client program which invokes the client API methods to access the RMI server.

 

Starting the RMI Registry

 

For obtaining references to remote objects, RMI provides a simple remote object registry interface, implemented by RMI's rmiregistry, that provides methods for storing and retrieving remote object references.  A server registers its remote objects with the RMI registry.

 

To start the RMI registry :

  1. Go to <Simulator_Home>/bin/cmdline directory.

  2. Execute the StartRMIRegistry.bat file for Windows OS and StartRMIRegistry.sh file for Linux OS

  3. This command starts the RMI registry in the default port 1099.

Registering the Object with the RMI Registry

 

From UI

 

Making the SNMP agent accessible through RMI and starting the agent :

Making TL1 agent accessible through RMI and starting the agent :

Making the network devices accessible through RMI and starting the network :

From Command line

StartSnmpAgent.sh -m RFC1213.MIB -p 8005 -rmi

 

Refer to the topic, Starting the SNMP Agent from Command Line, to learn more about the command line options provided.

StartTL1Agent.sh -cs .\tcs\Acme-MSU.tcs -p 9002 -rmi

 

Refer to the topic, Starting the TL1 Agent from Command Line,  to learn more about the command line options provided.

StartNetwork -snmp < SNMP text file with path > -tl1 < TL1 text file with path> -rmi

 

Refer to the topic, Starting the Network from Command Line, to learn more about the command line options provided.

 

Starting the RMI Client

  1. Write the RMI Client program, invoking the methods in RMI client API.  The javadocs of the RMI client api methods  that can be accessed via RMI is available in SimScrRmiIntf.html in <Simulator_Home>/examples/javadocs directory.

  1. You can invoke methods in RMI Client API by setting the AdventNetSimulatorClient.jar  present under the <Simulator_Home>/tutorials/rmi/client/jars directory. Procedure to write the RMI client program is given below :

  1. Start the RMI Client program. If the method getObjectRef(host, port, objectName) returns a boolean, then you can use the rest of the methods available with the RMI client API and manage the simulated agent / network devices.

 



Copyright © 1996-2006, AdventNet Inc. All Rights Reserved.