|
|||||||||
| 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.community.SnmpCommunityTableRequestHandler
This class is responsible for handling all the requests under SnmpCommunityTable group
| Field Summary | |
(package private) SnmpAgent |
agentName
|
(package private) SnmpAPI |
api
|
(package private) static int |
COLUMNCOUNT
|
(package private) SnmpCommunityTable |
communityTable
|
(package private) java.lang.String |
fileDir
|
(package private) java.lang.String |
format
|
(package private) static int |
SNMPCOMMUNITYCONTEXTENGINEID
|
(package private) static int |
SNMPCOMMUNITYCONTEXTNAME
|
(package private) java.util.Vector |
snmpCommunityEntryVector
|
(package private) static int |
SNMPCOMMUNITYINDEX
|
(package private) static int |
SNMPCOMMUNITYNAME
|
(package private) static int |
SNMPCOMMUNITYSECURITYNAME
|
(package private) static int |
SNMPCOMMUNITYSTATUS
|
(package private) static int |
SNMPCOMMUNITYSTORAGETYPE
|
(package private) static int |
SNMPCOMMUNITYTRANSPORTTAG
|
(package private) SnmpCommunityTableXMLToVector |
xmlToVector
|
| Fields inherited from class com.adventnet.snmp.snmp2.agent.SimpleRequestHandler |
instrumentHandler,
listener,
tableListener,
writeEachTime |
| Constructor Summary | |
SnmpCommunityTableRequestHandler(SnmpAgent agentRef)
Constructor that takes a SnmpAgent as an argument. |
|
SnmpCommunityTableRequestHandler(SnmpAgent agentRef,
java.lang.String dirStr,
java.lang.String fileName,
java.lang.String format)
Constructor that takes a SnmpAgent as an argument. |
|
| Method Summary | |
(package private) boolean |
checkForRowStatus(SnmpCommunityEntry entry)
|
boolean |
createAndAddCommunityEntry(java.lang.String communityIndex,
java.lang.String communityName,
java.lang.String securityName,
java.lang.String contextID,
java.lang.String contextName,
java.lang.String communityTag,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
The method to create and Add a new Entry to the CommunityTable. |
static SnmpCommunityEntry |
createCommunityEntry(java.lang.String communityIndex,
java.lang.String communityName,
java.lang.String securityName,
java.lang.String contextID,
java.lang.String contextName,
java.lang.String transportTag,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
The Static method to create new SnmpCommunityEntry. |
int[] |
getOidRep()
Retrives the integer representation of OID |
static int[] |
getSnmpCommunityTableOidRep()
Getter method for the OID rep of the SnmpCommunityTable. |
protected int[] |
getSubidList()
Gets the subid list of the oid. |
java.util.Vector |
getTableVector()
The method to get the Vector of SnmpCommunityEntries present in the SnmpCommunityTable. |
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)
Process the Get Request message which is received from PduRequestHandler. |
protected void |
processGetRequest(SnmpVarBind varb,
int req,
VarBindRequestEvent pe,
SnmpCommunityEntry entry,
byte[] communityIndex)
|
protected void |
processSetRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
Process the Set Request message which is received from PduRequestHandler. |
void |
serialize(java.io.ObjectOutputStream outMain)
Method to serialize the CommunityTable. |
void |
setTableVector(java.util.Vector comVec)
The method to set the Vector of SnmpCommunityEntries. |
| 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 SNMPCOMMUNITYINDEX
static final int SNMPCOMMUNITYNAME
static final int SNMPCOMMUNITYSECURITYNAME
static final int SNMPCOMMUNITYCONTEXTENGINEID
static final int SNMPCOMMUNITYCONTEXTNAME
static final int SNMPCOMMUNITYTRANSPORTTAG
static final int SNMPCOMMUNITYSTORAGETYPE
static final int SNMPCOMMUNITYSTATUS
static final int COLUMNCOUNT
SnmpAgent agentName
SnmpAPI api
SnmpCommunityTable communityTable
java.util.Vector snmpCommunityEntryVector
SnmpCommunityTableXMLToVector xmlToVector
java.lang.String format
java.lang.String fileDir
| Constructor Detail |
public SnmpCommunityTableRequestHandler(SnmpAgent agentRef)
agentRef - instance of SnmpAgent.
public SnmpCommunityTableRequestHandler(SnmpAgent agentRef,
java.lang.String dirStr,
java.lang.String fileName,
java.lang.String format)
agentRef - Instance of SnmpAgent.dirStr - the directory location String of the File.fileName - The XML fileName from where the entries are to be
stored.format - "xml" to say that the file is of XML Format.| Method Detail |
public static int[] getSnmpCommunityTableOidRep()
public int[] getOidRep()
protected int[] getSubidList()
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,
SnmpCommunityEntry entry,
byte[] communityIndex)
throws AgentSnmpException
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 checkForRowStatus(SnmpCommunityEntry entry)
throws AgentException
public void serialize(java.io.ObjectOutputStream outMain)
outMain - the ObjectOutputStream for serializing.
public boolean createAndAddCommunityEntry(java.lang.String communityIndex,
java.lang.String communityName,
java.lang.String securityName,
java.lang.String contextID,
java.lang.String contextName,
java.lang.String communityTag,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
communityIndex - The communityIndex with which the entry
is to be created.communityName - The communityName with which the entry
is to be created.securityName - The securityName with which the entry
is to be created.contextID - The contextID with which the entry
is to be created.contextName - The contextName with which the entry
is to be created.communityTag - The communityTag with which the entry
is to be created.storageType - The storageType for the Entry.rowStatus - The RowStatus Integer for the Entry.createCommunityEntry.
public static SnmpCommunityEntry createCommunityEntry(java.lang.String communityIndex,
java.lang.String communityName,
java.lang.String securityName,
java.lang.String contextID,
java.lang.String contextName,
java.lang.String transportTag,
java.lang.Integer storageType,
java.lang.Integer rowStatus)
communityIndex - The communityIndex with which the entry
is to be created.communityName - The communityName with which the entry
is to be created.securityName - The securityName with which the entry
is to be created.contextID - The contextID with which the entry
is to be created.contextName - The contextName with which the entry
is to be created.communityTag - The communityTag with which the entry
is to be created.storageType - The storageType for the Entry.rowStatus - The RowStatus Integer for the Entry.createAndAddCommunityEntry.public void setTableVector(java.util.Vector comVec)
comVec - The Vector of SnmpCommunityEntries.public java.util.Vector getTableVector()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||