com.adventnet.snmp.snmp2
Class SnmpTargetParamsEntry

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpTargetParamsEntry

public class SnmpTargetParamsEntry
extends java.lang.Object
implements java.io.Serializable

The SnmpTargetParamsEntry contains the SNMP target information to be used in the generation of SNMP messages.

See Also:
Serialized Form

Field Summary
(package private)  int paramsMPModel
           
(package private)  byte[] paramsName
           
(package private)  byte paramsSecModel
           
(package private)  byte paramsSecurityLevel
           
(package private)  int paramsSecurityModel
           
(package private)  byte[] paramsSecurityName
           
(package private)  int rowStatus
           
(package private)  int storageType
           
(package private) static byte USM_SECURITY_MODEL
           
 
Constructor Summary
SnmpTargetParamsEntry(byte[] paramsName)
          Constructs a new SnmpTargetParamsEntry with the specified paramsName.
SnmpTargetParamsEntry(byte[] paramsName, int paramsMPModel, int paramsSecurityModel, byte[] paramsSecurityName, byte paramsSecurityLevel, int storageType, int rowStatus)
          Constructs a new SnmpTargetParamsEntry with the specified paramsName, paramsMPModel, securitymodel, securityName, securityLevel, storageType and rowStatus.
 
Method Summary
 java.lang.Object getKey()
          Retrieve the hash key for this targetParamsEntry.
static java.lang.Object getKey(byte[] name)
          Retrieve the key for this targetParams object.
 int getParamsMPModel()
          Get the paramsMPModel associated with this object.
 byte[] getParamsName()
          Get the SnmpTargetParams name associated with this object.
 byte getParamsSecModel()
          Get the paramsSecurityModel associated with this object.
 byte getParamsSecurityLevel()
          Returns the paramsSecurityLevel associated with this object.
 int getParamsSecurityModel()
          Get the paramsSecurityModel associated with this object.
 byte[] getParamsSecurityName()
          Returns the paramsSecurityName associated with this object.
 int getRowStatus()
          Gets the row status associated with this object.
 int getStorageType()
          Gets the storage type that is associated with this object.
(package private) static int hash(byte[] name)
           
 int hashCode()
          The hash code used for maintaing the targetParams entries.
 void setParamsMPModel(int model)
          Set the paramsMPModel associated with this object.
 void setParamsSecurityLevel(byte level)
          Set the paramsSecurityLevel associated with this object.
 void setParamsSecurityModel(int model)
          Set the paramsSecurityModel associated with this object.
 void setParamsSecurityName(byte[] name)
          Set the paramsSecurityName associated with this object.
 void setRowStatus(int status)
          Sets the row status for this object.
 void setStorageType(int type)
          Sets the storage type associated with this object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USM_SECURITY_MODEL

static byte USM_SECURITY_MODEL

paramsName

byte[] paramsName

storageType

int storageType

rowStatus

int rowStatus

paramsSecurityModel

int paramsSecurityModel

paramsMPModel

int paramsMPModel

paramsSecModel

byte paramsSecModel

paramsSecurityName

byte[] paramsSecurityName

paramsSecurityLevel

byte paramsSecurityLevel
Constructor Detail

SnmpTargetParamsEntry

public SnmpTargetParamsEntry(byte[] paramsName)
Constructs a new SnmpTargetParamsEntry with the specified paramsName.
Parameters:
paramsName - The SnmpTargetParamsName used for creating a new entry.

SnmpTargetParamsEntry

public SnmpTargetParamsEntry(byte[] paramsName,
                             int paramsMPModel,
                             int paramsSecurityModel,
                             byte[] paramsSecurityName,
                             byte paramsSecurityLevel,
                             int storageType,
                             int rowStatus)
Constructs a new SnmpTargetParamsEntry with the specified paramsName, paramsMPModel, securitymodel, securityName, securityLevel, storageType and rowStatus.
Parameters:
paramsName - The SnmpTargetParamsName used for creating a new entry.
paramsMPModel - The paramsMPModel usee to create this entry.
paramsSecurityModel - the securityModel of this entry.
paramsSecurityName - the securityName of this entry.
paramsSecurityLevel - the securityLevel of this entry.
storateType - the storage type of this entry.
rowStatus - the rowStatus for this entry.
Throws:
java.lang.NullPointerException - This constructor will throw a NullPointerException if the paramsName or the paramsSecurityName is null.
java.lang.IllegalArgumentException - This exception will be thrown for the following reasons:
1. If the paramsMPModel is other than SnmpAPI.SNMP_VERSION_1 or SnmpAPI.SNMP_VERSION_2C or SnmpAPI.SNMP_VERSION_3.
2. If the paramsSecurityModel is lesser than or equal to zero.
3. If the paramsSecurityLevel is other than Snmp3Message.NO_AUTH_NO_PRIV or Snmp3Message.AUTH_NO_PRIV or Snmp3Message.AUTH_PRIV.
4. If the storage type is other than SnmpAPI.OTHER or SnmpAPI.VOLATILE or SnmpAPI.NONVOLATILE or SnmpAPI.PERMANENT or SnmpAPI.READONLY.
5. If the rowStatus value is other than SnmpAPI.ACTIVE or or SnmpAPI.NOT_IN_SERVICE or SnmpAPI.NOT_READY or SnmpAPI.CREATE_AND_GO or SnmpAPI.CREATE_AND_WAIT or SnmpAPI.DESTROY.

Method Detail

getParamsName

public byte[] getParamsName()
Get the SnmpTargetParams name associated with this object. The paramsName is a uniquie identifier associated with the SnmpTargetParamsEntry.
Returns:
the targetParamsName associated with this object.

getParamsMPModel

public int getParamsMPModel()
Get the paramsMPModel associated with this object. This parameter is the message processing model used when generating SNMP messages. The value is one of the SnmpVersions defined in SnmpAPI.
Returns:
the paramsMPModel associated with this object.

setParamsMPModel

public void setParamsMPModel(int model)
Set the paramsMPModel associated with this object. This parameter is the message processing model used when generating SNMP messages. The value should be one of the SnmpVersions defined in SnmpAPI. If the value to be set is other than the one defined in SnmpAPI, then SnmpV1 message processing model is assumed.
Parameters:
model - The message processing model used when generating SNMP messages.

getParamsSecModel

public byte getParamsSecModel()
Get the paramsSecurityModel associated with this object. This parameter is the security model used when generating SNMP messages.
Returns:
the paramsSecurityModel associated with this object.

getParamsSecurityModel

public int getParamsSecurityModel()
Get the paramsSecurityModel associated with this object. This parameter is the security model used when generating SNMP messages.
Returns:
the paramsSecurityModel associated with this object.

setParamsSecurityModel

public void setParamsSecurityModel(int model)
Set the paramsSecurityModel associated with this object. This parameter is the security model used when generating SNMP messages.
Parameters:
model - The security model used when generating SNMP messages.

getParamsSecurityName

public byte[] getParamsSecurityName()
Returns the paramsSecurityName associated with this object. This parameter represents the securityName which identifies the Principal on whose behalf SNMP messages will be generated.
Returns:
the the securityName which identifies the Principal on whose behalf SNMP messages will be generated.
Throws:
java.lang.NullPointerException - if the paramsSecurityName is null.

setParamsSecurityName

public void setParamsSecurityName(byte[] name)
Set the paramsSecurityName associated with this object. This parameter represents the securityName which identifies the Principal on whose behalf SNMP messages will be generated.
Parameters:
name - the securityName which identifies the Principal on whose behalf SNMP messages will be generated.

getParamsSecurityLevel

public byte getParamsSecurityLevel()
Returns the paramsSecurityLevel associated with this object. This parameter specifies the level of security to be used when generating SNMP messages.
Returns:
the level of security to be used when generating SNMP messages.

setParamsSecurityLevel

public void setParamsSecurityLevel(byte level)
Set the paramsSecurityLevel associated with this object. This parameter specifies the level of security to be used when generating SNMP messages.
Parameters:
level - The level of security to be used when generating SNMP messages.

setStorageType

public void setStorageType(int type)
Sets the storage type associated with this object.
Parameters:
type - The storage type that is to be associated with this object.

getStorageType

public int getStorageType()
Gets the storage type that is associated with this object.
Returns:
The storage type that is associated with this object.

setRowStatus

public void setRowStatus(int status)
Sets the row status for this object.
Parameters:
status - The row status to be set for this object.

getRowStatus

public int getRowStatus()
Gets the row status associated with this object.
Returns:
The row status associated with this object.

getKey

public java.lang.Object getKey()
Retrieve the hash key for this targetParamsEntry.
Returns:
the hash key as a String Object.
Throws:
java.lang.NullPointerException - if the paramsName is null.

hashCode

public int hashCode()
The hash code used for maintaing the targetParams entries. The API users need not call this method directly.
Overrides:
hashCode in class java.lang.Object
Returns:
hashCode for the key.

getKey

public static java.lang.Object getKey(byte[] name)
Retrieve the key for this targetParams object.
Returns:
The key as a String Object.
Throws:
java.lang.NullPointerException - if the name is null.

hash

static int hash(byte[] name)