public class DefaultRecordListenerProvider extends Object implements RecordListenerProvider, Serializable
RecordListenerProvider
.
This implementation just wraps an instance of RecordListener
, always
providing the same.
Constructor and Description |
---|
DefaultRecordListenerProvider(RecordListener listener)
Create a new provider instance from an argument listener.
|
Modifier and Type | Method and Description |
---|---|
RecordListener |
provide()
Provide a
RecordListener instance. |
static RecordListenerProvider[] |
providers(RecordListener... listeners)
Convenience method to construct an array of
DefaultRecordListenerProvider from an array of
RecordListener instances. |
String |
toString() |
public DefaultRecordListenerProvider(RecordListener listener)
listener
- The argument listener.public static RecordListenerProvider[] providers(RecordListener... listeners)
DefaultRecordListenerProvider
from an array of
RecordListener
instances.public final RecordListener provide()
RecordListener
instance.
Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
A RecordListener
shall be provided exactly once per
UpdatableRecord
manipulation, i.e. per
RecordContext
.
provide
in interface RecordListenerProvider
RecordListener
instance.RecordListener
,
RecordContext
,
DefaultRecordListenerProvider
Copyright © 2017. All Rights Reserved.