Class NodeLevelResource
- java.lang.Object
-
- org.opennms.netmgt.collection.support.builder.AbstractResource
-
- org.opennms.netmgt.collection.support.builder.NodeLevelResource
-
- All Implemented Interfaces:
Resource
public class NodeLevelResource extends AbstractResource
-
-
Constructor Summary
Constructors Constructor Description NodeLevelResource(int nodeId)
NodeLevelResource(int nodeId, java.lang.String path)
Deprecated.use aGenericTypeResource
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getInstance()
Returns a unique name for the instance of this resource.java.lang.String
getLabel(CollectionResource resource)
Returns a unique label for the instance of this resource.int
getNodeId()
Resource
getParent()
java.lang.String
getPath()
ResourcePath
getPath(CollectionResource resource)
Retrieves the path of the resource, relative to the repository root.java.lang.String
getTypeName()
Returns the type name associated with the resource.java.lang.String
getUnmodifiedInstance()
Returns the original unmodified unique name for the instance of this resource.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class org.opennms.netmgt.collection.support.builder.AbstractResource
getTimestamp, resolve, setTimestamp
-
-
-
-
Constructor Detail
-
NodeLevelResource
public NodeLevelResource(int nodeId)
-
NodeLevelResource
public NodeLevelResource(int nodeId, java.lang.String path)
Deprecated.use aGenericTypeResource
insteadAllows node level resources to live in a sub-directory of the node directory when the path is set to a non-null value. This is generally not recommend, and these cases should be modeled usingGenericTypeResource
s instead, however it exists for backwards compatibility with the JMX collector.- Parameters:
nodeId
- the node idpath
- sub-directory of the node directory
-
-
Method Detail
-
getNodeId
public int getNodeId()
-
getPath
public java.lang.String getPath()
-
getParent
public Resource getParent()
-
getInstance
public java.lang.String getInstance()
Description copied from interface:Resource
Returns a unique name for the instance of this resource. Used by theIndexStorageStrategy
- Returns:
- instance name
-
getUnmodifiedInstance
public java.lang.String getUnmodifiedInstance()
Description copied from interface:Resource
Returns the original unmodified unique name for the instance of this resource. Used by theObjectNameStorageStrategy
- Returns:
- instance name
-
getPath
public ResourcePath getPath(CollectionResource resource)
Description copied from interface:Resource
Retrieves the path of the resource, relative to the repository root.- Parameters:
resource
- Used by theGenericTypeResource
in order to determine the instance name.- Returns:
- relative path
-
getLabel
public java.lang.String getLabel(CollectionResource resource)
Description copied from interface:Resource
Returns a unique label for the instance of this resource. This label is used by threshd to generate a unique id on a per resource basis, grouped by node. SeeCollectionResourceWrapper
- Returns:
- a
String
object.
-
getTypeName
public java.lang.String getTypeName()
Description copied from interface:Resource
Returns the type name associated with the resource. Used for thresholding.- Returns:
- type name
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-