com.mysql.cj.exceptions

## Class ExceptionInterceptorChain

- java.lang.Object
- - com.mysql.cj.exceptions.ExceptionInterceptorChain

All Implemented Interfaces:
  ExceptionInterceptor

    public class ExceptionInterceptorChain
    extends Object
    implements ExceptionInterceptor

### Field Summary

Fields
`private List<ExceptionInterceptor>` `interceptors`

### Constructor Summary

Constructors
Constructor and Description
`ExceptionInterceptorChain(String interceptorClasses, Properties props, Log log)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addRingZero(ExceptionInterceptor interceptor)`
`void` `destroy()` Called by the driver when this extension should release any resources it is holding and cleanup internally before the connection is closed.
`List<ExceptionInterceptor>` `getInterceptors()`
`ExceptionInterceptor` `init(Properties properties, Log log)` Called once per connection that wants to use the extension The properties are the same ones passed in in the URL or arguments to Driver.connect() or DriverManager.getConnection().
`Exception` `interceptException(Exception sqlEx)`

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

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

### Field Detail

#### interceptors

    private List<ExceptionInterceptor> interceptors

### Constructor Detail

#### ExceptionInterceptorChain

    public ExceptionInterceptorChain(String interceptorClasses,
                                     Properties props,
                                     Log log)

### Method Detail

#### addRingZero

    public void addRingZero(ExceptionInterceptor interceptor)

#### interceptException

    public Exception interceptException(Exception sqlEx)

Specified by:
  `interceptException` in interface `ExceptionInterceptor`

#### destroy

    public void destroy()

Description copied from interface: `ExceptionInterceptor`
Called by the driver when this extension should release any resources it is holding and cleanup internally before the connection is closed.

Specified by:
  `destroy` in interface `ExceptionInterceptor`

#### init

    public ExceptionInterceptor init(Properties properties,
                                     Log log)

Description copied from interface: `ExceptionInterceptor`
Called once per connection that wants to use the extension The properties are the same ones passed in in the URL or arguments to Driver.connect() or DriverManager.getConnection().

Specified by:
  `init` in interface `ExceptionInterceptor`
Parameters:
  `properties` - configuration values as passed to the connection. Note that in order to support javax.sql.DataSources, configuration properties specific to an interceptor must be passed via setURL() on the DataSource. Extension properties are not exposed via accessor/mutator methods on DataSources.
  `log` - logger instance
Returns:
  `ExceptionInterceptor`

#### getInterceptors

    public List<ExceptionInterceptor> getInterceptors()

Copyright © 2016, 2024, Oracle and/or its affiliates.