- java.lang.Object
-
- org.snmp4j.security.SecurityModels
-
public class SecurityModels extends java.lang.Object
TheSecurityModels
class is a collection of all supported security models of a SNMP entity.- Version:
- 3.0
- Author:
- Frank Fock, Jochen Katz
-
-
Constructor Summary
Constructors Constructor Description SecurityModels()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityModels
addSecurityModel(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
getInstance()
Gets the security singleton instance.SecurityModel
getSecurityModel(Integer32 id)
Returns a security model from the central repository of security models.SecurityModel
removeSecurityModel(Integer32 id)
Removes a security model from the central repository of security models.
-
-
-
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 suppliedSecurityModel
s.- Parameters:
models
- an array ofSecurityModel
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
- aSecurityModel
. 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
- theInteger32
ID of the security model to remove.- Returns:
- the removed
SecurityModel
ornull
ifid
is not registered.
-
getSecurityModel
public SecurityModel getSecurityModel(Integer32 id)
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.
-
-