@StableMinor(version="12.0", sinceVersion="9.0") @FunctionalInterface public interface IMonitorValuesProvider extends Serializable
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 to
getValues(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.
Modifier and Type | Method and Description |
---|---|
List<? extends Serializable> |
getValues(SessionConfig sessionConfig,
IMonitorField field,
ITransaction transaction)
Returns the values for the given field.
If this value does not provide values for the given field, it must throw a FieldNotProvidedException .Note that returning a null value is not the same
as throwing a FieldNotProvidedException . |
List<? extends Serializable> getValues(SessionConfig sessionConfig, IMonitorField field, ITransaction transaction) throws FieldNotProvidedException, Exception
FieldNotProvidedException
.null
value is not the same
as throwing a FieldNotProvidedException
. When returning a null
value, it is implied that the field has an explicit null
value.
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).
sessionConfig
- the current session.field
- the desired field.transaction
- the current transaction.FieldNotProvidedException
- if this provider does not provide values for the given field.Exception
- if any other error occur.LumisXP 12.0.0.190809 - Copyright © 2006–2019 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.