org.opennms.netmgt.collectd
Class AliasedResource

java.lang.Object
  extended by org.opennms.netmgt.collectd.SnmpCollectionResource
      extended by org.opennms.netmgt.collectd.AliasedResource
All Implemented Interfaces:
CollectionResource, ResourceIdentifier

public class AliasedResource
extends SnmpCollectionResource


Constructor Summary
AliasedResource(ResourceType resourceType, String domain, org.opennms.netmgt.collectd.IfInfo ifInfo, String ifAliasComment, String ifAlias)
           
 
Method Summary
 String getDomain()
           
 Collection<AttributeGroup> getGroups()
           
 org.opennms.netmgt.collectd.IfInfo getIfInfo()
           
 String getInstance()
          Returns the name of the instance this CollectionResource represents.
 File getResourceDir(RrdRepository repository)
           
 String getResourceTypeName()
          Returns a string which indicates what type of resource.
 int getType()
          Returns something like an ifType; is (but not sure if it should be) -1 for non interface type collections, otherwise the SNMP type of the interface.
 boolean isScheduledForCollection()
           
 boolean rescanNeeded()
           
 boolean shouldPersist(ServiceParameters serviceParameters)
           
 String toString()
           
 void visit(CollectionSetVisitor visitor)
           
 
Methods inherited from class org.opennms.netmgt.collectd.SnmpCollectionResource
getCollectionAgent, getOwnerName, getResourceType, log, setAttributeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasedResource

public AliasedResource(ResourceType resourceType,
                       String domain,
                       org.opennms.netmgt.collectd.IfInfo ifInfo,
                       String ifAliasComment,
                       String ifAlias)
Method Detail

getIfInfo

public org.opennms.netmgt.collectd.IfInfo getIfInfo()

getDomain

public String getDomain()

getResourceDir

public File getResourceDir(RrdRepository repository)
Specified by:
getResourceDir in interface ResourceIdentifier
Specified by:
getResourceDir in class SnmpCollectionResource

toString

public String toString()
Overrides:
toString in class Object

rescanNeeded

public boolean rescanNeeded()
Specified by:
rescanNeeded in interface CollectionResource
Overrides:
rescanNeeded in class SnmpCollectionResource

isScheduledForCollection

public boolean isScheduledForCollection()

shouldPersist

public boolean shouldPersist(ServiceParameters serviceParameters)
Specified by:
shouldPersist in interface CollectionResource
Specified by:
shouldPersist in class SnmpCollectionResource

getType

public int getType()
Description copied from interface: CollectionResource
Returns something like an ifType; is (but not sure if it should be) -1 for non interface type collections, otherwise the SNMP type of the interface. Relates to ifType in datacollection-config.xml

Specified by:
getType in interface CollectionResource
Specified by:
getType in class SnmpCollectionResource
Returns:

visit

public void visit(CollectionSetVisitor visitor)
Specified by:
visit in interface CollectionResource
Overrides:
visit in class SnmpCollectionResource

getGroups

public Collection<AttributeGroup> getGroups()
Overrides:
getGroups in class SnmpCollectionResource

getResourceTypeName

public String getResourceTypeName()
Description copied from interface: CollectionResource
Returns a string which indicates what type of resource. Will be one of "node" for the node level resource "if" for network interface resources "*" for all other resource types defined in the relevant config files, e.g. hrStorage

Returns:

getInstance

public String getInstance()
Description copied from interface: CollectionResource
Returns the name of the instance this CollectionResource represents. For node level resources, this will be null to indicate the default instance. For interface level resources, some label unique to the node (ifIndex probably) For Generic resources (e.g. the SNMP GenericIndexResource), this will be some identifying label, probably the index in the table

Returns:


Copyright © 2009. All Rights Reserved.