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, java.lang.String domain, IfInfo ifInfo, java.lang.String ifAliasComment, java.lang.String ifAlias)
Constructor for AliasedResource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDomain()
getDomainjava.util.Collection<AttributeGroup>
getGroups()
getGroupsIfInfo
getIfInfo()
getIfInfojava.lang.String
getInstance()
getInstancejava.lang.String
getInterfaceLabel()
getLabelResourcePath
getParent()
Returns the name of the parent resource.ResourcePath
getPath()
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.java.lang.String
getResourceTypeName()
getResourceTypeNameint
getSnmpIfType()
getTypeTimeKeeper
getTimeKeeper()
Returns a not-nullTimeKeeper
instance when this resource requires to use a special timestamp when updating RRDs/JRBs.java.lang.String
getUnmodifiedInstance()
Returns the unmodified instance string thisCollectionResource
represents.boolean
isScheduledForCollection()
isScheduledForCollectionboolean
rescanNeeded()
rescanNeededboolean
shouldPersist(ServiceParameters serviceParameters)
Determines whether the attribute should be persisted.java.lang.String
toString()
toStringvoid
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)-
Methods inherited from class org.opennms.netmgt.collectd.SnmpCollectionResource
getCollectionAgent, getGroupType, getOwnerName, getResourceType, getStringAttributes, setAttributeValue
-
-
-
-
Constructor Detail
-
AliasedResource
public AliasedResource(ResourceType resourceType, java.lang.String domain, IfInfo ifInfo, java.lang.String ifAliasComment, java.lang.String ifAlias)
Constructor for AliasedResource.
- Parameters:
resourceType
- aResourceType
object.domain
- aString
object.ifInfo
- aIfInfo
object.ifAliasComment
- aString
object.ifAlias
- aString
object.
-
-
Method Detail
-
getDomain
public java.lang.String getDomain()
getDomain
- Returns:
- a
String
object.
-
getPath
public ResourcePath getPath()
Description copied from interface:ResourceIdentifier
Retrieves path for the resource, relative to the root of the associatedRrdRepository
.- Returns:
ResourcePath
object.
-
toString
public java.lang.String toString()
toString
- Overrides:
toString
in classjava.lang.Object
- Returns:
- a
String
object.
-
rescanNeeded
public boolean rescanNeeded()
rescanNeeded
- Specified by:
rescanNeeded
in interfaceCollectionResource
- Overrides:
rescanNeeded
in 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:
shouldPersist
in interfacePersistable
- Specified by:
shouldPersist
in classSnmpCollectionResource
- Parameters:
serviceParameters
- aServiceParameters
object.- Returns:
- a boolean.
-
getSnmpIfType
public int getSnmpIfType()
getType
- Specified by:
getSnmpIfType
in 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:
visit
in interfaceCollectionVisitable
- Overrides:
visit
in classSnmpCollectionResource
- Parameters:
visitor
- aCollectionSetVisitor
object.
-
getGroups
public java.util.Collection<AttributeGroup> getGroups()
getGroups
- Overrides:
getGroups
in classSnmpCollectionResource
- Returns:
- a
Collection
object.
-
getResourceTypeName
public java.lang.String getResourceTypeName()
getResourceTypeName
- Returns:
- a
String
object.
-
getInstance
public java.lang.String getInstance()
getInstance
- Returns:
- a
String
object.
-
getUnmodifiedInstance
public java.lang.String getUnmodifiedInstance()
Description copied from interface:CollectionResource
Returns the unmodified instance string thisCollectionResource
represents.- Returns:
- a
String
object.
-
getParent
public ResourcePath getParent()
Description copied from interface:CollectionResource
Returns the name of the parent resource.- Returns:
- a
String
object.
-
getInterfaceLabel
public java.lang.String getInterfaceLabel()
getLabel
- Returns:
- a
String
object.
-
getTimeKeeper
public TimeKeeper getTimeKeeper()
Description copied from interface:CollectionResource
Returns a not-nullTimeKeeper
instance when this resource requires to use a special timestamp when updating RRDs/JRBs. If the resource doesn't need a specialTimeKeeper
it should return null.- Specified by:
getTimeKeeper
in interfaceCollectionResource
- Overrides:
getTimeKeeper
in classSnmpCollectionResource
- Returns:
- a
TimeKeeper
object or null to indicate thatDefaultTimeKeeper
should be used.
-
-