InstanceManager (Apache Tomcat 9.0.69 API Documentation)

Package org.apache.tomcat

## Interface InstanceManager

- All Known Implementing Classes:
    `DefaultInstanceManager`, `SimpleInstanceManager`

      public interface InstanceManager

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `default void` | `backgroundProcess()` | Called by the component using the InstanceManager periodically to perform any regular maintenance that might be required.
    `void` | `destroyInstance​(java.lang.Object o)` |
    `java.lang.Object` | `newInstance​(java.lang.Class<?> clazz)` |
    `void` | `newInstance​(java.lang.Object o)` |
    `java.lang.Object` | `newInstance​(java.lang.String className)` |
    `java.lang.Object` | `newInstance​(java.lang.String fqcn, java.lang.ClassLoader classLoader)` |

- - ### Method Detail

    - #### newInstance

          java.lang.Object newInstance​(java.lang.Class<?> clazz)
                                throws java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException,
                                       javax.naming.NamingException,
                                       java.lang.InstantiationException,
                                       java.lang.IllegalArgumentException,
                                       java.lang.NoSuchMethodException,
                                       java.lang.SecurityException

      Throws:
        `java.lang.IllegalAccessException`
        `java.lang.reflect.InvocationTargetException`
        `javax.naming.NamingException`
        `java.lang.InstantiationException`
        `java.lang.IllegalArgumentException`
        `java.lang.NoSuchMethodException`
        `java.lang.SecurityException`

    - #### newInstance

          java.lang.Object newInstance​(java.lang.String className)
                                throws java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException,
                                       javax.naming.NamingException,
                                       java.lang.InstantiationException,
                                       java.lang.ClassNotFoundException,
                                       java.lang.IllegalArgumentException,
                                       java.lang.NoSuchMethodException,
                                       java.lang.SecurityException

      Throws:
        `java.lang.IllegalAccessException`
        `java.lang.reflect.InvocationTargetException`
        `javax.naming.NamingException`
        `java.lang.InstantiationException`
        `java.lang.ClassNotFoundException`
        `java.lang.IllegalArgumentException`
        `java.lang.NoSuchMethodException`
        `java.lang.SecurityException`

    - #### newInstance

          java.lang.Object newInstance​(java.lang.String fqcn,
                                       java.lang.ClassLoader classLoader)
                                throws java.lang.IllegalAccessException,
                                       java.lang.reflect.InvocationTargetException,
                                       javax.naming.NamingException,
                                       java.lang.InstantiationException,
                                       java.lang.ClassNotFoundException,
                                       java.lang.IllegalArgumentException,
                                       java.lang.NoSuchMethodException,
                                       java.lang.SecurityException

      Throws:
        `java.lang.IllegalAccessException`
        `java.lang.reflect.InvocationTargetException`
        `javax.naming.NamingException`
        `java.lang.InstantiationException`
        `java.lang.ClassNotFoundException`
        `java.lang.IllegalArgumentException`
        `java.lang.NoSuchMethodException`
        `java.lang.SecurityException`

    - #### newInstance

          void newInstance​(java.lang.Object o)
                    throws java.lang.IllegalAccessException,
                           java.lang.reflect.InvocationTargetException,
                           javax.naming.NamingException

      Throws:
        `java.lang.IllegalAccessException`
        `java.lang.reflect.InvocationTargetException`
        `javax.naming.NamingException`

    - #### destroyInstance

          void destroyInstance​(java.lang.Object o)
                        throws java.lang.IllegalAccessException,
                               java.lang.reflect.InvocationTargetException

      Throws:
        `java.lang.IllegalAccessException`
        `java.lang.reflect.InvocationTargetException`

    - #### backgroundProcess

          default void backgroundProcess()

      Called by the component using the InstanceManager periodically to perform any regular maintenance that might be required. By default, this method is a NO-OP.