Package org.opennms.netmgt.collectd
Class AliasedResource
- java.lang.Object
-
- org.opennms.netmgt.collectd.SnmpCollectionResource
-
- org.opennms.netmgt.collectd.AliasedResource
-
- All Implemented Interfaces:
CollectionResource,CollectionVisitable,Persistable,ResourceIdentifier
public class AliasedResource extends SnmpCollectionResource
AliasedResource class.
- Version:
- $Id: $
- Author:
- ranger
-
-
Field Summary
-
Fields inherited from interface org.opennms.netmgt.collection.api.CollectionResource
RESOURCE_TYPE_IF, RESOURCE_TYPE_LATENCY, RESOURCE_TYPE_NODE
-
-
Constructor Summary
Constructors Constructor Description AliasedResource(ResourceType resourceType, String domain, IfInfo ifInfo, String ifAliasComment, String ifAlias)Constructor for AliasedResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDomain()getDomainCollection<AttributeGroup>getGroups()getGroupsIfInfogetIfInfo()getIfInfoStringgetInstance()getInstanceStringgetInterfaceLabel()getLabelResourcePathgetParent()Returns the name of the parent resource.ResourcePathgetPath()Retrieves path for the resource, relative to the root of the associatedRrdRepository.StringgetResourceTypeName()getResourceTypeNameintgetSnmpIfType()getTypeTimeKeepergetTimeKeeper()Returns a not-nullTimeKeeperinstance when this resource requires to use a special timestamp when updating RRDs/JRBs.StringgetUnmodifiedInstance()Returns the unmodified instance string thisCollectionResourcerepresents.booleanisScheduledForCollection()isScheduledForCollectionbooleanrescanNeeded()rescanNeededbooleanshouldPersist(ServiceParameters serviceParameters)Determines whether the attribute should be persisted.StringtoString()toStringvoidvisit(CollectionSetVisitor visitor)Provide a way to visit all the values in the CollectionSet, for any appropriate purposes (persisting, thresholding, or others) The expectation is that calling this method will ultimately call visitResource, visitGroup and visitAttribute (as appropriate)-
Methods inherited from class org.opennms.netmgt.collectd.SnmpCollectionResource
getCollectionAgent, getGroupType, getOwnerName, getResourceType, getStringAttributes, setAttributeValue
-
-
-
-
Constructor Detail
-
AliasedResource
public AliasedResource(ResourceType resourceType, String domain, IfInfo ifInfo, String ifAliasComment, String ifAlias)
Constructor for AliasedResource.
- Parameters:
resourceType- aResourceTypeobject.domain- aStringobject.ifInfo- aIfInfoobject.ifAliasComment- aStringobject.ifAlias- aStringobject.
-
-
Method Detail
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifierRetrieves path for the resource, relative to the root of the associatedRrdRepository.- Returns:
ResourcePathobject.
-
toString
public String toString()
toString
-
rescanNeeded
public boolean rescanNeeded()
rescanNeeded
- Specified by:
rescanNeededin interfaceCollectionResource- Overrides:
rescanNeededin classSnmpCollectionResource- Returns:
- a boolean.
-
isScheduledForCollection
public boolean isScheduledForCollection()
isScheduledForCollection
- Returns:
- a boolean.
-
shouldPersist
public boolean shouldPersist(ServiceParameters serviceParameters)
Determines whether the attribute should be persisted.- Specified by:
shouldPersistin interfacePersistable- Specified by:
shouldPersistin classSnmpCollectionResource- Parameters:
serviceParameters- aServiceParametersobject.- Returns:
- a boolean.
-
getSnmpIfType
public int getSnmpIfType()
getType
- Specified by:
getSnmpIfTypein classSnmpCollectionResource- Returns:
- a int.
-
visit
public void visit(CollectionSetVisitor visitor)
Provide a way to visit all the values in the CollectionSet, for any appropriate purposes (persisting, thresholding, or others) The expectation is that calling this method will ultimately call visitResource, visitGroup and visitAttribute (as appropriate)- Specified by:
visitin interfaceCollectionVisitable- Overrides:
visitin classSnmpCollectionResource- Parameters:
visitor- aCollectionSetVisitorobject.
-
getGroups
public Collection<AttributeGroup> getGroups()
getGroups
- Overrides:
getGroupsin classSnmpCollectionResource- Returns:
- a
Collectionobject.
-
getResourceTypeName
public String getResourceTypeName()
getResourceTypeName
- Returns:
- a
Stringobject.
-
getUnmodifiedInstance
public String getUnmodifiedInstance()
Description copied from interface:CollectionResourceReturns the unmodified instance string thisCollectionResourcerepresents.- Returns:
- a
Stringobject.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResourceReturns the name of the parent resource.- Returns:
- a
Stringobject.
-
getTimeKeeper
public TimeKeeper getTimeKeeper()
Description copied from interface:CollectionResourceReturns a not-nullTimeKeeperinstance when this resource requires to use a special timestamp when updating RRDs/JRBs. If the resource doesn't need a specialTimeKeeperit should return null.- Specified by:
getTimeKeeperin interfaceCollectionResource- Overrides:
getTimeKeeperin classSnmpCollectionResource- Returns:
- a
TimeKeeperobject or null to indicate thatDefaultTimeKeepershould be used.
-
-