Search in sources :

Example 1 with FilterConfigImpl

use of io.undertow.servlet.spec.FilterConfigImpl in project undertow by undertow-io.

the class ManagedFilter method createFilter.

public void createFilter() throws ServletException {
    synchronized (this) {
        if (filter == null) {
            try {
                handle = filterInfo.getInstanceFactory().createInstance();
            } catch (Exception e) {
                throw UndertowServletMessages.MESSAGES.couldNotInstantiateComponent(filterInfo.getName(), e);
            }
            Filter filter = handle.getInstance();
            new LifecyleInterceptorInvocation(servletContext.getDeployment().getDeploymentInfo().getLifecycleInterceptors(), filterInfo, filter, new FilterConfigImpl(filterInfo, servletContext)).proceed();
            this.filter = filter;
        }
    }
}
Also used : FilterConfigImpl(io.undertow.servlet.spec.FilterConfigImpl) Filter(javax.servlet.Filter) ServletException(javax.servlet.ServletException) IOException(java.io.IOException)

Aggregations

FilterConfigImpl (io.undertow.servlet.spec.FilterConfigImpl)1 IOException (java.io.IOException)1 Filter (javax.servlet.Filter)1 ServletException (javax.servlet.ServletException)1