Methods Summary |
---|
public void | check(SnmpMibRequest inRequest)Checks if a set operation can be performed.
If the operation can not be performed, the method should emit a
SnmpStatusException .
if(isDebugOn()) trace("check","Check in Exception");
throw new SnmpStatusException(SnmpDefinitions.snmpRspNotWritable);
|
private void | debug(java.lang.String clz, java.lang.String func, java.lang.String info)
Trace.send(Trace.LEVEL_TRACE, Trace.INFO_ADAPTOR_SNMP, clz, func, info);
|
public void | get(SnmpMibRequest inRequest)Processes a get operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests.
if(isDebugOn()) trace("get","Get in Exception");
if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
throw new SnmpStatusException(SnmpStatusException.noSuchName);
Enumeration l = inRequest.getElements();
while(l.hasMoreElements()) {
SnmpVarBind varbind = (SnmpVarBind) l.nextElement();
varbind.setNoSuchObject();
}
|
public void | getBulk(SnmpMibRequest inRequest, int nonRepeat, int maxRepeat)Processes a getBulk operation. It will throw an exception if the request is a V1 one or it will set exceptions within the list for V2 ones.
if(isDebugOn()) trace("getBulk","GetBulk in Exception");
if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
throw new SnmpStatusException(SnmpDefinitions.snmpRspGenErr, 0);
Enumeration l = inRequest.getElements();
while(l.hasMoreElements()) {
SnmpVarBind varbind = (SnmpVarBind) l.nextElement();
varbind.setEndOfMibView();
}
|
public void | getNext(SnmpMibRequest inRequest)Processes a getNext operation. It will throw an exception for V1 requests or it will set exceptions within the list for V2 requests..
if(isDebugOn()) trace("getNext","GetNext in Exception");
if(inRequest.getVersion() == SnmpDefinitions.snmpVersionOne)
throw new SnmpStatusException(SnmpStatusException.noSuchName);
Enumeration l = inRequest.getElements();
while(l.hasMoreElements()) {
SnmpVarBind varbind = (SnmpVarBind) l.nextElement();
varbind.setEndOfMibView();
}
|
public long[] | getRootOid()Gets the root object identifier of the MIB.
The root object identifier is the object identifier uniquely
identifying the MIB.
return null;
|
public void | init()Initializes the MIB (with no registration of the MBeans into the
MBean server). Does nothing.
|
private boolean | isDebugOn()
return Trace.isSelected(Trace.LEVEL_DEBUG, Trace.INFO_ADAPTOR_SNMP);
|
public javax.management.ObjectName | preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)Initializes the MIB but each single MBean representing the MIB
is inserted into the MBean server.
return name;
|
public void | set(SnmpMibRequest inRequest)Processes a set operation. Should never be called (check previously called having failed).
if(isDebugOn()) trace("set","Set in Exception, CAN't be called");
throw new SnmpStatusException(SnmpDefinitions.snmpRspNotWritable);
|
private void | trace(java.lang.String func, java.lang.String info)
debug(dbgTag, func, info);
|