|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hyperic.hq.agent.client.AgentConnection
public class AgentConnection
The object which represents the connection between the client and the Agent. It holds Agent contact information, and may perform connection caching.
Constructor Summary | |
---|---|
AgentConnection(java.lang.String agentAddress,
int agentPort)
Create a connection to an Agent with the specified address and port. |
Method Summary | |
---|---|
void |
closeSocket()
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getAgentAddress()
|
int |
getAgentPort()
|
AgentRemoteValue |
getCommandResult(AgentStreamPair inStreamPair)
Get the result of command execution from the remote command handler. |
protected java.net.Socket |
getSocket()
|
int |
hashCode()
|
AgentRemoteValue |
sendCommand(java.lang.String cmdName,
int cmdVersion,
AgentRemoteValue arg)
Send a command to the remote Agent. |
AgentStreamPair |
sendCommandHeaders(java.lang.String cmdName,
int cmdVersion,
AgentRemoteValue arg)
Send the command to the agent, not waiting for it to process the result. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AgentConnection(java.lang.String agentAddress, int agentPort)
agentAddress
- IP address of the AgentagentPort
- Port the Agent is listening onMethod Detail |
---|
public java.lang.String getAgentAddress()
public int getAgentPort()
protected java.net.Socket getSocket() throws AgentConnectionException
AgentConnectionException
public AgentRemoteValue sendCommand(java.lang.String cmdName, int cmdVersion, AgentRemoteValue arg) throws AgentRemoteException, AgentConnectionException
cmdName
- Name of the remote method to executecmdVersion
- API version number belonging to the commandarg
- Argument to send to the remote method
AgentRemoteException
- indicating an error invoking the method.
AgentConnectionException
- indicating a failure to connect to, or
communicate with the agent.public AgentStreamPair sendCommandHeaders(java.lang.String cmdName, int cmdVersion, AgentRemoteValue arg) throws AgentConnectionException
cmdName
- Name of the remote method to executecmdVersion
- API version number belonging to the commandarg
- Argument to send to the remote method
AgentConnectionException
- indicating a failure to connect to, or
communicate with the agent.public AgentRemoteValue getCommandResult(AgentStreamPair inStreamPair) throws AgentRemoteException, AgentConnectionException
inStreamPair
- The pair which was returned from the associated
sendCommandHeaders invocation.
AgentRemoteException
- indicating an error invoking the method.
AgentConnectionException
- indicating a failure to communicate
with the agent.public void closeSocket()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
Hyperic HQ Plugin API v. 4.4.0.2 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |