Class BasicVacmConfigurator

  • All Implemented Interfaces:
    VacmConfigurator

    public class BasicVacmConfigurator
    extends java.lang.Object
    implements VacmConfigurator
    The BasicVacmConfigurator implements the VacmConfigurator that uses three unrestricted views for all access types to support two roles admin and monitor. The admin role has unrestricted access to the agent, whereas monitor has no write access, but unrestricted read and notification access.
    Since:
    3.0
    Author:
    Frank Fock
    • Field Detail

      • rootViewName

        protected org.snmp4j.smi.OctetString rootViewName
      • rootOID

        protected org.snmp4j.smi.OID rootOID
      • securityModel

        protected org.snmp4j.security.SecurityModel securityModel
      • securityLevel

        protected org.snmp4j.security.SecurityLevel securityLevel
      • contextPrefix

        protected org.snmp4j.smi.OctetString contextPrefix
      • contextMatch

        protected int contextMatch
    • Constructor Detail

      • BasicVacmConfigurator

        public BasicVacmConfigurator()
    • Method Detail

      • addUser

        public VacmConfigurator.VacmConfigResult addUser​(MutableVACM vacm,
                                                         org.snmp4j.smi.OctetString securityName,
                                                         java.lang.String role)
        Description copied from interface: VacmConfigurator
        Add a new user to a group. If the referenced group does not exist, it will be created. If the role identified by the group is not supported by this configurator, an error is returned.
        Specified by:
        addUser in interface VacmConfigurator
        Parameters:
        vacm - the MutableVACM to modify
        securityName - the user name of the new user.
        role - the group (VACM)/role name associated with the user. Only supported groups must ber provided. See VacmConfigurator.getSupportedRoles().
        Returns:
        the operation result.
      • removeRole

        public VacmConfigurator.VacmConfigResult removeRole​(MutableVACM vacm,
                                                            java.lang.String role)
        Description copied from interface: VacmConfigurator
        Remover all users from the specified security group and then remove the group itself. This operation will only affect the VACM provided, but not the USM.
        Specified by:
        removeRole in interface VacmConfigurator
        Parameters:
        vacm - the MutableVACM to modify
        role - the group (VACM)/role to be removed from the above vacm.
        Returns:
        the operation result.
      • getSupportedRoles

        public java.lang.String[] getSupportedRoles()
        Description copied from interface: VacmConfigurator
        Returns the list of roles supported by this configurator.
        Specified by:
        getSupportedRoles in interface VacmConfigurator
        Returns:
        a non-empty array of roles/groups supported by this configurator.
      • isRoleSupported

        protected boolean isRoleSupported​(java.lang.String role)