|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.adventnet.snmp.snmp2.agent.SimpleRequestHandler
public class SimpleRequestHandler
Implements the VarBindRequestListener interface.
VarBindRequestListener,
PduRequestHandler| Field Summary | |
|---|---|
protected InstrumentHandlerInterface |
instrumentHandler
|
protected UpdateListener |
listener
The UpdateListener for persistence storage. |
protected TableModelListenerExt |
tableListener
|
(package private) boolean |
writeEachTime
|
| Constructor Summary | |
|---|---|
SimpleRequestHandler()
Default Constructor - currently does nothing. |
|
| Method Summary | |
|---|---|
void |
addInstrumentHandler(InstrumentHandlerInterface listener)
Setting of InstrumentHandler,which will be used for getting/setting attributes in Instrument files of Scalar Group |
void |
addRegistrationListener(RegistrationListener rl)
This method is called by BeanInfo for adding Registration Listener with PduRequestHandler |
void |
addTableListener(TableModelListenerExt listener)
Setting of TableModelListenerExt,which will be used if StorageType is "User Storage Model" |
void |
addUpdateListener(UpdateListener l)
Addition of UpdateListener for persistence storage of Table values. |
InstrumentHandlerInterface |
getInstrument()
Used for getting the InstrumentHandler interface reference |
static java.util.Hashtable |
getMibVarHash()
Deprecated. - use getObjectHash() for getting the details of Sub-Ids This method will be overridden in the generated handler files to return the Hashtable which has the details of the Subid List. |
void |
getNextRequest(VarBindRequestEvent pe)
This method is same as the getNextRequest(VarBindRequestEvent,AgentResource) method. |
void |
getNextRequest(VarBindRequestEvent pe,
AgentResource agentSource)
This method is called by AdventNet Extensible Agent for SNMP Get Next Requests |
java.util.Hashtable |
getObjectHash()
This method is same as getMibVarHash(),but non-static This is duplicated for backward compatibility. |
java.util.Hashtable |
getObjectTypeHash()
This method will be overridden in the generated handler files to return the Hashtable which has the details of the syntax type of each obkect in that Scalar/Table group |
int[] |
getOidRep()
Retrives the integer representation of OID |
void |
getRequest(VarBindRequestEvent pe)
This method is called by AdventNet Extensible Agent for SNMP Get Requests |
protected int[] |
getSubidList()
Gets the subid list of the oid. |
TableModelListenerExt |
getTableListener()
Used for getting the TableModelListenerExt interface reference This will be used if StorageType is "User Storage Model" |
UpdateListener |
getUpdateListener()
Getting the UpdateListener to Add/Update/Delete the entries in the persistence storage Table values. |
boolean |
isWriteEachTime()
This method gets whether the file needs to be updated on every SET request or for the whole table |
protected void |
processGetNextRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
Process the GetNext Request message which is received from PduRequestHandler. |
protected void |
processGetNextRequest(java.util.Vector list,
java.util.Vector leafNodes,
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(java.util.Vector list,
java.util.Vector leafNodes,
VarBindRequestEvent pe)
Process the Get Request message which is received from PduRequestHandler. |
protected void |
processSetRequest(SnmpVarBind varb,
AgentNode node,
VarBindRequestEvent pe)
Process the Set Request message which is received from PduRequestHandler. |
protected void |
processSetRequest(java.util.Vector list,
java.util.Vector leafNodes,
VarBindRequestEvent pe)
Process the Set Request message which is received from PduRequestHandler. |
void |
removeRegistrationListener(RegistrationListener rl)
This method is called by BeanInfo for removing Registration Listener from PduRequestHandler |
void |
removeUpdateListener()
Removal of UpdateListener for persistence storage of Table values. |
void |
setRequest(VarBindRequestEvent pe)
This method is called by AdventNet Extensible Agent for SNMP Set Requests |
void |
setWriteEachTime(boolean val)
This method can be called to set whether the file needs to be updated on every SET request or after proceesing all the SET requests ( in mult-var SET ) |
protected void |
writeIntoFile()
Writes the entry into the file if Persistence option is selected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
boolean writeEachTime
protected UpdateListener listener
protected InstrumentHandlerInterface instrumentHandler
protected TableModelListenerExt tableListener
| Constructor Detail |
|---|
public SimpleRequestHandler()
| Method Detail |
|---|
public void setWriteEachTime(boolean val)
val - the boolean valuepublic boolean isWriteEachTime()
public static java.util.Hashtable getMibVarHash()
public java.util.Hashtable getObjectHash()
public java.util.Hashtable getObjectTypeHash()
public void getRequest(VarBindRequestEvent pe)
throws AgentSnmpException
getRequest in interface VarBindRequestListenerpe - the VarBindRequestEvent contains information about
varbinds and sender
AgentSnmpException - AgentSnmpException this wraps all the
exceptions occured while processing this Request.
public void getNextRequest(VarBindRequestEvent pe)
throws AgentSnmpException
pe - the VarBindRequestEvent contains information about
varbinds and senderagentSource - The AgentResource created for this Request.
AgentSnmpException - this wraps all the exceptions occured while processing this Request.
public void getNextRequest(VarBindRequestEvent pe,
AgentResource agentSource)
throws AgentSnmpException
getNextRequest in interface VarBindRequestListenerpe - the VarBindRequestEvent contains information about
varbinds and senderagentSource - The AgentResource created for this Request.
AgentSnmpException - this wraps all the exceptions occured
while processing this Request.
public void setRequest(VarBindRequestEvent pe)
throws AgentSnmpException
setRequest in interface VarBindRequestListenerpe - the VarBindRequestEvent contains information about
varbinds and sender
AgentSnmpException - this wraps all the exceptions occured
while processing this Request.public void addRegistrationListener(RegistrationListener rl)
rl - the registration listener for an OID.public void removeRegistrationListener(RegistrationListener rl)
rl - the registration listener for an OID.
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.
AgentSnmpException - This wraps all the Exceptions thrown
while Processing the Event.
protected void processGetRequest(java.util.Vector list,
java.util.Vector leafNodes,
VarBindRequestEvent pe)
list - List of SnmpVarbinds received for which SET is to be performedleafNodes - List of AgentNodes for which GET Request is to be performedpe - The VarBind Request Event created by this Get 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.
AgentSnmpException - This wraps all the Exceptions thrown
while Processing the Event.
protected void processSetRequest(java.util.Vector list,
java.util.Vector leafNodes,
VarBindRequestEvent pe)
list - List of SnmpVarbinds received for which SET is to be performedleafNodes - List of AgentNodes for which SET Request is to be performedpe - The VarBind Request Event created by this Set request.protected void writeIntoFile()
setWriteEachTime(boolean val)
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.
AgentSnmpException - This wraps all the Exceptions thrown
while Processing the Event.
protected void processGetNextRequest(java.util.Vector list,
java.util.Vector leafNodes,
VarBindRequestEvent pe)
list - List of SnmpVarbinds received for which GETNEXT is to be performedleafNodes - List of AgentNodes for which GETNEXT Request is to be performedpe - The VarBind Request Event created by this GetNext request.public int[] getOidRep()
protected int[] getSubidList()
public void addUpdateListener(UpdateListener l)
l - The updateListener which implements the writeIntoFile method.public UpdateListener getUpdateListener()
l - The updateListener which implements the writeIntoFile method.public void removeUpdateListener()
public InstrumentHandlerInterface getInstrument()
public TableModelListenerExt getTableListener()
public void addInstrumentHandler(InstrumentHandlerInterface listener)
listener - Listener which implements InstrumentHandler Interfacepublic void addTableListener(TableModelListenerExt listener)
listener - Listener which implements TableModelListenerExt Interface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||