Module org.snmp4j

Class SecurityModels


  • public class SecurityModels
    extends java.lang.Object
    The SecurityModels class is a collection of all supported security models of a SNMP entity.
    Version:
    3.0
    Author:
    Frank Fock, Jochen Katz
    • Constructor Detail

      • SecurityModels

        public SecurityModels()
    • Method Detail

      • getInstance

        public static SecurityModels getInstance()
        Gets the security singleton instance.
        Returns:
        the SecurityModels instance.
      • getCollection

        public static SecurityModels getCollection​(SecurityModel[] models)
        Gets the SecurityModels collection instance that contains the supplied SecurityModels.
        Parameters:
        models - an array of SecurityModel instances.
        Returns:
        a new instance of SecurityModels that contains the supplied models.
        Since:
        1.10
      • addSecurityModel

        public SecurityModels addSecurityModel​(SecurityModel model)
        Adds a security model to the central repository of security models.
        Parameters:
        model - a SecurityModel. If a security model with the same ID already
        Returns:
        this
      • removeSecurityModel

        public SecurityModel removeSecurityModel​(Integer32 id)
        Removes a security model from the central repository of security models.
        Parameters:
        id - the Integer32 ID of the security model to remove.
        Returns:
        the removed SecurityModel or null if id is not registered.
      • getSecurityModel

        public SecurityModel getSecurityModel​(Integer32 id)
        Returns a security model from the central repository of security models.
        Parameters:
        id - the Integer32 ID of the security model to return.
        Returns:
        the with id associated SecurityModel or null if no such model is registered.