Package org.rhq.core.clientapi.server.discovery

Examples of org.rhq.core.clientapi.server.discovery.InvalidInventoryReportException


        Agent agent = report.getAgent();
        long start = System.currentTimeMillis();

        Agent knownAgent = agentManager.getAgentByName(agent.getName());
        if (knownAgent == null) {
            throw new InvalidInventoryReportException("Unknown Agent named [" + agent.getName()
                + "] sent an inventory report - that report will be ignored. "
                + "This error is harmless and should stop appearing after a short while if the platform of the agent ["
                + agent.getName() + "] was recently removed from the inventory. In any other case this is a bug.");
        }
View Full Code Here


     * @param resource This can be a detached object
     * @throws InvalidInventoryReportException
     */
    private void validateResource(Resource resource) throws InvalidInventoryReportException {
        if (resource.getResourceType() == null) {
            throw new InvalidInventoryReportException("Reported resource [" + resource + "] has a null type.");
        }

        if (resource.getResourceKey() == null) {
            throw new InvalidInventoryReportException("Reported resource [" + resource + "] has a null key.");
        }

        if (resource.getInventoryStatus() == InventoryStatus.DELETED) {
            throw new InvalidInventoryReportException(
                "Reported resource ["
                    + resource
                    + "] has an illegal inventory status of 'DELETED' - agents are not allowed to delete platforms from inventory.");
        }

View Full Code Here

TOP

Related Classes of org.rhq.core.clientapi.server.discovery.InvalidInventoryReportException

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.