com.adventnet.snmp.snmp2.agent
Class AclEntry

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.agent.BaseTableEntry
        |
        +--com.adventnet.snmp.snmp2.agent.AclEntry

public class AclEntry
extends BaseTableEntry
implements AclEntryInterface, java.io.Serializable

This class is the default implementation of the AclEntryInterface of the v1/v2c SnmpAgent for access control. This represents a single entry for the AclTable in the AGENT-SNMP-CONFIG-MIB

See Also:
Serialized Form

Field Summary
protected  java.lang.Integer aclAccess
          This gives the Access level for each community types.
protected  java.lang.String aclCommunity
          This represents the Community of this Access Control List Entry.
protected  java.lang.String aclManagers
          This is the Managers List.
protected  java.lang.Integer aclStatus
          This tells the Status of this Access Control Entry.
protected  int[] instanceOID
          The Instance OID Value.
static int NO_ACCESS
          Static variable to specify the community access of the entry as NO_ACCESS
static int READ_ONLY
          Static variable to specify the community access of the entry as READ_ONLY
static int READ_WRITE
          Static variable to specify the community access of the entry as READ_WRITE
static int WRITE_ONLY
          Static variable to specify the community access of the entry as WRITE_ONLY
 
Fields inherited from class com.adventnet.snmp.snmp2.agent.BaseTableEntry
agentName, instanceOID
 
Constructor Summary
AclEntry()
          The Default Constructor for Acl Entry.
 
Method Summary
 java.lang.Integer getAclAccess()
          Handles the SNMP Get Request for aclAccess.
 java.lang.String getAclCommunity()
          Handles the SNMP Get Request for aclCommunity.
 java.lang.String getAclManagers()
          Handles the SNMP Get Request for aclManagers.
 java.lang.Integer getAclStatus()
          Handles the SNMP Get Request for aclStatus.
 void setAclAccess(java.lang.Integer value)
          Handles the SNMP Set Request for aclAccess.
 void setAclCommunity(java.lang.String value)
          Handles the SNMP Set Request for aclCommunity.
 void setAclManagers(java.lang.String value)
          Handles the SNMP Set Request for aclManagers.
 void setAclStatus(java.lang.Integer value)
          Handles the SNMP Set Request for aclStatus.
 void setrowStatus(java.lang.Integer value)
          This method is used for recomputing the Instance OID.
 
Methods inherited from class com.adventnet.snmp.snmp2.agent.BaseTableEntry
computeInstanceOID, decrementCount, getAttributes, getCount, getInstanceOID, setAgentRef, setCount, setInstanceOID
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aclCommunity

protected java.lang.String aclCommunity
This represents the Community of this Access Control List Entry.

aclAccess

protected java.lang.Integer aclAccess
This gives the Access level for each community types.

The Different Access Levels are,


aclManagers

protected java.lang.String aclManagers
This is the Managers List.

aclStatus

protected java.lang.Integer aclStatus
This tells the Status of this Access Control Entry.

This is the RowStatus column of enumerations,


NO_ACCESS

public static int NO_ACCESS
Static variable to specify the community access of the entry as NO_ACCESS

READ_ONLY

public static int READ_ONLY
Static variable to specify the community access of the entry as READ_ONLY

WRITE_ONLY

public static int WRITE_ONLY
Static variable to specify the community access of the entry as WRITE_ONLY

READ_WRITE

public static int READ_WRITE
Static variable to specify the community access of the entry as READ_WRITE

instanceOID

protected int[] instanceOID
The Instance OID Value.
Constructor Detail

AclEntry

public AclEntry()
The Default Constructor for Acl Entry.
Method Detail

getAclCommunity

public java.lang.String getAclCommunity()
                                 throws AgentException
Handles the SNMP Get Request for aclCommunity.
Specified by:
getAclCommunity in interface AclEntryInterface
Returns:
The AclCommunity String Value.
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

setAclCommunity

public void setAclCommunity(java.lang.String value)
Handles the SNMP Set Request for aclCommunity.
Specified by:
setAclCommunity in interface AclEntryInterface
Parameters:
value - The Acl Community String to be set, default value will be "public".

getAclAccess

public java.lang.Integer getAclAccess()
                               throws AgentException
Handles the SNMP Get Request for aclAccess.
Specified by:
getAclAccess in interface AclEntryInterface
Returns:
The Acl Access Value.
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

setAclAccess

public void setAclAccess(java.lang.Integer value)
                  throws AgentException
Handles the SNMP Set Request for aclAccess.
Specified by:
setAclAccess in interface AclEntryInterface
Parameters:
vlaue - The Value to be set for Acl Access, default value will be "READ_WRITE".
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

getAclManagers

public java.lang.String getAclManagers()
                                throws AgentException
Handles the SNMP Get Request for aclManagers.
Specified by:
getAclManagers in interface AclEntryInterface
Returns:
The Acl Managers String.
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

setAclManagers

public void setAclManagers(java.lang.String value)
                    throws AgentException
Handles the SNMP Set Request for aclManagers.
Specified by:
setAclManagers in interface AclEntryInterface
Parameters:
value - The AclManager IPAddress String to be set, eg., "192.168.1.98" default will be - "0:0:0:0" - access to all.
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

getAclStatus

public java.lang.Integer getAclStatus()
                               throws AgentException
Handles the SNMP Get Request for aclStatus.
Specified by:
getAclStatus in interface AclEntryInterface
Returns:
The Acl Status Integer Value.
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

setAclStatus

public void setAclStatus(java.lang.Integer value)
                  throws AgentException
Handles the SNMP Set Request for aclStatus.
Specified by:
setAclStatus in interface AclEntryInterface
Parameters:
value - The Integer Value of the AclStatus to be set, default value will be "active(1)".
Throws:
AgentException - This Wraps all the Exceptions thrown while processing this event.

setrowStatus

public void setrowStatus(java.lang.Integer value)
This method is used for recomputing the Instance OID.
Returns:
The Computed Instance OID.
See Also:
AgentUtil.encodeInstanceString