Package org.apache.tomcat.jdbc.pool
Class PoolProperties.InterceptorDefinition
- java.lang.Object
-
- org.apache.tomcat.jdbc.pool.PoolProperties.InterceptorDefinition
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- PoolProperties
public static class PoolProperties.InterceptorDefinition extends java.lang.Object implements java.io.SerializableDefinition of a JDBC interceptor with its configuration properties.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringclassNameInterceptor class name.protected java.lang.Class<?>clazzCached interceptor class.protected java.util.Map<java.lang.String,PoolProperties.InterceptorProperty>propertiesMap of interceptor properties.
-
Constructor Summary
Constructors Constructor Description InterceptorDefinition(java.lang.Class<?> cl)Constructs an InterceptorDefinition with the given class.InterceptorDefinition(java.lang.String className)Constructs an InterceptorDefinition with the given class name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(java.lang.String name, java.lang.String value)Adds a property with the given name and value.voidaddProperty(PoolProperties.InterceptorProperty p)Adds the given interceptor property.java.lang.StringgetClassName()Returns the interceptor class name.java.lang.Class<? extends JdbcInterceptor>getInterceptorClass()Returns the interceptor class, loading it if necessary.java.util.Map<java.lang.String,PoolProperties.InterceptorProperty>getProperties()Returns the map of interceptor properties.
-
-
-
Field Detail
-
className
protected java.lang.String className
Interceptor class name.
-
properties
protected java.util.Map<java.lang.String,PoolProperties.InterceptorProperty> properties
Map of interceptor properties.
-
clazz
protected volatile java.lang.Class<?> clazz
Cached interceptor class.
-
-
Constructor Detail
-
InterceptorDefinition
public InterceptorDefinition(java.lang.String className)
Constructs an InterceptorDefinition with the given class name.- Parameters:
className- the interceptor class name
-
InterceptorDefinition
public InterceptorDefinition(java.lang.Class<?> cl)
Constructs an InterceptorDefinition with the given class.- Parameters:
cl- the interceptor class
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
Returns the interceptor class name.- Returns:
- the class name
-
addProperty
public void addProperty(java.lang.String name, java.lang.String value)Adds a property with the given name and value.- Parameters:
name- the property namevalue- the property value
-
addProperty
public void addProperty(PoolProperties.InterceptorProperty p)
Adds the given interceptor property.- Parameters:
p- the property to add
-
getProperties
public java.util.Map<java.lang.String,PoolProperties.InterceptorProperty> getProperties()
Returns the map of interceptor properties.- Returns:
- the properties map
-
getInterceptorClass
public java.lang.Class<? extends JdbcInterceptor> getInterceptorClass() throws java.lang.ClassNotFoundException
Returns the interceptor class, loading it if necessary.- Returns:
- the interceptor class
- Throws:
java.lang.ClassNotFoundException- if the class cannot be found
-
-