com.adventnet.snmp.snmp2
Class SnmpTargetAddrEntry

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.SnmpTargetAddrEntry
All Implemented Interfaces:
java.io.Serializable

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

v3 only The SnmpTargetAddrEntry holds the transport address to be used in the generation of SNMP message.

See Also:
Serialized Form

Constructor Summary
SnmpTargetAddrEntry(byte[] addrName)
          Constructs a new SnmpTargetAddrEntry with the specified targetAddrName.
SnmpTargetAddrEntry(byte[] targetAddrName, byte targetAddrTDomain, int[] tAddrTDomain, byte[] targetAddrTAddress, java.lang.String tagList, int storateType, int rowStatus)
          Constructs a new SnmpTargetAddrEntry with the specified targetAddrName, targetAddrTDomain, tAddrTDomain, targetAddrTAddress, tagList, storageType and rowStatus.
 
Method Summary
 boolean addTagValue(byte[] tagValue)
          Adds the specified tag value to the tag list.
 java.lang.Object getKey()
          Retrieve the hash key for this targetAddrEntry.
static java.lang.Object getKey(byte[] name)
          Retrieve the key for this targetAddr object.
 int getRowStatus()
          Retrieve the rowStatus value associated with this object.
 java.util.Vector getSnmpTagList()
          Returns a vector of snmpTag Values.
 int getSpinLock()
          Gets the spinLock value associated with this object.
 int getStorageType()
          Retrieve the storageType value associated with this object.
 java.lang.String getTagList()
          Gets the SnmpTagList that is associated with this object.
 int[] getTargetAddressTDomain()
          Get the targetAddrTDomain associated with this object.
 byte[] getTargetAddrName()
          Get the targetAddrName associated with this object.
 SnmpTargetParamsEntry getTargetAddrParams()
          Get the SnmpTargetParamsEntry associated with this object.
 int getTargetAddrRetryCount()
          Get the retry count associated with this object.
 byte[] getTargetAddrTAddress()
          Retrive the targetAddrTAddress value associated with this object.
 byte getTargetAddrTDomain()
          Get the targetAddrTDomain associated with this object.
 int getTargetAddrTimeout()
          Retrive the time out value associated with this object.
 java.lang.String getTargetHost()
          Retrive the targetHost value associated with this object.
 int getTargetPort()
          Retrive the targetPort value associated with this object.
 int hashCode()
          The hash code used for maintaing the targetAddr entries.
 void removeTagValue(byte[] tagValue)
          Removes the specified tag from the tag list.
 void setRowStatus(int rowStat)
          Sets the rowStatus value corresponding to this Object.
 void setSpinLock(int lockVal)
          Sets the spinLock value associated with this object.
 void setStorageType(int type)
          Sets the storageType value corresponding to this Object.
 void setTagList(java.lang.String tag)
          Sets the specified tag to the tagList.
 void setTargetAddressTDomain(int[] tDomain)
          Set the targetAddrTDomain associated with this object.
 void setTargetAddrParams(SnmpTargetParamsEntry params)
          Set the SnmpTargetParamsEntry associated with this object.
 void setTargetAddrRetryCount(int retry)
          Set the retry count associated with this object.
 void setTargetAddrTAddress(byte[] address)
          Set the targetAddrTAddress value associated with this object.
 void setTargetAddrTDomain(byte domain)
          Set the targetAddrTDomain associated with this object.
 void setTargetAddrTimeout(int timeout)
          Set the time out value associated with this object.
 void setTargetHost(java.lang.String address)
          set the targetHost value associated with this object.
 void setTargetPort(int port)
          Set the targetPort value associated with this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnmpTargetAddrEntry

public SnmpTargetAddrEntry(byte[] addrName)
Constructs a new SnmpTargetAddrEntry with the specified targetAddrName.

Parameters:
addrName - The targetAddrName to be used for creating a new SnmpTargetAddrEntry.

SnmpTargetAddrEntry

public SnmpTargetAddrEntry(byte[] targetAddrName,
                           byte targetAddrTDomain,
                           int[] tAddrTDomain,
                           byte[] targetAddrTAddress,
                           java.lang.String tagList,
                           int storateType,
                           int rowStatus)
Constructs a new SnmpTargetAddrEntry with the specified targetAddrName, targetAddrTDomain, tAddrTDomain, targetAddrTAddress, tagList, storageType and rowStatus.

Parameters:
targetAddrName - The targetAddrName to be used for creating a new SnmpTargetAddrEntry.
targetAddrTDomain - The address domain for this SnmpTargetAddrEntry.
tAddrTDomain - The TargetAddressTDomain for this SnmpTargetAddrEntry.
tagList - The tagList for this SnmpTargetAddrEntry.
rowStatus - The rowStatus for this SnmpTargetAddrEntry.
Throws:
java.lang.NullPointerException - This constructor will throw a NullPointerException if targetAddrName or tAddrTDomain or targetAddrTAddress or tagList is null.
java.lang.IllegalArgumentException - This constructor will throw IllegalArguementException if any of the following conditions is true:
1. If the targetAddrTAddress' length is not equal to 6.
2. If the storage type is other than SnmpAPI.OTHER or SnmpAPI.VOLATILE or SnmpAPI.NONVOLATILE or SnmpAPI.PERMANENT or SnmpAPI.READONLY.
3. 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

getTargetAddrName

public byte[] getTargetAddrName()
Get the targetAddrName associated with this object.

Returns:
the targetAddrName associated with this object.

getTargetAddrTDomain

public byte getTargetAddrTDomain()
Get the targetAddrTDomain associated with this object. This parameter indicates the transport type of the address contained in the targetAddrTAddress which is maintained by this object.

Returns:
the targetAddrTDomain associated with this object.

setTargetAddrTDomain

public void setTargetAddrTDomain(byte domain)
Set the targetAddrTDomain associated with this object. This parameter indicates the transport type of the address contained in the targetAddrTAddress which is maintained by this object.


getTargetAddressTDomain

public int[] getTargetAddressTDomain()
Get the targetAddrTDomain associated with this object. This parameter indicates the transport type of the address contained in the targetAddrTAddress which is maintained by this object.

Returns:
the targetAddrTDomain associated with this object.

setTargetAddressTDomain

public void setTargetAddressTDomain(int[] tDomain)
Set the targetAddrTDomain associated with this object. This parameter indicates the transport type of the address contained in the targetAddrTAddress which is maintained by this object.


getTargetAddrTAddress

public byte[] getTargetAddrTAddress()
Retrive the targetAddrTAddress value associated with this object. This parameter represents the transport address. Right now only SnmpUDPAddress is supported. The first four octets contains the ipAddress. The next two octets contains the UDP port.

Returns:
the targetAddrTDomain value associated with this object.

setTargetAddrTAddress

public void setTargetAddrTAddress(byte[] address)
Set the targetAddrTAddress value associated with this object. This parameter represents the transport address. Right now only SnmpUDPAddress is supported. The first four octets should contain the ipAddress. The next two octets should contain the UDP port.

Parameters:
address - The targetAddrTAddress value associated with this object.

getTargetHost

public java.lang.String getTargetHost()
Retrive the targetHost value associated with this object. This represents the host in the transport Address.

Returns:
the targetHost value associated with this object.

setTargetHost

public void setTargetHost(java.lang.String address)
set the targetHost value associated with this object. This represents the host in the transport Address.

Parameters:
address - The targetHost value to be associated with this object.

getTargetPort

public int getTargetPort()
Retrive the targetPort value associated with this object. This represents the port in the transport Address.

Returns:
the targetport value associated with this object.

setTargetPort

public void setTargetPort(int port)
Set the targetPort value associated with this object. This represents the port in the transport Address.

Parameters:
port - The targetport value to be associated with this object.

getTargetAddrTimeout

public int getTargetAddrTimeout()
Retrive the time out value associated with this object. This parameter represents the expected maximum round trip time for communicating with the transport address specified in this object.

Returns:
the time out value associated with this object.

setTargetAddrTimeout

public void setTargetAddrTimeout(int timeout)
Set the time out value associated with this object. This parameter represents the expected maximum round trip time for communicating with the transport address specified in this object.

Parameters:
timeout - The time out value to be set for this object.

getTargetAddrRetryCount

public int getTargetAddrRetryCount()
Get the retry count associated with this object. This parameter specifies the a default number of retries to be attempted when a reponse is not received for a generated message.

Returns:
the retry count associated with this object.

setTargetAddrRetryCount

public void setTargetAddrRetryCount(int retry)
Set the retry count associated with this object. This parameter specifies the a default number of retries to be attempted when a reponse is not received for a generated message.

Parameters:
retry - The retry count to be set for this object.

getSnmpTagList

public java.util.Vector getSnmpTagList()
Returns a vector of snmpTag Values.

Returns:
a vector a snmpTag Values.

addTagValue

public boolean addTagValue(byte[] tagValue)
Adds the specified tag value to the tag list. There is no delimiter required to separate the different tagValues. This method also validates the individual tag values for any delimiter characters.

Parameters:
tagValue - The tag value to be added to the tag list.
Returns:
True if the tagValue parameter does not contain any delimiter characters. False otherwise.

setTagList

public void setTagList(java.lang.String tag)
Sets the specified tag to the tagList. The delimiter characters that can be used are space, tab, carriage return or lineFeed.

Parameters:
tag - The SnmpTagList value that is to be set on this object as a String representation.
Throws:
java.lang.NullPointerException - if the tag value is null.

getTagList

public java.lang.String getTagList()
Gets the SnmpTagList that is associated with this object.

Returns:
The SnmpTagList associated with this object as a String.

removeTagValue

public void removeTagValue(byte[] tagValue)
Removes the specified tag from the tag list.

Parameters:
tagValue - The tag value to be removed from the tag list.

getTargetAddrParams

public SnmpTargetParamsEntry getTargetAddrParams()
Get the SnmpTargetParamsEntry associated with this object.

Returns:
the SnmpTargetParamsEntry associated with this object.

setTargetAddrParams

public void setTargetAddrParams(SnmpTargetParamsEntry params)
Set the SnmpTargetParamsEntry associated with this object.

Parameters:
params - The SnmpTargetParamsEntry to be associated with this object.

setStorageType

public void setStorageType(int type)
Sets the storageType value corresponding to this Object.

Parameters:
type - The storageType value to be set to this Object.

getStorageType

public int getStorageType()
Retrieve the storageType value associated with this object.

Returns:
The storageType value associated with this object.

setRowStatus

public void setRowStatus(int rowStat)
Sets the rowStatus value corresponding to this Object.

Parameters:
rowStat - The rowStatus value to be set to this Object.

getRowStatus

public int getRowStatus()
Retrieve the rowStatus value associated with this object.

Returns:
The rowStatus value associated with this object.

setSpinLock

public void setSpinLock(int lockVal)
Sets the spinLock value associated with this object.

Parameters:
lockVal - The spinLock value to be set.

getSpinLock

public int getSpinLock()
Gets the spinLock value associated with this object.

Returns:
The spinLock value associated with this object.

getKey

public java.lang.Object getKey()
Retrieve the hash key for this targetAddrEntry.

Returns:
the hash key as a String Object.
Throws:
java.lang.NullPointerException - if the targetAddrName is null.

hashCode

public int hashCode()
The hash code used for maintaing the targetAddr 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 targetAddr object.

Returns:
The key as a String Object.
Throws:
java.lang.NullPointerException - if the name is null.


Copyright (c)ZOHO Corp. 1996-2012