Interface Resource
-
- All Known Implementing Classes:
AbstractResource,DeferredGenericTypeResource,GenericTypeResource,InterfaceLevelResource,LatencyTypeResource,NodeLevelResource,PerspectiveResponseTimeResource
public interface Resource
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetInstance()Returns a unique name for the instance of this resource.StringgetLabel(CollectionResource resource)Returns a unique label for the instance of this resource.ResourcegetParent()ResourcePathgetPath(CollectionResource resource)Retrieves the path of the resource, relative to the repository root.DategetTimestamp()Returns theDateto use for attributes associated with this resource.StringgetTypeName()Returns the type name associated with the resource.StringgetUnmodifiedInstance()Returns the original unmodified unique name for the instance of this resource.Resourceresolve()Used to lookup additional resource related information that may not have been available when the resource was created, and optionally return a new resource.
-
-
-
Method Detail
-
getParent
Resource getParent()
-
getTypeName
String getTypeName()
Returns the type name associated with the resource. Used for thresholding.- Returns:
- type name
-
getInstance
String getInstance()
Returns a unique name for the instance of this resource. Used by theIndexStorageStrategy- Returns:
- instance name
-
getUnmodifiedInstance
String getUnmodifiedInstance()
Returns the original unmodified unique name for the instance of this resource. Used by theObjectNameStorageStrategy- Returns:
- instance name
-
getLabel
String getLabel(CollectionResource 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
Stringobject.
-
getPath
ResourcePath getPath(CollectionResource resource)
Retrieves the path of the resource, relative to the repository root.- Parameters:
resource- Used by theGenericTypeResourcein order to determine the instance name.- Returns:
- relative path
-
getTimestamp
Date getTimestamp()
Returns theDateto use for attributes associated with this resource.- Returns:
- a
Dateor null if the current time should be used.
-
resolve
Resource resolve()
Used to lookup additional resource related information that may not have been available when the resource was created, and optionally return a new resource.
See
DeferredGenericTypeResource.resolve().This method should only be called when running in the context of the OpenNMS JVM (and not the Minion).
- Returns:
- possibly a new resource, or this same instance if no resolving was performed
-
-