|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.management.snmp.usm.SnmpUsmPasswordLcd
public class SnmpUsmPasswordLcd
FOR INTERNAL USE ONLY. This is the default implementation of the Usm Lcd.
Its job is to read the configuration file, store the configuration and
manage SnmpUsmSecureUser
objects.
Field Summary |
---|
Fields inherited from interface com.sun.management.snmp.usm.SnmpUsmLcd |
---|
NON_VOLATILE, VOLATILE |
Constructor Summary | |
---|---|
SnmpUsmPasswordLcd(SnmpEngine engine,
com.sun.management.internal.snmp.SnmpSubSystem subsys,
com.sun.management.internal.snmp.SnmpLcd snmplcd,
String file)
Constructor. |
Method Summary | |
---|---|
void |
addEngine(SnmpEngineId engineId)
Does nothing in our case. |
void |
addUser(SnmpEngineId engineId,
String userName,
String securityName,
String authProtocol,
String authPassword,
String privProtocol,
String privPassword,
int storage,
boolean template)
See SnmpUsmLcd interface doc for details. |
void |
addUser(SnmpUsmSecureUser user,
boolean notifyMIB)
See SnmpUsmLcd interface doc for details. |
SnmpUsmSecureUser |
createNewUser(byte[] engineId,
String name)
See SnmpUsmLcd interface doc for details. |
void |
enableStrictParsing(boolean b)
Call this method in order to change the file parsing behavior. |
SnmpUsmAlgorithmManager |
getAlgorithmManager()
See SnmpUsmLcd interface doc for details. |
Enumeration |
getAllUsers()
See SnmpUsmLcd interface doc for details. |
int |
getStorageType()
See SnmpUsmLcd interface doc for details. |
SnmpUsmSecureUser |
getUser(SnmpEngineId engineId,
String userName)
Gets the SnmpUsmSecureUser for the passed user name
and authoritative engine Id. |
SnmpUsmAuthPair |
getUserAuthPair(SnmpEngineId engineId,
String userName)
See SnmpUsmLcd interface doc for details. |
SnmpUsmPrivPair |
getUserPrivPair(SnmpEngineId engineId,
String userName)
See SnmpUsmLcd interface doc for details. |
void |
removeUser(SnmpEngineId engineId,
String userName,
boolean notifyMIB)
Removes a user form the Lcd. |
void |
setAlgorithmManager(SnmpUsmAlgorithmManager algos)
See SnmpUsmLcd interface doc for details. |
void |
setMibTable(SnmpUsmMibTable table)
See SnmpUsmLcd interface doc for details. |
void |
setUserAuthKeyChange(SnmpUsmSecureUser u,
byte[] keyChange)
See SnmpUsmLcd interface doc for details. |
void |
setUserPrivKeyChange(SnmpUsmSecureUser u,
byte[] keyChange)
See SnmpUsmLcd interface doc for details. |
void |
syncDataSource()
See SnmpUsmLcd interface doc for details. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SnmpUsmPasswordLcd(SnmpEngine engine, com.sun.management.internal.snmp.SnmpSubSystem subsys, com.sun.management.internal.snmp.SnmpLcd snmplcd, String file) throws IllegalArgumentException
IllegalArgumentException
Method Detail |
---|
public void enableStrictParsing(boolean b)
b
- True, throws an IllegalArgumentException, false the line
is skipped.public void setUserAuthKeyChange(SnmpUsmSecureUser u, byte[] keyChange)
SnmpUsmLcd
interface doc for details.
setUserAuthKeyChange
in interface SnmpUsmLcd
u
- The user that has its key changed.keyChange
- The value to use at key compute time.public void setUserPrivKeyChange(SnmpUsmSecureUser u, byte[] keyChange)
SnmpUsmLcd
interface doc for details.
setUserPrivKeyChange
in interface SnmpUsmLcd
u
- The user that has its key changed.keyChange
- The value to use at key compute time.public void addUser(SnmpUsmSecureUser user, boolean notifyMIB)
SnmpUsmLcd
interface doc for details.
addUser
in interface SnmpUsmLcd
user
- The user to add.notifyMIB
- True will notify the MIB.public SnmpUsmSecureUser createNewUser(byte[] engineId, String name)
SnmpUsmLcd
interface doc for details.
createNewUser
in interface SnmpUsmLcd
engineId
- The authoritative engine Id the user is associated to.name
- The user name.
public int getStorageType()
SnmpUsmLcd
interface doc for details.
getStorageType
in interface SnmpUsmLcd
public void setMibTable(SnmpUsmMibTable table)
SnmpUsmLcd
interface doc for details.
setMibTable
in interface SnmpUsmLcd
table
- The MIB table.public void addEngine(SnmpEngineId engineId)
addEngine
in interface SnmpUsmLcd
engineId
- The unknown engine Id.public void setAlgorithmManager(SnmpUsmAlgorithmManager algos)
SnmpUsmLcd
interface doc for details.
setAlgorithmManager
in interface SnmpUsmLcd
algos
- The algorithm manager.public SnmpUsmSecureUser getUser(SnmpEngineId engineId, String userName) throws SnmpUsmEngineIdException, SnmpUsmUserNameException
SnmpUsmSecureUser
for the passed user name
and authoritative engine Id.
getUser
in interface SnmpUsmLcd
engineId
- The authoritative engine Id.userName
- The user name.
SnmpUsmEngineIdException
SnmpUsmUserNameException
public void syncDataSource() throws IllegalArgumentException
SnmpUsmLcd
interface doc for details.
syncDataSource
in interface SnmpUsmLcd
IllegalArgumentException
public SnmpUsmAlgorithmManager getAlgorithmManager()
SnmpUsmLcd
interface doc for details.
getAlgorithmManager
in interface SnmpUsmLcd
public SnmpUsmPrivPair getUserPrivPair(SnmpEngineId engineId, String userName) throws SnmpUsmPrivAlgorithmException, SnmpUsmEngineIdException, SnmpUsmUserNameException
SnmpUsmLcd
interface doc for details.
getUserPrivPair
in interface SnmpUsmLcd
engineId
- The authoritative engine Id.userName
- The user name.
SnmpUsmPrivAlgorithmException
SnmpUsmEngineIdException
SnmpUsmUserNameException
public SnmpUsmAuthPair getUserAuthPair(SnmpEngineId engineId, String userName) throws SnmpUsmAuthAlgorithmException, SnmpUsmEngineIdException, SnmpUsmUserNameException
SnmpUsmLcd
interface doc for details.
getUserAuthPair
in interface SnmpUsmLcd
engineId
- The authoritative engine Id.userName
- The user name.
SnmpUsmAuthAlgorithmException
SnmpUsmEngineIdException
SnmpUsmUserNameException
public void addUser(SnmpEngineId engineId, String userName, String securityName, String authProtocol, String authPassword, String privProtocol, String privPassword, int storage, boolean template) throws SnmpUsmException
SnmpUsmLcd
interface doc for details.
addUser
in interface SnmpUsmLcd
engineId
- The authoritative engine Id.userName
- The user name.securityName
- The security user name.authProtocol
- The authentication algorithm name.authPassword
- The authentication password.privProtocol
- The privacy algorithm name.privPassword
- The privacy key. No password translation. This
String
must start with 0x.storage
- The storage type (PERMANENT
or
VOLATILE
).template
- True, the user is a template. A template is not
registered in the USM MIB.
SnmpUsmException
public Enumeration getAllUsers()
SnmpUsmLcd
interface doc for details.
getAllUsers
in interface SnmpUsmLcd
public void removeUser(SnmpEngineId engineId, String userName, boolean notifyMIB)
SnmpUsmLcd
removeUser
in interface SnmpUsmLcd
engineId
- The engine Id to which the user is associated.userName
- The user name.notifyMIB
- True will notify the MIB.
|
Open Source build 02 opendmk-1.0-b02 2007.10.01_19:17:46_MEST |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |