|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.adventnet.snmp.snmp2.agent.SimpleRequestHandler
|
+--com.adventnet.snmp.snmp2.agent.usm.UsmUserTableRequestHandler
Handles all requests under usmUserTable group.
| Field Summary | |
protected SnmpAgent |
agentName
The Reference for the Snmp Agent Instance. |
static int[] |
USM_AES_PRIV_PROTOCOL
Instance OID for the UsmAESPrivProtocol |
static int[] |
USM_DES_PRIV_PROTOCOL
Instance OID for the UsmDESPrivProtocol |
static int[] |
USM_HMAC_MD5_PROTOCOL
Instance OID for the UsmHMACMD5AuthProtocol |
static int[] |
USM_HMAC_SHA_AUTH_PROTOCOL
Instance OID for the UsmHMACSHAAuthProtocol |
static int[] |
USM_NO_AUTH_PROTOCOL
Instance OID for the UsmNoAuthProtocol |
static int[] |
USM_NO_PRIV_PROTOCOL
Instance OID for the UsmNoPrivProtocol |
(package private) static int |
USMUSERAUTHKEYCHANGE
|
(package private) static int |
USMUSERAUTHPROTOCOL
|
(package private) static int |
USMUSERCLONEFROM
|
(package private) static int |
USMUSERENGINEID
|
(package private) static int |
USMUSERNAME
|
(package private) static int |
USMUSEROWNAUTHKEYCHANGE
|
(package private) static int |
USMUSEROWNPRIVKEYCHANGE
|
(package private) static int |
USMUSERPRIVKEYCHANGE
|
(package private) static int |
USMUSERPRIVPROTOCOL
|
(package private) static int |
USMUSERPUBLIC
|
(package private) static int |
USMUSERSECURITYNAME
|
(package private) static int |
USMUSERSTATUS
|
(package private) static int |
USMUSERSTORAGETYPE
|
UsmUserTableXMLToVector |
xmlToVector
|
| Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler |
instrumentHandler,
listener,
tableListener,
writeEachTime |
| Constructor Summary | |
UsmUserTableRequestHandler(SnmpAgent agentRef)
Constructor for the UsmUserTableRequestHandler with agent Reference. |
|
UsmUserTableRequestHandler(SnmpAgent agentRef,
java.lang.String dirStr,
java.lang.String fileName,
java.lang.String format)
Constructor for the UsmUserTableRequestHandler with agent Reference. |
|
| Method Summary | |
(package private) boolean |
checkForRowStatus(USMUserEntry entry)
|
boolean |
createAndAddUSMUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
byte[] authKey,
byte[] privKey,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
The Method to Create and Add a new USMUserEntry to USMUserTable. |
boolean |
createAndAddUSMUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
java.lang.String authPassword,
java.lang.String privPassword,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
The Method to Create and Add a new USMUserEntry to USMUserTable. |
USMUserEntry |
createUsmUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
byte[] authKey,
byte[] privKey,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
The Method to create a USMUserEntry. |
USMUserEntry |
createUsmUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
java.lang.String authPassword,
java.lang.String privPassword,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
The Method to create a USMUserEntry. |
(package private) void |
createUsmUserEntry(USMUserEntry newEntry,
int[] inst)
Assigns the EngineID and UserName values for the newEntry from the instance (inst) received.Also, this method adds the newEntry to the USMUserTable and sorts the entries. |
(package private) void |
display()
An utility method to print the contents of the vector containing the instances..May be moved to the utils package or removed as this is not going to be useful for API. |
protected SnmpAgent |
getAgentRef()
|
int[] |
getOidRep()
Retrives the integer representation of OID |
protected int[] |
getSubidList()
Gets the subid list of the oid. |
java.util.Vector |
getTableVector()
The method to return the Vector of USMUserEntries present in the USMUserTable. |
static int[] |
getUsmUserTableOidRep()
Getter for the Usm User Table Oid Representation. |
protected void |
processGetNextRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
Process the GetNext Request message which is received from PduRequestHandler. |
protected void |
processGetRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
Handles the SNMP GET Requests.. |
protected void |
processGetRequest(SnmpVarBind varb,
int req,
VarBindRequestEvent pe,
USMUserEntry entry)
Process the Get Request message for the given params. |
protected void |
processSetRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
Handles the SNMP SET requests... |
void |
serialize(java.io.ObjectOutputStream outMain)
This method Serializes the Output Stream. |
void |
setAuthProtocol(USMUserEntry usmUserEntry,
int[] authProtocol)
Set the authProtocol value for this USMUserEntry. |
void |
setPrivProtocol(USMUserEntry usmUserEntry,
int[] privProtocol)
Set the privProtocol value for this USMUserEntry. |
void |
setTableVector(java.util.Vector usmVec)
The method to set the Vector of USMUserEntries. |
(package private) boolean |
validateKeyLength(int protocol,
int rcvdKeyLen)
Validates the KeyLength value for the protocol. |
| Methods inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler |
addInstrumentHandler,
addRegistrationListener,
addTableListener,
addUpdateListener,
getInstrument,
getMibVarHash,
getNextRequest,
getObjectHash,
getObjectTypeHash,
getRequest,
getTableListener,
isWriteEachTime,
processGetNextRequest,
processGetRequest,
processSetRequest,
removeRegistrationListener,
removeUpdateListener,
setRequest,
setWriteEachTime,
writeIntoFile |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
static final int USMUSERENGINEID
static final int USMUSERNAME
static final int USMUSERSECURITYNAME
static final int USMUSERCLONEFROM
static final int USMUSERAUTHPROTOCOL
static final int USMUSERAUTHKEYCHANGE
static final int USMUSEROWNAUTHKEYCHANGE
static final int USMUSERPRIVPROTOCOL
static final int USMUSERPRIVKEYCHANGE
static final int USMUSEROWNPRIVKEYCHANGE
static final int USMUSERPUBLIC
static final int USMUSERSTORAGETYPE
static final int USMUSERSTATUS
public static final int[] USM_NO_AUTH_PROTOCOL
public static final int[] USM_HMAC_MD5_PROTOCOL
public static final int[] USM_HMAC_SHA_AUTH_PROTOCOL
public static final int[] USM_NO_PRIV_PROTOCOL
public static final int[] USM_DES_PRIV_PROTOCOL
public static final int[] USM_AES_PRIV_PROTOCOL
protected SnmpAgent agentName
public UsmUserTableXMLToVector xmlToVector
| Constructor Detail |
public UsmUserTableRequestHandler(SnmpAgent agentRef)
agentRef - The Reference for the Snmp Agent.
public UsmUserTableRequestHandler(SnmpAgent agentRef,
java.lang.String dirStr,
java.lang.String fileName,
java.lang.String format)
agentRef - The Agent Reference.dirStr - the directory location String of the File.fileName - The fileName String.format - The file format("xml").| Method Detail |
public static int[] getUsmUserTableOidRep()
public int[] getOidRep()
protected SnmpAgent getAgentRef()
protected int[] getSubidList()
void display()
public void setAuthProtocol(USMUserEntry usmUserEntry,
int[] authProtocol)
throws AgentSnmpException
usmUserEntry - the USMUserEntry for which the authProtocol is to
be setauthProtocol - the instanceOID to be converted to equivalent
authProtocol value for this USMUserEntry
public void setPrivProtocol(USMUserEntry usmUserEntry,
int[] privProtocol)
throws AgentSnmpException
usmUserEntry - the USMUserEntry for which the privProtocol is to
be setprivProtocol - the instanceOID to be converted to equivalent
privProtocol value for this USMUserEntry
protected void processGetRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
throws AgentSnmpException
varb - The received varbind .node - The node for which Get Request is to be done.pe - The VarBind Request Event created by this Get request.
protected void processGetRequest(SnmpVarBind varb,
int req,
VarBindRequestEvent pe,
USMUserEntry entry)
throws AgentSnmpException
varb - The received VarBind.req - The request given.pe - The Varbind Request Event created after thid Event.entry - The Usm User Entry for the Request.
protected void processSetRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
throws AgentSnmpException
varb - The received varbind.node - The node for which Get Next Request is to be done.pe - The VarBind Request Event created by this GetNext request.
protected void processGetNextRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
throws AgentSnmpException
varb - The received varbind.node - The node for which Get Next Request is to be done.pe - The VarBind Request Event created by this GetNext request.
boolean validateKeyLength(int protocol,
int rcvdKeyLen)
protocol - the protocol value.rcvdKeyLen - the key Length value.
void createUsmUserEntry(USMUserEntry newEntry,
int[] inst)
newEntry - the USMUserEntry to be added to the USMUserTable.inst - the instance OID from which the EngineID and userName
is to be decoded.
boolean checkForRowStatus(USMUserEntry entry)
throws AgentSnmpException
public void serialize(java.io.ObjectOutputStream outMain)
outMain - The objet Output stream to be serialized.public java.util.Vector getTableVector()
public void setTableVector(java.util.Vector usmVec)
The - Vector of USMUserEntries.
public boolean createAndAddUSMUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
java.lang.String authPassword,
java.lang.String privPassword,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
usmUserSecurityName - The contextPrefix with which the entry
is to be created.securityModel - The securityModel with which the entry
is to be created(Default - USM (3)).secLevel - The securityLevel with which the entry
is to be created.usmUserCloneFrom - The usmUserCloneFrom with which the entry
is to be created(Default .0.0)usmUserAuthProtocol - The usmUserAuthProtocol for this User.usmUserPrivProtocol - The usmUserPrivProtocol for this User.authPassword - The authPassword for this User.privPassword - The privPassword for this User.usmUserPublic - The usmUserPublic for this entry.storageType - The storageType for the Entry.rowStatus - The RowStatus Integer for the Entry.createUsmUserEntry
public boolean createAndAddUSMUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
byte[] authKey,
byte[] privKey,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
usmUserSecurityName - The contextPrefix with which the entry
is to be created.securityModel - The securityModel with which the entry
is to be created(Default - USM (3)).secLevel - The securityLevel with which the entry
is to be created.usmUserCloneFrom - The usmUserCloneFrom with which the entry
is to be created(Default .0.0)usmUserAuthProtocol - The usmUserAuthProtocol for this User.usmUserPrivProtocol - The usmUserPrivProtocol for this User.authKey - The authKey used for this User.privKey - The privKey used for this User.usmUserPublic - The usmUserPublic for this entry.storageType - The storageType for the Entry.rowStatus - The RowStatus Integer for the Entry.createUsmUserEntry
public USMUserEntry createUsmUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
java.lang.String authPassword,
java.lang.String privPassword,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
usmUserSecurityName - The contextPrefix with which the entry
is to be created.securityModel - The securityModel with which the entry
is to be created(Default - USM (3)).secLevel - The securityLevel with which the entry
is to be created.usmUserCloneFrom - The usmUserCloneFrom with which the entry
is to be created(Default .0.0)usmUserAuthProtocol - The usmUserAuthProtocol for this User.usmUserPrivProtocol - The usmUserPrivProtocol for this User.authPassword - The authPassword for this User.privPassword - The privPassword for this User.usmUserPublic - The usmUserPublic for this entry.storageType - The storageType for the Entry.rowStatus - The RowStatus Integer for the Entry.createAndAddUSMUserEntry
public USMUserEntry createUsmUserEntry(java.lang.String usmUserSecurityName,
java.lang.Integer secLevel,
java.lang.String usmUserCloneFrom,
java.lang.Integer usmUserAuthProtocol,
java.lang.Integer usmUserPrivProtocol,
java.lang.String usmUserPublic,
byte[] authKey,
byte[] privKey,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
usmUserSecurityName - The contextPrefix with which the entry
is to be created.securityModel - The securityModel with which the entry
is to be created(Default - USM (3)).secLevel - The securityLevel with which the entry
is to be created.usmUserCloneFrom - The usmUserCloneFrom with which the entry
is to be created(Default .0.0)usmUserAuthProtocol - The usmUserAuthProtocol for this User.usmUserPrivProtocol - The usmUserPrivProtocol for this User.authKey - The authKey used for this User.privKey - The privKey used for this User.usmUserPublic - The usmUserPublic for this entry.storageType - The storageType for the Entry.rowStatus - The RowStatus Integer for the Entry.createAndAddUSMUserEntry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||