com.adventnet.snmp.snmp2
Class SnmpProxyEntry

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

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

The SnmpProxyEntry contains a set of translation parameters used by the proxy forwarder application for forwarding SNMP messages.

See Also:
Serialized Form

Field Summary
(package private)  byte[] proxyMultipleTargetOut
          This is a tag value
(package private)  byte[] proxyName
           
(package private)  byte[] proxySingleTargetOut
           
(package private)  byte[] proxyTargetParamsIn
           
(package private)  byte proxyType
           
(package private)  int rowStatus
           
(package private)  byte[] snmpProxyContextID
           
(package private)  byte[] snmpProxyContextName
           
(package private)  int storageType
           
(package private) static byte USM_SECURITY_MODEL
           
 
Constructor Summary
SnmpProxyEntry(byte[] name)
          Constructs a new SnmpProxyEntry taking the proxyName.
SnmpProxyEntry(byte[] proxyName, byte proxyType, byte[] snmpProxyContextID, byte[] snmpProxyContextName, byte[] proxyTargetParamsIn, byte[] proxySingleTargetOut)
          Constructs a new SnmpProxyEntry taking the proxyName, proxyType, contextID, contextName, paramsIn and targetOut.
 
Method Summary
 byte[] getProxyMultipleTargetOut()
          Set the SnmpProxyMultipleTargetOut associated with this object.
 byte[] getProxyName()
          Get the SnmpProxy name associated with this object.
 byte[] getProxySingleTargetOut()
          Returns the SnmpProxySingleTargetOut associated with this object.
 byte[] getProxyTargetParamsIn()
          Returns the SnmpProxyTargetParamsIn associated with this object.
 byte getProxyType()
          Get the proxyType associated with this object.
 int getRowStatus()
          Retrive the snmpProxyStatus value associated with this object.
 byte[] getSnmpProxyContextID()
          Returns the SnmpProxyContextID associated with this object.
 byte[] getSnmpProxyContextName()
          Returns the SnmpProxyContextName associated with this object.
 int getStorageType()
          Retrive the snmpProxyStorageType value associated with this object.
 boolean ifProxyEntryMatches(SnmpPDU pdu, SnmpTargetParamsTable paramsTable)
          Deprecated. instead use the isProxyEntryMatches method.
 boolean isProxyEntryMatches(SnmpPDU pdu, SnmpTargetParamsTable paramsTable)
          This method verifies if the this SnmpProxyEntry object succeeds the comparisons needed for selecting a single outgoing management target information.
 boolean setProxyMultipleTargetOut(byte[] targetOut)
          Get the SnmpProxyMultipleTargetOut associated with this object.
 void setProxySingleTargetOut(byte[] targetOut)
          Set the SnmpProxySingleTargetOut associated with this object.
 void setProxyTargetParamsIn(byte[] paramsIn)
          Set the SnmpProxyTargetParamsIn associated with this object.
 void setProxyType(byte type)
          Set the proxyType associated with this object.
 void setRowStatus(int status)
          Set the snmpProxyStatus value associated with this object.
 void setSnmpProxyContextID(byte[] contextID)
          Set the SnmpProxyContextID associated with this object.
 void setSnmpProxyContextName(byte[] contextName)
          Set the SnmpProxyContextName associated with this object.
 void setStorageType(int type)
          Set the snmpProxyStorageType value associated with this object.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USM_SECURITY_MODEL

static byte USM_SECURITY_MODEL

proxyName

byte[] proxyName

proxyType

byte proxyType

snmpProxyContextID

byte[] snmpProxyContextID

snmpProxyContextName

byte[] snmpProxyContextName

proxyTargetParamsIn

byte[] proxyTargetParamsIn

proxySingleTargetOut

byte[] proxySingleTargetOut

proxyMultipleTargetOut

byte[] proxyMultipleTargetOut
This is a tag value

rowStatus

int rowStatus

storageType

int storageType
Constructor Detail

SnmpProxyEntry

public SnmpProxyEntry(byte[] name)
Constructs a new SnmpProxyEntry taking the proxyName.
Parameters:
name - The snmpProxyName for creating a new SnmpProxyEntry.
Throws:
java.lang.NullPointerException - if name is null.

SnmpProxyEntry

public SnmpProxyEntry(byte[] proxyName,
                      byte proxyType,
                      byte[] snmpProxyContextID,
                      byte[] snmpProxyContextName,
                      byte[] proxyTargetParamsIn,
                      byte[] proxySingleTargetOut)
Constructs a new SnmpProxyEntry taking the proxyName, proxyType, contextID, contextName, paramsIn and targetOut.
Parameters:
proxyName - The snmpProxyName for creating a new SnmpProxyEntry.
proxyType - the proxyType for this proxyEntry.
snmpProxyContextID - the contextID which this proxyEntry is associated with.
snmpProxyContextName - the contextName which this proxyEntry is associated with.
proxyTargetParamsIn - The targetParamsIn for this proxyEntry.
proxySingleTargetOut - the targetOut for this proxyEntry.
Throws:
java.lang.NullPointerException - This method throws NullPointerException if any of the input byte array is null.
java.lang.IllegalArgumentException - This method will throw an IllegalArgumentException if an unknown proxy type is passed as argument.
Method Detail

getProxyName

public byte[] getProxyName()
Get the SnmpProxy name associated with this object. The proxyName is a uniquie identifier associated with the SnmpProxyEntry.
Returns:
the SnmpProxyName associated with this object.

getProxyType

public byte getProxyType()
Get the proxyType associated with this object. This parameter specifies the type of message that may be forwarded using the translation parameters defined by this object. The possible values are SnmpProxyModule.READ(1), SnmpProxyModule.WRITE(2), SnmpProxyModule.TRAP(3), SnmpProxyModule.INFORM(4). The default value of this method is SnmpProxyModule.READ(1).
Returns:
the proxyType associated with this object.
See Also:
setProxyType(byte)

setProxyType

public void setProxyType(byte type)
Set the proxyType associated with this object. This parameter specifies the type of message that may be forwarded using the translation parameters defined by this object. This method accepts only these values, SnmpProxyModule.READ(1), SnmpProxyModule.WRITE(2), SnmpProxyModule.TRAP(3), SnmpProxyModule.INFORM(4).
Parameters:
type - The proxyType to be associated with this object.

getSnmpProxyContextID

public byte[] getSnmpProxyContextID()
Returns the SnmpProxyContextID associated with this object. This parameter represents the contextID contained in the messages that may be forwarded using the translation parameters defined in this object.
Returns:
the SnmpProxyContextID associated with this object.

setSnmpProxyContextID

public void setSnmpProxyContextID(byte[] contextID)
Set the SnmpProxyContextID associated with this object. This parameter represents the contextID contained in the messages that may be forwarded using the translation parameters defined in this object.
Parameters:
contextID - SnmpProxyContextID associated with this object.

getSnmpProxyContextName

public byte[] getSnmpProxyContextName()
Returns the SnmpProxyContextName associated with this object. This parameter represents the contextName contained in the messages that may be forwarded using the translation parameters defined in this object.
Returns:
the SnmpProxyContextName associated with this object.

setSnmpProxyContextName

public void setSnmpProxyContextName(byte[] contextName)
Set the SnmpProxyContextName associated with this object. This parameter represents the contextName contained in the messages that may be forwarded using the translation parameters defined in this object.
Parameters:
contextName - SnmpProxyContextName associated with this object.

getProxyTargetParamsIn

public byte[] getProxyTargetParamsIn()
Returns the SnmpProxyTargetParamsIn associated with this object. This parameter identifies the SnmpTargetParamsName which is used to select a SnmpTargetParamsEntry from the list of SnmpTargetParamsEntry present in the SnmpTargetParamsTable. The selected entry is used validate the incoming message parameters like the securityName, securityModel, securityLevel etc. These incoming security parameters are supposed to match the security parameters in the SnmpTargetParamsEntry.
Returns:
the SnmpProxyTargetParamsIn associated with this object.

setProxyTargetParamsIn

public void setProxyTargetParamsIn(byte[] paramsIn)
Set the SnmpProxyTargetParamsIn associated with this object. This parameter identifies the SnmpTargetParamsName which is used to select a SnmpTargetParamsEntry from the list of SnmpTargetParamsEntry present in the SnmpTargetParamsTable. The selected entry is used validate the incoming message parameters like the securityName, securityModel, securityLevel etc. These incoming security parameters are supposed to match the security parameters in the SnmpTargetParamsEntry.
Returns:
the SnmpProxyTargetParamsIn associated with this object.

getProxySingleTargetOut

public byte[] getProxySingleTargetOut()
Returns the SnmpProxySingleTargetOut associated with this object. This parameter identifies the SnmpTargetAddrName which is used to select a management target(SnmpTargetAddrEntry) from the list of SnmpTargetAddrEntry present in the SnmpTargetAddrTable. The information in the selected SnmpTargetAddrEntry is used for forwarding an incoming read or write request.
Returns:
the SnmpProxySingleTargetout associated with this object.

setProxySingleTargetOut

public void setProxySingleTargetOut(byte[] targetOut)
Set the SnmpProxySingleTargetOut associated with this object. This parameter identifies the SnmpTargetAddrName which is used to select a management target(SnmpTargetAddrEntry) from the list of SnmpTargetAddrEntry present in the SnmpTargetAddrTable. The information in the selected SnmpTargetAddrEntry is used for forwarding an incoming read or write request.
Parameters:
targetOut - The SnmpProxySingleTargetout to be associated with this object.

getProxyMultipleTargetOut

public byte[] getProxyMultipleTargetOut()
Set the SnmpProxyMultipleTargetOut associated with this object. This parameter identifies the SnmpTargetAddrTag Value which is used to select a managenent targets (i.e multiple entries from the SnmpTargetAddrTable) in case of forwarding an incoming notification.
Returns:
the tagValue associated with this object.

setProxyMultipleTargetOut

public boolean setProxyMultipleTargetOut(byte[] targetOut)
Get the SnmpProxyMultipleTargetOut associated with this object. This parameter identifies the SnmpTargetAddrTag Value which is used to select a managenent targets (i.e multiple entries from the SnmpTargetAddrTable) in case of forwarding an incoming notification. This method also validates the tag value for any delimiter characters.
Parameters:
targetOut - the list of tagvalues to be associated with this object.
Returns:
True if the targetOut parameter does not contain any delimiter characters. False otherwise.

ifProxyEntryMatches

public boolean ifProxyEntryMatches(SnmpPDU pdu,
                                   SnmpTargetParamsTable paramsTable)
Deprecated. instead use the isProxyEntryMatches method.

This method verifies if the this SnmpProxyEntry object succeeds the comparisons needed for selecting a single outgoing management target information. Returns true if the comparisons succeeed. False otherwise. The following comparisons are made: - The SnmpProxyType in this entry to match the command type in the request to be forwarded. - The The contextID and contextName in this entry to be the same as the one in the request to be forwarded. - The MPModel, secLevel, secModel and secName identified by the proxyTargetParamsIn parameter should match the ones in the request to be forwarded.
Parameters:
SnmpPDU - The SnmpPDU which contains the parameters needed for comparison with this entry.
paramsTable - The SnmpTargetParamsTable needed for comparison.
Returns:
true if the comparison succeeds. False otherwise.

isProxyEntryMatches

public boolean isProxyEntryMatches(SnmpPDU pdu,
                                   SnmpTargetParamsTable paramsTable)
This method verifies if the this SnmpProxyEntry object succeeds the comparisons needed for selecting a single outgoing management target information. Returns true if the comparisons succeeed. False otherwise. The following comparisons are made: - The SnmpProxyType in this entry to match the command type in the request to be forwarded. - The The contextID and contextName in this entry to be the same as the one in the request to be forwarded. - The MPModel, secLevel, secModel and secName identified by the proxyTargetParamsIn parameter should match the ones in the request to be forwarded.
Parameters:
SnmpPDU - The SnmpPDU which contains the parameters needed for comparison with this entry.
paramsTable - The SnmpTargetParamsTable needed for comparison.
Returns:
true if the comparison succeeds. False otherwise.

setStorageType

public void setStorageType(int type)
Set the snmpProxyStorageType value associated with this object.
Parameters:
type - The snmpProxyStorageType value to be associated with this object.

getStorageType

public int getStorageType()
Retrive the snmpProxyStorageType value associated with this object.
Returns:
the snmpProxyStorageType value associated with this object.

setRowStatus

public void setRowStatus(int status)
Set the snmpProxyStatus value associated with this object.
Parameters:
status - The snmpProxyStatus value to be associated with this object.

getRowStatus

public int getRowStatus()
Retrive the snmpProxyStatus value associated with this object.
Returns:
the snmpProxyStatus value associated with this object.