1 10 11 package com.sun.jmx.snmp.agent; 12 13 import java.io.Serializable ; 16 import java.util.Hashtable ; 17 import java.util.Enumeration ; 18 19 import com.sun.jmx.snmp.SnmpValue; 22 import com.sun.jmx.snmp.SnmpVarBind; 23 import com.sun.jmx.snmp.SnmpStatusException; 24 import com.sun.jmx.snmp.agent.SnmpMibOid; 25 import com.sun.jmx.snmp.agent.SnmpMibNode; 26 27 39 40 public abstract class SnmpMibEntry extends SnmpMibNode 41 implements Serializable { 42 43 51 public abstract boolean isVariable(long arc); 52 53 61 public abstract boolean isReadable(long arc); 62 63 67 public long getNextVarId(long id, Object userData) 68 throws SnmpStatusException { 69 long nextvar = super.getNextVarId(id,userData); 70 while (!isReadable(nextvar)) 71 nextvar = super.getNextVarId(nextvar,userData); 72 return nextvar; 73 } 74 75 87 public void validateVarId(long arc, Object userData) 88 throws SnmpStatusException { 89 if (isVariable(arc) == false) throw noSuchNameException; 90 } 91 92 118 abstract public void get(SnmpMibSubRequest req, int depth) 119 throws SnmpStatusException; 120 121 147 abstract public void set(SnmpMibSubRequest req, int depth) 148 throws SnmpStatusException; 149 150 178 abstract public void check(SnmpMibSubRequest req, int depth) 179 throws SnmpStatusException; 180 181 } 182 | Popular Tags |