Examples of pingService()


Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

            boolean agentPingedSuccessfully = false;
            // Getting live configuration is mostly for the UI's benefit - as such, do not hang
            // for a long time in the event the agent is down or can't be reached.  Let's make the UI
            // responsive even in the case of an agent down by pinging it quickly to verify the agent is up.
            if (pingAgentFirst) {
                agentPingedSuccessfully = agentClient.pingService(5000L);
            }

            if (!pingAgentFirst || agentPingedSuccessfully) {
                liveConfig = agentClient.getConfigurationAgentService().loadResourceConfiguration(resource.getId());
                if (liveConfig == null) {
View Full Code Here

Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

            // See also https://docs.jboss.org/author/display/RHQ/Virtual+platforms+and+synthetic+agents
            if (agentClient != null) {
                if (agentClient.getAgent() == null || agentClient.getAgent().getName() == null
                    || !agentClient.getAgent().getName().startsWith(ResourceHandlerBean.DUMMY_AGENT_NAME_PREFIX)) { // don't do that on "REST-agents"
                    try {
                        if (agentClient.pingService(3000L)) {
                            agentClient.getDiscoveryAgentService().uninventoryResource(resourceId);
                        } else {
                            LOG.warn(" Unable to inform agent [" + agentClient.getAgent().getName()
                                + "] of inventory removal for resource [" + resourceId
                                + "]. Agent can not be reached or is not accepting service requests.");
View Full Code Here

Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

            }

            AvailabilityReport report = null;

            // first, quickly see if we can even ping the agent, if not, don't bother trying to get the resource avail
            boolean agentPing = client.pingService(5000L);
            if (agentPing) {
                // we can't serialize the resource due to the hibernate proxies (agent can't deserialize hibernate objs)
                // but we know we only need the basics for the agent to collect availability, so create a bare resource object
                Resource bareResource = new Resource(res.getResourceKey(), res.getName(), res.getResourceType());
                bareResource.setId(res.getId());
View Full Code Here

Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

            //insert call to method doing logged in check and view resources perm check as method calld from GWT*Service
            agent = getAgentByResourceId(subject, resourceId);

            //now ping
            AgentClient client = getAgentClient(agent);
            pingResults = client.pingService(5000L);

        } catch (NoResultException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Failed to lookup agent for resource with ID of [" + resourceId + "] : " + e);
            }
View Full Code Here

Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

            boolean markResources = false;
            try {
                Agent nextAgent = agentManager.getAgentByID(nextAgentId);
                AgentClient agentClient = agentManager.getAgentClient(nextAgent);

                boolean couldPing = agentClient.pingService(2000); // see if agent is up for sending
                if (couldPing) {
                    Set<ResourceMeasurementScheduleRequest> requestsToSend = new HashSet<ResourceMeasurementScheduleRequest>(
                        agentRequests.values());
                    agentClient.getMeasurementAgentService().updateCollection(requestsToSend);
                } else {
View Full Code Here

Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

    private boolean sendUpdatedSchedulesToAgent(Agent agent,
        Set<ResourceMeasurementScheduleRequest> resourceMeasurementScheduleRequest) {
        try {
            AgentClient agentClient = LookupUtil.getAgentManager().getAgentClient(agent);
            if (!agentClient.pingService(2000)) {
                if (log.isDebugEnabled()) {
                    log.debug("Won't send MeasurementSchedules to offline Agent[id=" + agent.getId() + "]");
                }
                return false;
            }
View Full Code Here

Examples of org.rhq.enterprise.server.agentclient.AgentClient.pingService()

        try {
            agent = agentManager.getAgentClient(subjectManager.getOverlord(), resourceId);

            // since this method is usually called by the UI, we want to quickly determine if we can even talk to the agent
            if (agent.pingService(5000L)) {
                results = agent.getOperationAgentService().cancelOperation(jobIdString);

                InterruptedState interruptedState = results.getInterruptedState();

                switch (interruptedState) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.