Package org.netxms.client.snmp
Class SnmpAgentConfiguration
java.lang.Object
org.netxms.client.snmp.SnmpAgentConfiguration
Configuration of additional SNMP agent on a node - alternative SNMP endpoint with its own port,
credentials, and optionally IP address, referenced by name from data collection items.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SnmpAgentConfiguration(NXCPMessage msg, long baseId) Create agent configuration from data in NXCP message.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg, long baseId) Fill NXCP message with agent configuration data.Get IP address of the agent.intGet authentication object (community string for SNMP v1/v2c or user name for SNMP v3).getName()intgetPort()intvoidsetAddress(InetAddress address) Set IP address of the agent.voidsetAuthMethod(int authMethod) voidsetAuthName(String authName) voidsetAuthPassword(String authPassword) voidsetContextName(String contextName) voidvoidsetPort(int port) voidsetPrivMethod(int privMethod) voidsetPrivPassword(String privPassword) voidsetVersion(SnmpVersion version)
-
Constructor Details
-
SnmpAgentConfiguration
public SnmpAgentConfiguration()Default constructor. -
SnmpAgentConfiguration
Copy constructor.- Parameters:
src- source object
-
SnmpAgentConfiguration
Create agent configuration from data in NXCP message.- Parameters:
msg- NXCP messagebaseId- base field ID
-
-
Method Details
-
fillMessage
Fill NXCP message with agent configuration data.- Parameters:
msg- NXCP messagebaseId- base field ID
-
getName
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
getAddress
Get IP address of the agent. Null means node's primary IP address.- Returns:
- IP address of the agent or null
-
setAddress
Set IP address of the agent. Null means node's primary IP address.- Parameters:
address- IP address of the agent or null
-
getPort
public int getPort()- Returns:
- the port
-
setPort
public void setPort(int port) - Parameters:
port- the port to set
-
getVersion
- Returns:
- the version
-
setVersion
- Parameters:
version- the version to set
-
getAuthName
Get authentication object (community string for SNMP v1/v2c or user name for SNMP v3).- Returns:
- the authName
-
setAuthName
- Parameters:
authName- the authName to set
-
getAuthPassword
- Returns:
- the authPassword
-
setAuthPassword
- Parameters:
authPassword- the authPassword to set
-
getPrivPassword
- Returns:
- the privPassword
-
setPrivPassword
- Parameters:
privPassword- the privPassword to set
-
getAuthMethod
public int getAuthMethod()- Returns:
- the authMethod
-
setAuthMethod
public void setAuthMethod(int authMethod) - Parameters:
authMethod- the authMethod to set
-
getPrivMethod
public int getPrivMethod()- Returns:
- the privMethod
-
setPrivMethod
public void setPrivMethod(int privMethod) - Parameters:
privMethod- the privMethod to set
-
getContextName
- Returns:
- the contextName
-
setContextName
- Parameters:
contextName- the contextName to set
-