Package org.snmp4j.security
Class SecurityModels
java.lang.Object
org.snmp4j.security.SecurityModels
The
SecurityModels class is a collection of all
supported security models of a SNMP entity.- Version:
- 2.6.4
- Author:
- Frank Fock, Jochen Katz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSecurityModel(SecurityModel model) Adds a security model to the central repository of security models.static SecurityModelsgetCollection(SecurityModel[] models) Gets the SecurityModels collection instance that contains the suppliedSecurityModels.static SecurityModelsGets the security singleton instance.Returns a security model from the central repository of security models.Removes a security model from the central repository of security models.
-
Constructor Details
-
SecurityModels
public SecurityModels()
-
-
Method Details
-
getInstance
Gets the security singleton instance.- Returns:
- the
SecurityModelsinstance.
-
getCollection
Gets the SecurityModels collection instance that contains the suppliedSecurityModels.- Parameters:
models- an array ofSecurityModelinstances.- Returns:
- a new instance of SecurityModels that contains the supplied models.
- Since:
- 1.10
-
addSecurityModel
Adds a security model to the central repository of security models.- Parameters:
model- aSecurityModel. If a security model with the same ID already- Returns:
- this resulting security models object.
-
removeSecurityModel
Removes a security model from the central repository of security models.- Parameters:
id- theInteger32ID of the security model to remove.- Returns:
- the removed
SecurityModelornullifidis not registered.
-
getSecurityModel
Returns a security model from the central repository of security models.- Parameters:
id- theInteger32ID of the security model to return.- Returns:
- the with
idassociatedSecurityModelornullif no such model is registered.
-