API Question

by 
 on 28-Jan-2010 09:59 PM.
  in  OEMs & Developers 
Hi,

I need to know about api function for finding (from Webnms client)

Webnmss Home Directory location
and
Webnms server ip and other services ports information.

any example will help.

-Sam
  • No status

Re: API Question

by 
 on 31-Jan-2010 10:13 AM
I thought I will get reply to this very fast. I am looking for just right Api (either server or client API) for

to find Webnmss Home Directory location and
Webnms server ip and other services ports information.


kindly reply.

-Sam




Re: API Question

by 
 on 01-Feb-2010 12:03 AM
Hi Sam,

You can get the Webnmss Home Directory using PureUtils.rootDir /NmsUtil.getAIM_Root().

You can get the server IP address using NmsUtil.getServerIPAndHostName() and the ports used by WebNMS using NmsUtil.getNmsPorts().

Please note that these are all server-side APIs and can be used in the same JVM (as NMS server) only.
Hope this helps you.

Regards
Sharada.

Re: API Question

by 
 on 04-Feb-2010 11:35 PM
Dear Sam

The NmsClientUtil.applet.getParameter("BE_HOST_ADDRESS") can be used to get the Server's IP. In addition, you can also get the following parameters through the same

NmsClientUtil.applet.getParameter("BE_HOST_ADDRESS");

NmsClientUtil.applet.getParameter("RMI_REG_PORT");
NmsClientUtil.applet.getParameter("BE_TIMEZONE_ID");
NmsClientUtil.applet.getParameter("MEMORY_USAGE_THRESHOLD");
NmsClientUtil.applet.getParameter("LANGUAGE");
NmsClientUtil.applet.getParameter("COUNTRY");
NmsClientUtil.applet.getParameter("CRYPTO_CLASS");
NmsClientUtil.applet.getParameter("CLIENT_SERVER");
NmsClientUtil.applet.getParameter("DATE_FORMAT");

Though you cannot get the server's directory, we believe that your  requirement is to browse the Server's directory structure from client.
For that you use the SasFileDialog as follows: (The code snippet is taken from NMS_Home\projects\ElementConfiguration\Source\ShowMibTree.java. So you can also refer the same file for more clarity)

JFrame sasFileChooser = new JFrame();
SasFileDialog sfd = new SasFileDialog(applet);
sfd.init();
sfd.addActionListener(this);
sasFileChooser.getContentPane().add(sfd);
sasFileChooser.setIconImage(frameIcon);
sasFileChooser.setTitle(NmsClientUtil.GetString("Nms File Dialog"));
sasFileChooser.pack();
sasFileChooser.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
sasFileChooser.setSize(400,400);
configPanel.configClientUtils.centerWindow(sasFileChooser);
sasFileChooser.setVisible(true);

We believe this meets your requirement. Kindly get back to us for any further clarification in this regard.

Thanks & regards
Venkatramanan

Re: API Question

by 
 on 08-Feb-2010 10:53 PM
Dear Sam,

NmsClientUtil.getAIM_ROOT() gives you the server's root from the client, FYI

Regards
Venkatramanan
Post Actions
Statistics
  • 4
     Replies
  • 236
     Views
  • 0
     Followers
Tags for the post
No tags available for this topic.
© 2009 Corp. All rights reserved. Trademarks | Privacy Policy | Site Map | Contact Us | Careers

Edit Link Delete Link

Edit Link Delete Link

LoadingImage