org.snmp4j.security
Class SecurityModels

java.lang.Object
  extended by org.snmp4j.security.SecurityModels

public class SecurityModels
extends java.lang.Object

The SecurityModels class is a collection of all supported security models of a SNMP entity.

Version:
1.0a
Author:
Jochen Katz & Frank Fock

Constructor Summary
protected SecurityModels()
           
 
Method Summary
 void 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 supplied SecurityModels.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityModels

protected SecurityModels()
Method Detail

getInstance

public static SecurityModels getInstance()
Gets the security singleton instance.

Returns:
the SecurityModels instance.

getCollection

public static final 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 void 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

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.

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.