AdventNet Web NMS 4 API Specification

com.adventnet.management.config.snmp
Class SnmpDevice

java.lang.Object
  |
  +--com.adventnet.management.config.xml.BaseElement
        |
        +--com.adventnet.management.config.xml.Device
              |
              +--com.adventnet.management.config.snmp.SnmpDevice
All Implemented Interfaces:
java.io.Serializable

public class SnmpDevice
extends Device

This class holds SNMP Specific properties like community, version .. for configuring SNMP Devices.

See Also:
Serialized Form

Fields inherited from class com.adventnet.management.config.xml.BaseElement
element, isServer
 
Constructor Summary
SnmpDevice()
          Creates a SnmpDevice with localhost as hostname and 161 as snmp port.
SnmpDevice(Device device)
          Constructs a SnmpDevice from Device's Element.
SnmpDevice(java.lang.String host, java.lang.String port)
          Constructor to create a SnmpDevice with host and port as parameters.
SnmpDevice(java.lang.String host, java.lang.String port, java.lang.String community)
          Constructor to create a SnmpDevice with host,port and community as parameters.
SnmpDevice(java.lang.String host, java.lang.String port, java.lang.String community, java.lang.String version)
          Constructor to create an SnmpDevice with host,port, community and version as parameters.
SnmpDevice(java.lang.String host, java.lang.String port, java.lang.String community, java.lang.String version, int retries, int timeout)
          Constructor to create a SnmpDevice with host, port, community ,version , retries and timeout as parameters.
 
Method Summary
 java.lang.String getAuthPassword()
          Returns the authpassword as string in v3 requests.
 java.lang.String getAuthProtocol()
          Returns the auth protocol as string in v3 requests.
 java.lang.String getCommunity()
          Returns the community as string.
 java.lang.String getContextID()
          Returns the contextid.
 java.lang.String getContextName()
          Returns the context name.
 java.lang.String getMaxRepetitions()
          Returns the max-repetitions for get bulk operation as string.
 java.lang.String getNonRepeaters()
          Get the non-repeaters for get bulk operation as string.
 java.lang.String getPrivPassword()
          Returns the privpassword as string in v3 requests.
 java.lang.String getReadCommunity()
          Returns the readCommunity
 java.lang.String getUserName()
          Returns the principal on whose behalf SNMPv3 requests are made.
 java.lang.String getVersion()
          Returns the Snmp Version.
 void setAuthPassword(java.lang.String apw)
          Sets the authpassword as string in v3 requests.
 void setAuthProtocol(java.lang.String ap)
          Sets the auth protocol as string in v3 requests.
 void setCommunity(java.lang.String community)
          Sets the community as string.
 void setContextID(java.lang.String cid)
          Sets the contextid.
 void setContextName(java.lang.String contextname)
          Sets the context name.
 void setMaxRepetitions(java.lang.String mr)
          Sets the max-repetitions for get bulk operation as string.
 void setNonRepeaters(java.lang.String nr)
          Sets the non-repeaters for get bulk operation as string.
 void setPrivPassword(java.lang.String ppw)
          Sets the privpasswd as string in v3 requests.
 void setReadCommunity(java.lang.String rCommunity)
          Sets the readCommunity
 void setUserName(java.lang.String username)
          Sets the principal on whose behalf SNMPv3 requests are to be made.
 void setVersion(java.lang.String version)
          Sets the Snmp version.
 
Methods inherited from class com.adventnet.management.config.xml.Device
getDeviceName, getMOName, getPort, getRetries, getTimeout, setMOName, setRetries, setTimeout
 
Methods inherited from class com.adventnet.management.config.xml.BaseElement
addSubTag, getAttribute, getElement, getProperties, getSubTagsByName, hasAttribute, removeSubTagsByName, setAttribute, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpDevice

public SnmpDevice()
Creates a SnmpDevice with localhost as hostname and 161 as snmp port.

SnmpDevice

public SnmpDevice(Device device)
Constructs a SnmpDevice from Device's Element.

SnmpDevice

public SnmpDevice(java.lang.String host,
                  java.lang.String port)
Constructor to create a SnmpDevice with host and port as parameters.
Parameters:
host - name of the device where the SNMP configuration has to be done.
port - port where SNMP Agent is running.

SnmpDevice

public SnmpDevice(java.lang.String host,
                  java.lang.String port,
                  java.lang.String community)
Constructor to create a SnmpDevice with host,port and community as parameters.
Parameters:
host - name of the device where the SNMP configuration has to be done.
port - port where SNMP Agent is running.
community - name of the community for SET and GET operations.

SnmpDevice

public SnmpDevice(java.lang.String host,
                  java.lang.String port,
                  java.lang.String community,
                  java.lang.String version)
Constructor to create an SnmpDevice with host,port, community and version as parameters.
Parameters:
host - name of the device where the SNMP configuration has to be done.
port - port where SNMP Agent is running.
community - name of the community for SET and GET Operations
version - version of the SNMP Protocol.
See Also:
SnmpAttributeConstants

SnmpDevice

public SnmpDevice(java.lang.String host,
                  java.lang.String port,
                  java.lang.String community,
                  java.lang.String version,
                  int retries,
                  int timeout)
Constructor to create a SnmpDevice with host, port, community ,version , retries and timeout as parameters.
Parameters:
host - name of the device where the SNMP configuration has to be done.
port - port where SNMP Agent is running.
community - name of the community for SET and GET operations.
version - version of the SNMP Protocol.
retries - number of retries to be carried out by ConfigServer if configuration fails for this device.
timeout - timeout in milliseconds.
See Also:
SnmpAttributeConstants
Method Detail

getVersion

public java.lang.String getVersion()
Returns the Snmp Version.
Returns:
version of the protocol.
See Also:
SnmpAttributeConstants

setVersion

public void setVersion(java.lang.String version)
Sets the Snmp version.
Parameters:
version - the version of the SNMP Protocol.
See Also:
SnmpAttributeConstants

setCommunity

public void setCommunity(java.lang.String community)
Sets the community as string.
Parameters:
community - name of the community for the particular agent for doing SNMP SET and GET operations.

getCommunity

public java.lang.String getCommunity()
Returns the community as string.
Returns:
the community of the SNMP agent.

setUserName

public void setUserName(java.lang.String username)
Sets the principal on whose behalf SNMPv3 requests are to be made. While sending a SNMPv3 request this userName has to be set.
Parameters:
name - the principal on whose behalf, SNMPv3 requests are to be sent.

getUserName

public java.lang.String getUserName()
Returns the principal on whose behalf SNMPv3 requests are made.
Returns:
the principal on whose behalf, SNMPv3 requests are sent.

setContextName

public void setContextName(java.lang.String contextname)
Sets the context name.
Parameters:
name - the contextName to be sent .

getContextName

public java.lang.String getContextName()
Returns the context name.
Returns:
the context name .

setContextID

public void setContextID(java.lang.String cid)
Sets the contextid. This will be taken into account only for v3 request.
Parameters:
cid - the context name

getContextID

public java.lang.String getContextID()
Returns the contextid. This will be taken into account only for v3 request.
Returns:
the context id of the request to be made.

setMaxRepetitions

public void setMaxRepetitions(java.lang.String mr)
Sets the max-repetitions for get bulk operation as string.
Parameters:
mr - the max-repetitions value for v2c and v3 requests.

getMaxRepetitions

public java.lang.String getMaxRepetitions()
Returns the max-repetitions for get bulk operation as string.
Returns:
the max-repetitions value for v2c and v3 requests.

setNonRepeaters

public void setNonRepeaters(java.lang.String nr)
Sets the non-repeaters for get bulk operation as string.
Parameters:
nr - the non-repeaters value for v2c and v3 requests.

getNonRepeaters

public java.lang.String getNonRepeaters()
Get the non-repeaters for get bulk operation as string.
Returns:
the non-repeaters value for v2c and v3 requests.

setAuthProtocol

public void setAuthProtocol(java.lang.String ap)
Sets the auth protocol as string in v3 requests.
Parameters:
ap - the value may be "NOAUTH" or "SHA" or "MD5"

getAuthProtocol

public java.lang.String getAuthProtocol()
Returns the auth protocol as string in v3 requests.
Returns:
the type of auth protocol that value may be "NOAUTH" or "SHA" or "MD5"

setAuthPassword

public void setAuthPassword(java.lang.String apw)
Sets the authpassword as string in v3 requests.
Parameters:
apw - the auth password

getAuthPassword

public java.lang.String getAuthPassword()
Returns the authpassword as string in v3 requests.
Returns:
the auth password.

setPrivPassword

public void setPrivPassword(java.lang.String ppw)
Sets the privpasswd as string in v3 requests.
Parameters:
ppw - the priv password

getPrivPassword

public java.lang.String getPrivPassword()
Returns the privpassword as string in v3 requests.
Returns:
the priv password.

setReadCommunity

public void setReadCommunity(java.lang.String rCommunity)
Sets the readCommunity

getReadCommunity

public java.lang.String getReadCommunity()
Returns the readCommunity

AdventNet Web NMS 4 API Specification