public class MonitorHelper extends Object implements AutoCloseable
IMonitorContext
.try(MonitorHelper monitorHelper = new MonitorHelper()) { monitorHelper.addWebResourceValues(myWebResource); // for example // do things with web resource values in monitor context } // at this point, web resource values are not in context any more
try(MonitorHelper monitorHelper = new MonitorHelper()) { monitorHelper.addWebResourceValues(myWebResource); // for example // do things with web resource values in monitor context IMonitorValuesProvider myServiceInstanceValueProvider = monitorHelper.addServiceInstanceValues(String serviceInstanceId); // for example // do things with service instance in monitor context monitorHelper.removeAddedValues(myServiceInstanceValueProvider); // no needed to be performed in try-finally because the monitor helper will auto remove all values in #close() // at this point service instance values are not in monitor context any more } // at this point, web resource values are not in context any more
Constructor and Description |
---|
MonitorHelper() |
Modifier and Type | Method and Description |
---|---|
IMonitorValuesProvider |
addActionValues(String objectName,
String href,
String image,
String actionName,
List<String> actionStringResourcePaths)
Add a value provider related to the given values.
|
IMonitorValuesProvider |
addActionValues(String objectName,
String href,
String image,
String actionName,
String actionStringResourcePath)
Add a value provider related to the given values.
|
IMonitorValuesProvider |
addServerValues()
Add a value provider related to the server.
|
IMonitorValuesProvider |
addServiceInstanceValues(ServiceInstanceConfig serviceInstanceConfig)
Add a value provider related to the given service instance.
|
IMonitorValuesProvider |
addServiceInstanceValues(String serviceInstanceId)
Add a value provider related to the given service instance.
|
IMonitorValuesProvider |
addServiceInterfaceInstanceValues(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig)
Add a value provider related to the given interface instance.
|
IMonitorValuesProvider |
addServiceValues(String serviceId)
Add a value provider related to the given service.
|
void |
addValues(IMonitorValuesProvider valuesProvider)
Adds the given provider in the context.
|
IMonitorValuesProvider |
addWebResourceValues(WebResource webResource)
Add a value provider related to the given web resource.
|
void |
close() |
void |
removeAddedValues(IMonitorValuesProvider provider)
Removes the given provider from context.
|
public void close()
close
in interface AutoCloseable
public void removeAddedValues(IMonitorValuesProvider provider)
provider
- the provider.public void addValues(IMonitorValuesProvider valuesProvider)
valuesProvider
- the provider.public IMonitorValuesProvider addWebResourceValues(WebResource webResource)
webResource
- the web resource.public IMonitorValuesProvider addActionValues(String objectName, String href, String image, String actionName, String actionStringResourcePath)
objectName
- the object name.href
- the object href.image
- the object image.actionName
- the action name.actionStringResourcePath
- the action string resource path.public IMonitorValuesProvider addActionValues(String objectName, String href, String image, String actionName, List<String> actionStringResourcePaths)
objectName
- the object name.href
- the object href.image
- the object image.actionName
- the action name.actionStringResourcePaths
- the action string resource paths.public IMonitorValuesProvider addServiceInstanceValues(ServiceInstanceConfig serviceInstanceConfig)
serviceInstanceConfig
- the service instance.public IMonitorValuesProvider addServiceInstanceValues(String serviceInstanceId)
serviceInstanceId
- the service instance identifier.public IMonitorValuesProvider addServerValues()
public IMonitorValuesProvider addServiceValues(String serviceId)
serviceId
- the service identifier.public IMonitorValuesProvider addServiceInterfaceInstanceValues(ServiceInterfaceInstanceConfig serviceInterfaceInstanceConfig)
serviceInterfaceInstanceConfig
- the interface instance.Lumisportal 10.1.2.170428 - Copyright © 2006–2017 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.