public interface ResourceMonitorFactory
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 |
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 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 © OSGi Alliance (2000, 2015). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0