public class DefaultDiagnosticsListenerProvider extends Object implements DiagnosticsListenerProvider, Serializable
DiagnosticsListenerProvider
.
This implementation just wraps an instance of DiagnosticsListener
,
always providing the same.
Constructor and Description |
---|
DefaultDiagnosticsListenerProvider(DiagnosticsListener listener)
Create a new provider instance from an argument listener.
|
Modifier and Type | Method and Description |
---|---|
DiagnosticsListener |
provide()
Provide an
DiagnosticsListener instance. |
static DiagnosticsListenerProvider[] |
providers(DiagnosticsListener... listeners)
Convenience method to construct an array of
DefaultDiagnosticsListenerProvider from an array of
DiagnosticsListener instances. |
String |
toString() |
public DefaultDiagnosticsListenerProvider(DiagnosticsListener listener)
listener
- The argument listener.public static DiagnosticsListenerProvider[] providers(DiagnosticsListener... listeners)
DefaultDiagnosticsListenerProvider
from an array of
DiagnosticsListener
instances.public final DiagnosticsListener provide()
DiagnosticsListener
instance.
Implementations are free to choose whether this method returns new instances at every call or whether the same instance is returned repetitively.
The lifecycle of the DiagnosticsListener
is not specified.
New instances can be provided any time clients want to reset their
diagnostics.
provide
in interface DiagnosticsListenerProvider
DiagnosticsListener
instance.DiagnosticsListener
,
DefaultDiagnosticsListenerProvider
Copyright © 2019. All rights reserved.