- java.lang.Object
-
- org.snmp4j.security.SecurityModels
-
public class SecurityModels extends java.lang.ObjectTheSecurityModelsclass 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 SecurityModelsaddSecurityModel(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 SecurityModelsgetInstance()Gets the security singleton instance.SecurityModelgetSecurityModel(Integer32 id)Returns a security model from the central repository of security models.SecurityModelremoveSecurityModel(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
SecurityModelsinstance.
-
getCollection
public static SecurityModels getCollection(SecurityModel[] models)
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
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- theInteger32ID of the security model to remove.- Returns:
- the removed
SecurityModelornullifidis not registered.
-
getSecurityModel
public SecurityModel getSecurityModel(Integer32 id)
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.
-
-