Package org.opennms.netmgt.collectd
Class OnmsSnmpCollection
- java.lang.Object
-
- org.opennms.netmgt.collectd.OnmsSnmpCollection
-
public class OnmsSnmpCollection extends java.lang.ObjectRepresents SNMP collection data for a single collection period. It is particularly used to create a CollectionSet for a specific remote agent withcreateCollectionSet(org.opennms.netmgt.collectd.SnmpCollectionAgent)and to provide data to CollectionSet and other classes that are created during collection.- Version:
- $Id: $
- Author:
- ranger
-
-
Constructor Summary
Constructors Constructor Description OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, DataCollectionConfigDao config, LocationAwareSnmpClient client)Constructor for OnmsSnmpCollection.OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, LocationAwareSnmpClient client)Constructor for OnmsSnmpCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SnmpCollectionSetcreateCollectionSet(SnmpCollectionAgent agent)createCollectionSetjava.util.List<SnmpAttributeType>getAliasAttributeTypes(SnmpCollectionAgent agent)getAliasAttributeTypesjava.util.Collection<SnmpAttributeType>getAttributeTypes(SnmpCollectionAgent agent)getAttributeTypesjava.util.Collection<ResourceType>getGenericIndexResourceTypes(SnmpCollectionAgent agent)getGenericIndexResourceTypesIfAliasResourceTypegetIfAliasResourceType(SnmpCollectionAgent agent)getIfAliasResourceTypeIfResourceTypegetIfResourceType(SnmpCollectionAgent agent)getIfResourceTypejava.util.List<SnmpAttributeType>getIndexedAttributeTypesForResourceType(SnmpCollectionAgent agent, ResourceType resourceType)getIndexedAttributeTypesForResourceTypejava.lang.StringgetName()getNamejava.util.List<SnmpAttributeType>getNodeAttributeTypes(SnmpCollectionAgent agent)getNodeAttributeTypesNodeResourceTypegetNodeResourceType(SnmpCollectionAgent agent)getNodeResourceTypejava.util.Collection<? extends CollectionResource>getResources(SnmpCollectionAgent agent)getResourcesResourceTypegetResourceType(SnmpCollectionAgent agent, java.lang.String instanceName)getResourceTypeServiceParametersgetServiceParameters()getServiceParametersjava.lang.StringgetSnmpAuthPassPhrase(java.lang.String current)getSnmpAuthPassPhrasejava.lang.StringgetSnmpAuthProtocol(java.lang.String current)getSnmpAuthProtocolintgetSnmpMaxRepetitions(int current)getSnmpMaxRepetitionsintgetSnmpMaxRequestSize(int current)getSnmpMaxRequestSizeintgetSnmpMaxVarsPerPdu(int current)getSnmpMaxVarsPerPduintgetSnmpPort(int current)getSnmpPortjava.lang.StringgetSnmpPrivPassPhrase(java.lang.String current)getSnmpPrivPassPhrasejava.lang.StringgetSnmpPrivProtocol(java.lang.String current)getSnmpPrivProtocoljava.net.InetAddressgetSnmpProxyFor(java.net.InetAddress current)getSnmpProxyForjava.lang.StringgetSnmpReadCommunity(java.lang.String current)getSnmpReadCommunityintgetSnmpRetries(int current)getSnmpRetriesjava.lang.StringgetSnmpSecurityName(java.lang.String current)getSnmpSecurityNameintgetSnmpTimeout(int current)getSnmpTimeoutintgetSnmpVersion(int current)getSnmpVersionjava.lang.StringgetSnmpWriteCommunity(java.lang.String current)getSnmpWriteCommunityjava.lang.StringgetStorageFlag()getStorageFlagjava.util.List<SnmpAttributeType>loadAliasAttributeTypes(SnmpCollectionAgent agent)loadAliasAttributeTypesjava.util.List<SnmpAttributeType>loadAttributeTypes(SnmpCollectionAgent agent, int ifType)loadAttributeTypesvoidsetDataCollectionConfigDao(DataCollectionConfigDao config)setDataCollectionConfigjava.lang.StringtoString()toString
-
-
-
Constructor Detail
-
OnmsSnmpCollection
public OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, LocationAwareSnmpClient client)
Constructor for OnmsSnmpCollection.
- Parameters:
agent- aCollectionAgentobject.params- aServiceParametersobject.
-
OnmsSnmpCollection
public OnmsSnmpCollection(SnmpCollectionAgent agent, ServiceParameters params, DataCollectionConfigDao config, LocationAwareSnmpClient client)
Constructor for OnmsSnmpCollection.
- Parameters:
agent- aCollectionAgentobject.params- aServiceParametersobject.config- aDataCollectionConfigDaoobject.
-
-
Method Detail
-
getServiceParameters
public ServiceParameters getServiceParameters()
getServiceParameters
- Returns:
- a
ServiceParametersobject.
-
getName
public java.lang.String getName()
getName
- Returns:
- a
Stringobject.
-
getSnmpPort
public int getSnmpPort(int current)
getSnmpPort
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpRetries
public int getSnmpRetries(int current)
getSnmpRetries
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpTimeout
public int getSnmpTimeout(int current)
getSnmpTimeout
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpReadCommunity
public java.lang.String getSnmpReadCommunity(java.lang.String current)
getSnmpReadCommunity
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
getSnmpWriteCommunity
public java.lang.String getSnmpWriteCommunity(java.lang.String current)
getSnmpWriteCommunity
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
getSnmpProxyFor
public java.net.InetAddress getSnmpProxyFor(java.net.InetAddress current)
getSnmpProxyFor
- Parameters:
current- aInetAddressobject.- Returns:
- a
InetAddressobject.
-
getSnmpVersion
public int getSnmpVersion(int current)
getSnmpVersion
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpMaxVarsPerPdu
public int getSnmpMaxVarsPerPdu(int current)
getSnmpMaxVarsPerPdu
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpMaxRepetitions
public int getSnmpMaxRepetitions(int current)
getSnmpMaxRepetitions
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpMaxRequestSize
public int getSnmpMaxRequestSize(int current)
getSnmpMaxRequestSize
- Parameters:
current- a int.- Returns:
- a int.
-
getSnmpSecurityName
public java.lang.String getSnmpSecurityName(java.lang.String current)
getSnmpSecurityName
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
getSnmpAuthPassPhrase
public java.lang.String getSnmpAuthPassPhrase(java.lang.String current)
getSnmpAuthPassPhrase
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
getSnmpAuthProtocol
public java.lang.String getSnmpAuthProtocol(java.lang.String current)
getSnmpAuthProtocol
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
getSnmpPrivPassPhrase
public java.lang.String getSnmpPrivPassPhrase(java.lang.String current)
getSnmpPrivPassPhrase
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
getSnmpPrivProtocol
public java.lang.String getSnmpPrivProtocol(java.lang.String current)
getSnmpPrivProtocol
- Parameters:
current- aStringobject.- Returns:
- a
Stringobject.
-
setDataCollectionConfigDao
public void setDataCollectionConfigDao(DataCollectionConfigDao config)
setDataCollectionConfig
- Parameters:
config- aDataCollectionConfigDaoobject.
-
getStorageFlag
public java.lang.String getStorageFlag()
getStorageFlag
- Returns:
- a
Stringobject.
-
toString
public java.lang.String toString()
toString
- Overrides:
toStringin classjava.lang.Object- Returns:
- a
Stringobject.
-
createCollectionSet
public SnmpCollectionSet createCollectionSet(SnmpCollectionAgent agent)
createCollectionSet
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
SnmpCollectionSetobject.
-
getIndexedAttributeTypesForResourceType
public java.util.List<SnmpAttributeType> getIndexedAttributeTypesForResourceType(SnmpCollectionAgent agent, ResourceType resourceType)
getIndexedAttributeTypesForResourceType
- Parameters:
agent- aCollectionAgentobject.resourceType- aResourceTypeobject.- Returns:
- a
Listobject.
-
getNodeAttributeTypes
public java.util.List<SnmpAttributeType> getNodeAttributeTypes(SnmpCollectionAgent agent)
getNodeAttributeTypes
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
Listobject.
-
loadAttributeTypes
public java.util.List<SnmpAttributeType> loadAttributeTypes(SnmpCollectionAgent agent, int ifType)
loadAttributeTypes
- Parameters:
agent- aCollectionAgentobject.ifType- a int.- Returns:
- a
Listobject.
-
getResourceType
public ResourceType getResourceType(SnmpCollectionAgent agent, java.lang.String instanceName)
getResourceType
- Parameters:
agent- aCollectionAgentobject.instanceName- aStringobject.- Returns:
- a
ResourceTypeobject.
-
getNodeResourceType
public NodeResourceType getNodeResourceType(SnmpCollectionAgent agent)
getNodeResourceType
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
NodeResourceTypeobject.
-
getIfResourceType
public IfResourceType getIfResourceType(SnmpCollectionAgent agent)
getIfResourceType
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
IfResourceTypeobject.
-
getIfAliasResourceType
public IfAliasResourceType getIfAliasResourceType(SnmpCollectionAgent agent)
getIfAliasResourceType
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
IfAliasResourceTypeobject.
-
getGenericIndexResourceTypes
public java.util.Collection<ResourceType> getGenericIndexResourceTypes(SnmpCollectionAgent agent)
getGenericIndexResourceTypes
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
Collectionobject.
-
getAttributeTypes
public java.util.Collection<SnmpAttributeType> getAttributeTypes(SnmpCollectionAgent agent)
getAttributeTypes
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
Collectionobject.
-
getResources
public java.util.Collection<? extends CollectionResource> getResources(SnmpCollectionAgent agent)
getResources
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
Collectionobject.
-
loadAliasAttributeTypes
public java.util.List<SnmpAttributeType> loadAliasAttributeTypes(SnmpCollectionAgent agent)
loadAliasAttributeTypes
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
Listobject.
-
getAliasAttributeTypes
public java.util.List<SnmpAttributeType> getAliasAttributeTypes(SnmpCollectionAgent agent)
getAliasAttributeTypes
- Parameters:
agent- aCollectionAgentobject.- Returns:
- a
Listobject.
-
-