|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AgentManagerLocal
Local interface to the AgentManagerBean SLSB.
| Method Summary | |
|---|---|
void |
agentIsAlive(org.rhq.core.domain.resource.Agent agent)
This method should only be called when it is confirmed that an agent is alive. |
void |
agentIsShuttingDown(String agentName)
This method is called whenever an agent is going down. |
void |
checkForSuspectAgents()
Call this method to see if there are agents that we might suspect are down. |
void |
createAgent(org.rhq.core.domain.resource.Agent agent)
Persists a new agent. |
void |
deleteAgent(org.rhq.core.domain.resource.Agent agent)
Deletes an existing agent. |
org.rhq.core.domain.resource.Agent |
getAgentByAddressAndPort(String address,
int port)
Given an agent's address and port, this will look up and return the Agent associated with that address
and port. |
org.rhq.core.domain.resource.Agent |
getAgentByAgentToken(String token)
Given an agent token string, this will look up and return the Agent associated with that token. |
org.rhq.core.domain.resource.Agent |
getAgentByID(int agentId)
Given an agent id, this will look up and return the Agent with that id. |
org.rhq.core.domain.resource.Agent |
getAgentByName(String agentName)
Given an agent name, this will look up and return the Agent with that name. |
org.rhq.core.domain.resource.Agent |
getAgentByResourceId(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Given a resource ID, this will return the agent responsible for servicing that resource. |
AgentClient |
getAgentClient(org.rhq.core.domain.resource.Agent agent)
Returns an agent client that can be used to send commands to the specified JON agent. |
AgentClient |
getAgentClient(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Returns an agent client that can be used to send commands to the JON agent that managed the specified resource. |
int |
getAgentCount()
Returns the total number of agents that are in inventory. |
File |
getAgentDownloadDir()
The directory on the server's file system where the agent update version file and binary file are found. |
Integer |
getAgentIdByName(String agentName)
Given an agent name, this will return the agent id. |
Integer |
getAgentIdByResourceId(int resourceId)
Given a resource ID, this will return the agent id responsible for servicing that resource. |
Integer |
getAgentIdByScheduleId(int scheduleId)
Given a schedule ID, this will return the agent responsible for servicing that scheduleId. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Agent> |
getAgentsByServer(org.rhq.core.domain.auth.Subject subject,
Integer serverId,
org.rhq.core.domain.util.PageControl pageControl)
Returns a collection of paged agents, filtered by Server (if non-null). |
File |
getAgentUpdateBinaryFile()
Returns the path on the server's file system where the agent update binary is found. |
File |
getAgentUpdateVersionFile()
Returns the path on the server's file system where the agent update version file is found. |
Properties |
getAgentUpdateVersionFileContent()
Returns the content of the agent update version file, which simply consists of some name/value pairs. |
List<org.rhq.core.domain.resource.Agent> |
getAllAgents()
Returns a collection of all agents currently in inventory. |
boolean |
isAgentBackfilled(int agentId)
Returns true if the agent is "suspect" and has been backfilled. |
boolean |
isAgentVersionSupported(AgentVersion agentVersion)
Determines if the given agent version is supported by this server. |
Boolean |
pingAgentByResourceId(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Returns true indicating successful ping of agent. |
void |
setAgentBackfilled(int agentId,
boolean backfilled)
|
org.rhq.core.domain.resource.Agent |
updateAgent(org.rhq.core.domain.resource.Agent agent)
Updates an existing agent. |
| Method Detail |
|---|
void createAgent(org.rhq.core.domain.resource.Agent agent)
agent - org.rhq.core.domain.resource.Agent updateAgent(org.rhq.core.domain.resource.Agent agent)
agent - the agent to be updated, with the new data in it
void deleteAgent(org.rhq.core.domain.resource.Agent agent)
agent -
@NotNull
AgentClient getAgentClient(@NotNull
org.rhq.core.domain.resource.Agent agent)
agent - a JON agent
@NotNull
AgentClient getAgentClient(org.rhq.core.domain.auth.Subject subject,
int resourceId)
resourceId - the ID of the resource whose agent is to be returned
List<org.rhq.core.domain.resource.Agent> getAllAgents()
org.rhq.core.domain.util.PageList<org.rhq.core.domain.resource.Agent> getAgentsByServer(org.rhq.core.domain.auth.Subject subject,
Integer serverId,
org.rhq.core.domain.util.PageControl pageControl)
serverId - the server to filter the agent list by. pass null to view unfiltered results.
int getAgentCount()
org.rhq.core.domain.resource.Agent getAgentByName(String agentName)
Agent with that name. If no agent with the given
name exists, null is returned.
agentName -
null if there is no agent with the given nameorg.rhq.core.domain.resource.Agent getAgentByID(int agentId)
Agent with that id. If no agent with the given
name exists, null is returned.
agentId -
null if there is no agent with the given idorg.rhq.core.domain.resource.Agent getAgentByAgentToken(String token)
Agent associated with that token. If the
given token is invalid, null is returned.
token - the agent token
null if there is no agent with the
given token
org.rhq.core.domain.resource.Agent getAgentByAddressAndPort(String address,
int port)
Agent associated with that address
and port. If no agent is found, null is returned.
address - the address that the agent is bound toport - the port at the given address that the agent is listening on
null if there is no agent with the
given token
org.rhq.core.domain.resource.Agent getAgentByResourceId(org.rhq.core.domain.auth.Subject subject,
int resourceId)
subject - resourceId -
null if the resource ID was invalidInteger getAgentIdByResourceId(int resourceId)
resourceId -
null if the resource ID was invalidInteger getAgentIdByName(String agentName)
agentName -
null if there is no agent with the given nameInteger getAgentIdByScheduleId(int scheduleId)
scheduleId -
null if the schedule ID was invalidvoid agentIsShuttingDown(String agentName)
This will usually be triggered when an agent explicitly tells us that it is shutting down. See
CoreServerService.agentIsShuttingDown(String).
agentName - the name of the agent that is going downvoid agentIsAlive(org.rhq.core.domain.resource.Agent agent)
agent - the agent that is confirmed alive and wellvoid checkForSuspectAgents()
CheckForSuspectedAgentsJob.
boolean isAgentVersionSupported(AgentVersion agentVersion)
true if this server can talk to any agent of the given version.
agentVersion - the version of the agent to verify
true if this server can support an agent with the given version; if the server
knows it cannot communicate successfully with an agent of that version, false
will be returned
File getAgentUpdateVersionFile()
throws Exception
Exception - if the file could not be created or found
Properties getAgentUpdateVersionFileContent()
throws Exception
Exception - if cannot read the agent update version file
File getAgentUpdateBinaryFile()
throws Exception
Exception - if the binary file does not exist
File getAgentDownloadDir()
throws Exception
Exception - if could not determine the location or it does not exist
void setAgentBackfilled(int agentId,
boolean backfilled)
boolean isAgentBackfilled(int agentId)
true if the agent is "suspect" and has been backfilled. A "suspect agent" means one that the
server suspects is down. When an agent is suspect, all of its resources, including the platform, will be
backfilled with DOWN availabilities.
agentId - the id of the agent
true if the agent is a suspect agent and has been backfilled
Boolean pingAgentByResourceId(org.rhq.core.domain.auth.Subject subject,
int resourceId)
true indicating successful ping of agent. Exposed so server could
initiate N requests so gwt clients wont face Single Origin Policy issues.
agentId - the id of the agent
true if the agent was successfully pinged.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||