Package org.apache.oodt.cas.resource.structs.exceptions

Examples of org.apache.oodt.cas.resource.structs.exceptions.MonitorException


        try {
            nodeVector = (Vector) client.execute("resourcemgr.getNodes",
                    argList);
        } catch (XmlRpcException e) {
            throw new MonitorException(e.getMessage());
        } catch (IOException e) {
            throw new MonitorException(e.getMessage());
        }

        return XmlRpcStructFactory.getResourceNodeListFromXmlRpc(nodeVector);

    }
View Full Code Here


        try {
            resNodeHash = (Hashtable) client.execute("resourcemgr.getNodeById",
                    argList);
        } catch (XmlRpcException e) {
            throw new MonitorException(e.getMessage());
        } catch (IOException e) {
            throw new MonitorException(e.getMessage());
        }

        return XmlRpcStructFactory.getResourceNodeFromXmlRpc(resNodeHash);

    }
View Full Code Here

      lastMethodCallDetails = new MethodCallDetails("getNodeById",
            Lists.newArrayList((Object) nodeId));
      try {
         return new ResourceNode(nodeId, new URL("http://localhost:9999"), 5);
      } catch (Exception e) {
         throw new MonitorException(e);
      }
   }
View Full Code Here

            parser = factory.newSAXParser();
            gangliaXMLParser = new GangliaXMLParser();
            parser.parse(new InputSource(new StringReader(buffer)), gangliaXMLParser);
            gridConfiguration = gangliaXMLParser.getGridConfiguration();
        } catch (ParserConfigurationException e) {
            throw new MonitorException("Error while parsing: " + e.getMessage());
        } catch (SAXException e) {
            throw new MonitorException("Error while parsing the XML: " + e.getMessage());
        } catch (IOException e) {
            throw new MonitorException("I/O error: " + e.getMessage());
        }
    }
View Full Code Here

  public int getLoad(ResourceNode node) throws MonitorException {
    Map<String, String> nodeProperties = null;
    String nodeId = node.getNodeId();
    nodeProperties = this.locateNode(nodeId);
    if (nodeProperties == null) {
      throw new MonitorException(
          "GangliaMonitor: not tracking requested node: [" + nodeId
              + "]");
    }

    // calculate load
View Full Code Here

        for (Map<String, String> map : aNodes.values()) {
          try {
            nodes.add(this.nodeFromMap(map));
          } catch (MalformedURLException e) {
            e.printStackTrace();
            throw new MonitorException(e.getMessage());
          }
        }
      }
    }
View Full Code Here

  public ResourceNode getNodeById(String nodeId) throws MonitorException {
    try {
      return this.nodeFromMap(this.locateNode(nodeId));
    } catch (MalformedURLException e) {
      e.printStackTrace();
      throw new MonitorException(e.getMessage());
    }
  }
View Full Code Here

                  String.valueOf(port))) {
            try {
              return this.nodeFromMap(aNodes.get(aNodeId));
            } catch (MalformedURLException e) {
              e.printStackTrace();
              throw new MonitorException(e.getMessage());
            }
          }
        }
      }
    }
View Full Code Here

                buffer.append(line);
                line = reader.readLine();
            }
            reader.close();
        } catch (UnknownHostException e) {
            throw new MonitorException
                    ("Unknown host: " + host + ":" + port + "-" + e.getMessage());
        } catch (IOException e) {
            throw new MonitorException
                    ("Unable to get the monitoring report from the GMeta daemon: "
                            + e.getMessage());
        }
        return buffer.toString().trim();
    }
View Full Code Here

            parser = factory.newSAXParser();
            gangliaXMLParser = new GangliaXMLParser();
            parser.parse(new InputSource(new StringReader(buffer)), gangliaXMLParser);

        } catch (ParserConfigurationException e) {
            throw new MonitorException("Error while parsing: " + e.getMessage());
        } catch (SAXException e) {
            throw new MonitorException("Error while parsing the XML: " + e.getMessage());
        } catch (IOException e) {
            throw new MonitorException("I/O error: " + e.getMessage());
        }
        return gangliaXMLParser.getGridConfiguration();
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.resource.structs.exceptions.MonitorException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.