Package org.opennms.netmgt.capsd.snmp
Class SnmpTable<T extends SnmpStore>
- java.lang.Object
-
- org.opennms.netmgt.snmp.CollectionTracker
-
- org.opennms.netmgt.snmp.AggregateTracker
-
- org.opennms.netmgt.capsd.snmp.SnmpTable<T>
-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Collectable,ProxiableTracker
- Direct Known Subclasses:
TcaData
public abstract class SnmpTable<T extends SnmpStore> extends AggregateTracker implements Collection<T>
Abstract SnmpTable class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSnmpTable(InetAddress address, String tableName, NamedSnmpVar[] columns)Constructor for SnmpTable.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanadd(T e)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)protected abstract TcreateTableEntry(SnmpObjId base, SnmpInstId inst, Object val)createTableEntryCollection<T>getEntries()getEntriesbooleanisEmpty()Iterator<T>iterator()iteratorbooleanremove(Object o)booleanremoveAll(Collection<?> c)protected voidreportFatalErr(ErrorStatusException ex)protected voidreportGenErr(String msg)protected voidreportNonFatalErr(ErrorStatus status)protected voidreportNoSuchNameErr(String msg)booleanretainAll(Collection<?> c)intsize()protected voidstoreResult(SnmpResult res)Object[]toArray()<S> S[]toArray(S[] a)-
Methods inherited from class org.opennms.netmgt.snmp.AggregateTracker
buildNextPdu, getWalkRequests, handleWalkResponses, isFinished, setFailed, setMaxRepetitions, setMaxRetries, setTimedOut
-
Methods inherited from class org.opennms.netmgt.snmp.CollectionTracker
failed, getCollectionTracker, getParent, reportTooBigErr, setFinished, setParent, timedOut
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
SnmpTable
protected SnmpTable(InetAddress address, String tableName, NamedSnmpVar[] columns)
Constructor for SnmpTable.
- Type Parameters:
T- a T object.- Parameters:
address- aInetAddressobject.tableName- aStringobject.columns- an array oforg.opennms.netmgt.capsd.snmp.NamedSnmpVarobjects.
-
-
Method Detail
-
storeResult
protected void storeResult(SnmpResult res)
- Overrides:
storeResultin classCollectionTracker
-
createTableEntry
protected abstract T createTableEntry(SnmpObjId base, SnmpInstId inst, Object val)
createTableEntry
- Parameters:
base- aSnmpObjIdobject.inst- aSnmpInstIdobject.val- aObjectobject.- Returns:
- a T object.
-
getEntries
public Collection<T> getEntries()
getEntries
- Returns:
- a
Listobject.
-
reportGenErr
protected void reportGenErr(String msg)
- Overrides:
reportGenErrin classCollectionTracker
-
reportNoSuchNameErr
protected void reportNoSuchNameErr(String msg)
- Overrides:
reportNoSuchNameErrin classCollectionTracker
-
reportFatalErr
protected void reportFatalErr(ErrorStatusException ex)
- Overrides:
reportFatalErrin classCollectionTracker
-
reportNonFatalErr
protected void reportNonFatalErr(ErrorStatus status)
- Overrides:
reportNonFatalErrin classCollectionTracker
-
add
public boolean add(T e)
- Specified by:
addin interfaceCollection<T extends SnmpStore>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T extends SnmpStore>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T extends SnmpStore>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T extends SnmpStore>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T extends SnmpStore>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T extends SnmpStore>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T extends SnmpStore>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T extends SnmpStore>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<T extends SnmpStore>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T extends SnmpStore>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T extends SnmpStore>
-
toArray
public <S> S[] toArray(S[] a)
- Specified by:
toArrayin interfaceCollection<T extends SnmpStore>
-
-