Advertisement
Guest User

Untitled

a guest
Sep 16th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.46 KB | None | 0 0
  1.         public JMXItemChecker(JSONObject request) throws ZabbixException
  2.         {
  3.                 super(request);
  4.  
  5.                 try
  6.                 {
  7.                         String conn = request.getString(JSON_TAG_CONN);
  8.                         int port = request.getInt(JSON_TAG_PORT);
  9.  
  10.                         Integer weblogic = new Integer("7001");
  11.  
  12.                         int retvalweblogic = weblogic.compareTo(port);
  13.  
  14.                         if (retvalweblogic == 0)
  15.                         {
  16.                                 url = new JMXServiceURL("service:jmx:iiop://" + conn + ":" + port + "/jndi/weblogic.management.mbeanservers.domainruntime");
  17.                         } else {
  18.                                 url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" + conn + ":" + port + "/jmxrmi");
  19.                         }
  20.  
  21.                         jmxc = null;
  22.                         mbsc = null;
  23.  
  24.                         username = request.optString(JSON_TAG_USERNAME, null);
  25.                         password = request.optString(JSON_TAG_PASSWORD, null);
  26.  
  27.                         if (null != username && null == password || null == username && null != password)
  28.                                 throw new IllegalArgumentException("invalid username and password nullness combination");
  29.                 }
  30.                 catch (Exception e)
  31.                 {
  32.                         throw new ZabbixException(e);
  33.                 }
  34.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement