public class AgentRegistrationRequest extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
SYSPROP_INSTALL_ID |
| Constructor and Description |
|---|
AgentRegistrationRequest(String name,
String address,
int port,
String remoteEndpoint,
boolean regenerateTokenFlag,
String originalToken,
AgentVersion agentVersion,
String installId,
String installLocation)
Creates a new
AgentRegistrationRequest object. |
| Modifier and Type | Method and Description |
|---|---|
String |
getAddress()
Returns the address that the agent is bound to in which it listens for requests.
|
AgentVersion |
getAgentVersion()
Returns the information that identifies the version of the agent asking to be registered.
|
String |
getInstallId()
If the agent was given an install ID at startup, this is that ID.
|
String |
getInstallLocation()
Returns the location of the agent install.
|
String |
getName()
Returns the name that the agent is to be known as.
|
String |
getOriginalToken()
Returns the agent's original token, as it was known to the agent.
|
int |
getPort()
Returns the port that the agent is listening to.
|
boolean |
getRegenerateToken()
Returns
true if the agent should be given a new token, even if the agent already has a token. |
String |
getRemoteEndpoint()
Returns the remote endpoint string that fully describes how to connect to the agent.
|
String |
toString() |
public static final String SYSPROP_INSTALL_ID
public AgentRegistrationRequest(String name, String address, int port, String remoteEndpoint, boolean regenerateTokenFlag, String originalToken, AgentVersion agentVersion, String installId, String installLocation)
AgentRegistrationRequest object. Note that address and port must
be specified, even though remoteEndpoint might also encode address and port. The
originalToken may be null even if the agent was already registered (this can happen in the
case if the token file was deleted on the agent machine; or if the agent was reinstalled which caused the loss of
the token). The version information helps the server determine if this agent is obsolete or not.name - unique name of the agent; usually just the address, but doesn't have to
beaddress - the address that the agent is listening toport - the port that the agent is listening toremoteEndpoint - the full remote endpoint string that the agent wants the server to use to connect to
the agentregenerateTokenFlag - if true, the agent will be assigned a new token. If false
and the agent already exists, its current token is returned.originalToken - the agent's original token, if this is a re-registration (may be null)agentVersion - the agent's version informationinstallId - if the agent was started with an install id, its value is passed here; otherwise, nullinstallLocation - location where the agent is installed - could be null if its not known or not applicablepublic String getName()
address, but technically this does not have to be
so. An agent name can be any string, so long as it is globally unique across all agents.public String getAddress()
public int getPort()
public String getRemoteEndpoint()
address and port values.public String getOriginalToken()
null if the agent was
never registered before or the agent lost its token.nullpublic boolean getRegenerateToken()
true if the agent should be given a new token, even if the agent already has a token. If
false, and the agent is already registered, the agent will keep its old token. This allows an agent
that already exists to request a new token, effectively invalidating the old token.public AgentVersion getAgentVersion()
public String getInstallId()
public String getInstallLocation()
public String toString()
toString in class ObjectObject.toString()Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.