« Back
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
to find Webnmss Home Directory location and
Webnms server ip and other services ports information.
kindly reply.
-Sam
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.
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.
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
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
Dear Sam,
NmsClientUtil.getAIM_ROOT() gives you the server's root from the client, FYI
Regards
Venkatramanan
NmsClientUtil.getAIM_ROOT() gives you the server's root from the client, FYI
Regards
Venkatramanan
Post Actions
Corp