PoolProperties.InterceptorDefinition (Apache Tomcat 11.0.25 API Documentation)
Description: declaration: package: org.apache.tomcat.jdbc.pool, class: PoolProperties, class: InterceptorDefinition

# Class PoolProperties.InterceptorDefinition

java.lang.Object
org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorDefinition

All Implemented Interfaces:
  `Serializable`

Enclosing class:
  `PoolProperties`

public static class PoolProperties.InterceptorDefinition extends Object implements Serializable
Definition of a JDBC interceptor with its configuration properties.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `className`
  Interceptor class name.
  `protected Class<?>`
  `clazz`
  Cached interceptor class.
  `protected Map<String, PoolProperties.InterceptorProperty>`
  `properties`
  Map of interceptor properties.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `InterceptorDefinition(Class<?> cl)`
  Constructs an InterceptorDefinition with the given class.
  `InterceptorDefinition(String className)`
  Constructs an InterceptorDefinition with the given class name.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addProperty(String name, String value)`
  Adds a property with the given name and value.
  `void`
  `addProperty(PoolProperties.InterceptorProperty p)`
  Adds the given interceptor property.
  `String`
  `getClassName()`
  Returns the interceptor class name.
  `Class<? extends JdbcInterceptor>`
  `getInterceptorClass()`
  Returns the interceptor class, loading it if necessary.
  `Map<String, PoolProperties.InterceptorProperty>`
  `getProperties()`
  Returns the map of interceptor properties.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### className

    protected String className
    Interceptor class name.

  - ### properties

    protected Map<String, PoolProperties.InterceptorProperty> properties
    Map of interceptor properties.

  - ### clazz

    protected volatile Class<?> clazz
    Cached interceptor class.

- ## Constructor Details

  - ### InterceptorDefinition

    public InterceptorDefinition(String className)
    Constructs an InterceptorDefinition with the given class name.
    Parameters:
      `className` - the interceptor class name

  - ### InterceptorDefinition

    public InterceptorDefinition(Class<?> cl)
    Constructs an InterceptorDefinition with the given class.
    Parameters:
      `cl` - the interceptor class

- ## Method Details

  - ### getClassName

    public String getClassName()
    Returns the interceptor class name.
    Returns:
      the class name

  - ### addProperty

    public void addProperty(String name, String value)
    Adds a property with the given name and value.
    Parameters:
      `name` - the property name
      `value` - the property value

  - ### addProperty

    public void addProperty(PoolProperties.InterceptorProperty p)
    Adds the given interceptor property.
    Parameters:
      `p` - the property to add

  - ### getProperties

    public Map<String, PoolProperties.InterceptorProperty> getProperties()
    Returns the map of interceptor properties.
    Returns:
      the properties map

  - ### getInterceptorClass

    public Class<? extends JdbcInterceptor> getInterceptorClass() throws ClassNotFoundException
    Returns the interceptor class, loading it if necessary.
    Returns:
      the interceptor class
    Throws:
      `ClassNotFoundException` - if the class cannot be found