T
- The type for the Resource.public interface ResourceMonitorFactory<T>
RESOURCE_TYPE_PROPERTY
mandatory property. This property indicates
which type of Resource Monitor a Resource Monitor Factory is able to create.
The type can also be retrieved through a call to getType()
. The type
MUST be unique (two Resource Monitor Factory instances MUST not have the same
type).Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_TYPE_PROPERTY
Resource type property.
|
Modifier and Type | Method and Description |
---|---|
ResourceMonitor<T> |
createResourceMonitor(ResourceContext resourceContext)
Creates a new ResourceMonitor instance.
|
String |
getType()
Returns the type of ResourceMonitor instance this factory is able to
create.
|
static final String RESOURCE_TYPE_PROPERTY
String
. For example,
ResourceMonitoringService.RES_TYPE_CPU
String getType()
ResourceMonitor<T> createResourceMonitor(ResourceContext resourceContext) throws ResourceMonitorException
ResourceContext.addResourceMonitor(ResourceMonitor)
is called by
the factory). The newly ResourceMonitor instance is disabled. It can be
enabled by calling ResourceMonitor.enable()
.resourceContext
- ResourceContext instance associated with the newly
created ResourceMonitor instanceResourceMonitorException
- If the factory is unable to create a
ResourceMonitor For example, when a ResourceMonitor of this type
already exists for this ResourceContextCopyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0