Interface IMonitorValuesProvider
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AbstractMonitorValuesProvider
,ABTestMonitorValuesProvider
,BusinessContextMonitorValuesProvider
,ClientOriginValuesProvider
,FlowManager.AutomationFlowMonitorValuesProvider
,GeoLocationValuesProvider
,InitialOriginValuesProvider
,MonitorEventValuesProvider
,OriginValueProvider
,ProjectIdMonitorValuesProvider
,SimpleMonitorValuesProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@StableMinor(version="17.0", sinceVersion="12.2") @FunctionalInterface public interface IMonitorValuesProvider extends java.io.Serializable
Interface that provides data to monitor framework when it needs.
For performance reasons,IMonitorValuesProvider
implementations should guarantee that no unnecessary processing is performed (even more when it is costly) in its constructor. To be more efficient, any processing that can be postponed togetValues(SessionConfig, IMonitorField, ITransaction)
should do so.It is important to notice that
getValues(SessionConfig, IMonitorField, ITransaction)
may be called more than once for more than one field. Thus, implementations are highly advised to cache the results.This interface is not considered to be thread-safe (it may be called from different threads concurrently). Implementations must guarantee thread-safety.
To ease development,
AbstractMonitorValuesProvider
can be used as a base implementation. It provides both, thread-safety and value caching.- Since:
- 9.0.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<? extends java.io.Serializable>
getValues(SessionConfig sessionConfig, IMonitorField field, ITransaction transaction)
Returns the values for the given field.
If this value provider does not provide values for the given field, it must returnnull
.
Note that returning anull
value is not the same as returning an empty list.
-
-
-
Method Detail
-
getValues
java.util.List<? extends java.io.Serializable> getValues(SessionConfig sessionConfig, IMonitorField field, ITransaction transaction) throws java.lang.Exception
Returns the values for the given field.
If this value provider does not provide values for the given field, it must returnnull
.
Note that returning anull
value is not the same as returning an empty list. When returning an empty list, it is implied that the field has an explicitnull
value. When anull
value is returned, then other value providers will be called. If a non-null
value is returned (even an empty list), then other value providers will not be called. Anynull
value or empty string in the returned list will be ignored, meaning that a list with onlynull
or empty strings will be considered an empty list.It is important to notice also that the given session config is not the session of the user that generated the monitoring event. Instead, it is a
system user
session.
As well as session config, the given transaction is not related to the transaction that generated the event (if any).- Parameters:
sessionConfig
- the current session.field
- the desired field.transaction
- the current transaction.- Returns:
- the values for the desired field.
- Throws:
java.lang.Exception
- if some error occur.- Since:
- 12.2.0
-
-