Package oracle.jdbc.diagnostics

## Class DefaultTraceEventListenerProvider

- java.lang.Object
- - oracle.jdbc.diagnostics.DefaultTraceEventListenerProvider

All Implemented Interfaces:
  `OracleResourceProvider`, `TraceEventListenerProvider`

    public final class DefaultTraceEventListenerProvider
    extends java.lang.Object
    implements TraceEventListenerProvider

The default `TraceEventListener` provider of Oracle JDBC. This provider is designed to be loaded using `ServiceLoader`. The name of this provider is the default value of the `OracleConnection.CONNECTION_PROPERTY_PROVIDER_TRACE_EVENT_LISTENER` connection property.

Since:
  23

### Nested Class Summary

### Nested classes/interfaces inherited from interface oracle.jdbc.spi.OracleResourceProvider

`OracleResourceProvider.Parameter`

### Field Summary

Fields
`static TraceEventListener` `NO_OP_TRACE_EVENT_LISTENER` A listener that does nothing.

### Constructor Summary

Constructors
`DefaultTraceEventListenerProvider()` Public no-args constructor required by `ServiceLoader`.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getName()` Returns the name of this provider.
`TraceEventListener` `getTraceEventListener​(java.util.Map<OracleResourceProvider.Parameter,​java.lang.CharSequence> parameterValues)` Returns a `TraceEventListener` that receives application and system tracing events.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface oracle.jdbc.spi.OracleResourceProvider

`getParameters`

### Field Detail

#### NO_OP_TRACE_EVENT_LISTENER

    public static final TraceEventListener NO_OP_TRACE_EVENT_LISTENER

A listener that does nothing. This listener is provided if the dms.jar is not on the class path.

### Constructor Detail

#### DefaultTraceEventListenerProvider

    public DefaultTraceEventListenerProvider()

Public no-args constructor required by `ServiceLoader`. The check for the dms.jar happens here.

### Method Detail

#### getName

    public java.lang.String getName()

Description copied from interface: `OracleResourceProvider`

Returns the name of this provider.

Specified by:
  `getName` in interface `OracleResourceProvider`
Returns:
  The name of this provider. Not null.

#### getTraceEventListener

    public TraceEventListener getTraceEventListener​(java.util.Map<OracleResourceProvider.Parameter,​java.lang.CharSequence> parameterValues)

Description copied from interface: `TraceEventListenerProvider`

Returns a `TraceEventListener` that receives application and system tracing events.

The `parameterValues` passed to this method is a `Map` comprised as follows:

- The key set is the same as, or a subset of, the `Parameter` objects returned by an invocation of `OracleResourceProvider.getParameters()` on this provider.
- If no value is configured for a parameter, then the `Map` contains the default value of that `Parameter`, if any. If the parameter has no default value, then the map does not contain an entry for that `Parameter`.
- The `Map` does not contain entries having null values.

The `parameterValues` `Map` may contain a `CharSequence` having a security sensitive value. After this method returns, the caller may wipe the contents of these `CharSequence` values from memory. Implementations of this method should not retain a reference to these `CharSequence` objects.

Specified by:
  `getTraceEventListener` in interface `TraceEventListenerProvider`
Parameters:
  `parameterValues` - Parameters configured by connection properties . Not null. May be empty.
Returns:
  A `TraceEventListener`. Not null.