org.opennms.netmgt.threshd
Class CollectionResourceWrapper

java.lang.Object
  extended by org.opennms.netmgt.threshd.CollectionResourceWrapper

public class CollectionResourceWrapper
extends Object

CollectionResourceWrapper class.

Wraps a CollectionResource with some methods and caching for the efficient application of thresholds (without pulling thresholding code into CollectionResource itself) A fresh instance should be created for each collection cycle (assumptions are made based on that premise)

Version:
$Id: $
Author:
ranger

Constructor Summary
CollectionResourceWrapper(Date collectionTimestamp, int nodeId, String hostAddress, String serviceName, RrdRepository repository, CollectionResource resource, Map<String,CollectionAttribute> attributes)
          Constructor for CollectionResourceWrapper.
 
Method Summary
 Double getAttributeValue(String ds)
          getAttributeValue
 String getHostAddress()
          getHostAddress
 String getIfIndex()
          getIfIndex
protected  String getIfInfoValue(String attribute)
          getIfInfoValue
 String getIfLabel()
          getIfLabel
 String getInstance()
          getInstance
 String getLabel()
          getLabel
 String getLabelValue(String ds)
          getLabelValue
 int getNodeId()
          getNodeId
 RrdRepository getRepository()
          getRepository
 String getResourceTypeName()
          getResourceTypeName
 String getServiceName()
          getServiceName
 boolean isAnInterfaceResource()
          isAnInterfaceResource
 boolean isValidInterfaceResource()
          isValidInterfaceResource
 void setLabel(String label)
          setLabel
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionResourceWrapper

public CollectionResourceWrapper(Date collectionTimestamp,
                                 int nodeId,
                                 String hostAddress,
                                 String serviceName,
                                 RrdRepository repository,
                                 CollectionResource resource,
                                 Map<String,CollectionAttribute> attributes)

Constructor for CollectionResourceWrapper.

Parameters:
interval - a long.
nodeId - a int.
hostAddress - a String object.
serviceName - a String object.
repository - a RrdRepository object.
resource - a CollectionResource object.
attributes - a Map object.
Method Detail

getNodeId

public int getNodeId()

getNodeId

Returns:
a int.

getHostAddress

public String getHostAddress()

getHostAddress

Returns:
a String object.

getServiceName

public String getServiceName()

getServiceName

Returns:
a String object.

getRepository

public RrdRepository getRepository()

getRepository

Returns:
a RrdRepository object.

getLabel

public String getLabel()

getLabel

Returns:
a String object.

setLabel

public void setLabel(String label)

setLabel

Parameters:
label - a String object.

getInstance

public String getInstance()

getInstance

Returns:
a String object.

getResourceTypeName

public String getResourceTypeName()

getResourceTypeName

Returns:
a String object.

getIfLabel

public String getIfLabel()

getIfLabel

Returns:
a String object.

getIfIndex

public String getIfIndex()

getIfIndex

Returns:
a String object.

getIfInfoValue

protected String getIfInfoValue(String attribute)

getIfInfoValue

Parameters:
attribute - a String object.
Returns:
a String object.

isAnInterfaceResource

public boolean isAnInterfaceResource()

isAnInterfaceResource

Returns:
a boolean.

isValidInterfaceResource

public boolean isValidInterfaceResource()

isValidInterfaceResource

Returns:
a boolean.

getAttributeValue

public Double getAttributeValue(String ds)

getAttributeValue

Parameters:
ds - a String object.
Returns:
a Double object.

getLabelValue

public String getLabelValue(String ds)

getLabelValue

Parameters:
ds - a String object.
Returns:
a String object.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.