java.lang.Object
org.snmp4j.security.SecurityModels
The
SecurityModels
class is a collection of all
supported security models of a SNMP entity.- Version:
- 3.0
- Author:
- Frank Fock, Jochen Katz
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddSecurityModel
(SecurityModel model) Adds a security model to the central repository of security models.static SecurityModels
getCollection
(SecurityModel[] models) Gets the SecurityModels collection instance that contains the suppliedSecurityModel
s.static SecurityModels
Gets 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
SecurityModels
instance.
-
getCollection
Gets the SecurityModels collection instance that contains the suppliedSecurityModel
s.- Parameters:
models
- an array ofSecurityModel
instances.- 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
-
removeSecurityModel
Removes a security model from the central repository of security models.- Parameters:
id
- theInteger32
ID of the security model to remove.- Returns:
- the removed
SecurityModel
ornull
ifid
is not registered.
-
getSecurityModel
Returns a security model from the central repository of security models.- Parameters:
id
- theInteger32
ID of the security model to return.- Returns:
- the with
id
associatedSecurityModel
ornull
if no such model is registered.
-