Tabnine Logo
Filter.destroy
Code IndexAdd Tabnine to your IDE (free)

How to use
destroy
method
in
javax.servlet.Filter

Best Java code snippets using javax.servlet.Filter.destroy (Showing top 20 results out of 1,098)

origin: spring-projects/spring-framework

@Override
public void destroy() {
  this.delegate.destroy();
}
origin: jenkinsci/jenkins

public void destroy() {
  // the filter can be null if the filter is not initialized yet.
  if(filter != null)
    filter.destroy();
}
origin: jenkinsci/jenkins

public void destroy() {
  for (Filter f : filters)
    f.destroy();
}
origin: apache/incubator-druid

 @Override
 public void destroy()
 {
  delegate.destroy();
 }
}
origin: spring-projects/spring-framework

/**
 * Clean up all the filters supplied, calling each one's destroy method in turn, but in reverse order.
 * @see Filter#init(FilterConfig)
 */
@Override
public void destroy() {
  for (int i = this.filters.size(); i-- > 0;) {
    Filter filter = this.filters.get(i);
    filter.destroy();
  }
}
origin: Atmosphere/atmosphere

/**
 * Release the Filter instance associated with this FilterConfig,
 * if there is one.
 */
public void recycle() {
  if (this.filter != null) {
    filter.destroy();
  }
  this.filter = null;
}
origin: jenkinsci/jenkins

public void destroy() {
  for (Filter f : list) {
    f.destroy();
  }
  list.clear();
}
origin: geoserver/geoserver

public void destroy() {
  if (filters != null) {
    for (Filter f : filters) {
      f.destroy();
    }
    filters = null;
  }
}
origin: nutzam/nutz

public void destroy() {
  if (proxy != null)
    proxy.destroy();
}
origin: spring-projects/spring-framework

/**
 * Destroy the Filter delegate.
 * Default implementation simply calls {@code Filter.destroy} on it.
 * @param delegate the Filter delegate (never {@code null})
 * @see #isTargetFilterLifecycle()
 * @see javax.servlet.Filter#destroy()
 */
protected void destroyDelegate(Filter delegate) {
  if (isTargetFilterLifecycle()) {
    delegate.destroy();
  }
}
origin: org.springframework/spring-web

/**
 * Clean up all the filters supplied, calling each one's destroy method in turn, but in reverse order.
 * @see Filter#init(FilterConfig)
 */
@Override
public void destroy() {
  for (int i = this.filters.size(); i-- > 0;) {
    Filter filter = this.filters.get(i);
    filter.destroy();
  }
}
origin: org.springframework/spring-web

/**
 * Destroy the Filter delegate.
 * Default implementation simply calls {@code Filter.destroy} on it.
 * @param delegate the Filter delegate (never {@code null})
 * @see #isTargetFilterLifecycle()
 * @see javax.servlet.Filter#destroy()
 */
protected void destroyDelegate(Filter delegate) {
  if (isTargetFilterLifecycle()) {
    delegate.destroy();
  }
}
origin: jenkinsci/jenkins

  f.destroy();
} catch (RuntimeException e) {
  LOGGER.log(Level.WARNING, "Filter " + f + " propagated an exception from its destroy method",
origin: igniterealtime/Openfire

filter.destroy();
origin: jenkinsci/jenkins

/**
 * Reset the proxies and filter for a change in {@link SecurityRealm}.
 */
public void reset(SecurityRealm securityRealm) throws ServletException {
  if (securityRealm != null) {
    SecurityRealm.SecurityComponents sc = securityRealm.getSecurityComponents();
    AUTHENTICATION_MANAGER.setDelegate(sc.manager);
    USER_DETAILS_SERVICE_PROXY.setDelegate(sc.userDetails);
    REMEMBER_ME_SERVICES_PROXY.setDelegate(sc.rememberMe);
    // make sure this.filter is always a valid filter.
    Filter oldf = this.filter;
    Filter newf = securityRealm.createFilter(this.filterConfig);
    newf.init(this.filterConfig);
    this.filter = newf;
    if(oldf!=null)
      oldf.destroy();
  } else {
    // no security related filter needed.
    AUTHENTICATION_MANAGER.setDelegate(null);
    USER_DETAILS_SERVICE_PROXY.setDelegate(null);
    REMEMBER_ME_SERVICES_PROXY.setDelegate(null);
    filter = null;
  }
}
origin: geoserver/geoserver

for (SecurityFilterChain chain : proxy.getFilterChains()) {
  for (Filter filter : chain.getFilters()) {
    filter.destroy();
origin: com.liferay.portal/com.liferay.portal.kernel

@Override
protected void doPortalDestroy() {
  Thread currentThread = Thread.currentThread();
  ClassLoader contextClassLoader = currentThread.getContextClassLoader();
  try {
    currentThread.setContextClassLoader(
      PortalClassLoaderUtil.getClassLoader());
    _filter.destroy();
  }
  finally {
    currentThread.setContextClassLoader(contextClassLoader);
  }
}
origin: haraldk/TwelveMonkeys

@Test
public void testLifeCycle() throws ServletException {
  Filter filter = makeFilter();
  try {
    filter.init(makeFilterConfig());
  }
  finally {
    filter.destroy();
  }
}
origin: haraldk/TwelveMonkeys

@Test
public void testFilterBasic() throws ServletException, IOException {
  Filter filter = makeFilter();
  try {
    filter.init(makeFilterConfig());
    filter.doFilter(makeRequest(), makeResponse(), makeFilterChain());
  }
  finally {
    filter.destroy();
  }
}
origin: haraldk/TwelveMonkeys

@Test
public void testInit() {
  Filter filter = makeFilter();
  try {
    filter.init(makeFilterConfig());
  }
  catch (ServletException e) {
    assertNotNull(e.getMessage());
  }
  finally {
    filter.destroy();
  }
}
javax.servletFilterdestroy

Javadoc

Called by the web container to indicate to a filter that it is being taken out of service.

This method is only called once all threads within the filter's doFilter method have exited or after a timeout period has passed. After the web container calls this method, it will not call the doFilter method again on this instance of the filter.

This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.

Popular methods of Filter

  • doFilter
    The doFilter method of the Filter is called by the container each time a request/response pair is pa
  • init
    Called by the web container to indicate to a filter that it is being placed into service. The servle
  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JOptionPane (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now