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 protected
SnmpTable(InetAddress address, String tableName, NamedSnmpVar[] columns)
Constructor for SnmpTable.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
add(T e)
boolean
addAll(Collection<? extends T> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
protected abstract T
createTableEntry(SnmpObjId base, SnmpInstId inst, Object val)
createTableEntryCollection<T>
getEntries()
getEntriesboolean
isEmpty()
Iterator<T>
iterator()
iteratorboolean
remove(Object o)
boolean
removeAll(Collection<?> c)
protected void
reportFatalErr(ErrorStatusException ex)
protected void
reportGenErr(String msg)
protected void
reportNonFatalErr(ErrorStatus status)
protected void
reportNoSuchNameErr(String msg)
boolean
retainAll(Collection<?> c)
int
size()
protected void
storeResult(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
- aInetAddress
object.tableName
- aString
object.columns
- an array oforg.opennms.netmgt.capsd.snmp.NamedSnmpVar
objects.
-
-
Method Detail
-
storeResult
protected void storeResult(SnmpResult res)
- Overrides:
storeResult
in classCollectionTracker
-
createTableEntry
protected abstract T createTableEntry(SnmpObjId base, SnmpInstId inst, Object val)
createTableEntry
- Parameters:
base
- aSnmpObjId
object.inst
- aSnmpInstId
object.val
- aObject
object.- Returns:
- a T object.
-
getEntries
public Collection<T> getEntries()
getEntries
- Returns:
- a
List
object.
-
reportGenErr
protected void reportGenErr(String msg)
- Overrides:
reportGenErr
in classCollectionTracker
-
reportNoSuchNameErr
protected void reportNoSuchNameErr(String msg)
- Overrides:
reportNoSuchNameErr
in classCollectionTracker
-
reportFatalErr
protected void reportFatalErr(ErrorStatusException ex)
- Overrides:
reportFatalErr
in classCollectionTracker
-
reportNonFatalErr
protected void reportNonFatalErr(ErrorStatus status)
- Overrides:
reportNonFatalErr
in classCollectionTracker
-
add
public boolean add(T e)
- Specified by:
add
in interfaceCollection<T extends SnmpStore>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAll
in interfaceCollection<T extends SnmpStore>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T extends SnmpStore>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<T extends SnmpStore>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<T extends SnmpStore>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T extends SnmpStore>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T extends SnmpStore>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<T extends SnmpStore>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<T extends SnmpStore>
-
size
public int size()
- Specified by:
size
in interfaceCollection<T extends SnmpStore>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T extends SnmpStore>
-
toArray
public <S> S[] toArray(S[] a)
- Specified by:
toArray
in interfaceCollection<T extends SnmpStore>
-
-