Tabnine Logo
Destroyable
Code IndexAdd Tabnine to your IDE (free)

How to use
Destroyable
in
org.apache.shiro.util

Best Java code snippets using org.apache.shiro.util.Destroyable (Showing top 7 results out of 315)

origin: apache/shiro

public static void destroy(Destroyable d) {
  if (d != null) {
    try {
      d.destroy();
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        String msg = "Unable to cleanly destroy instance [" + d + "] of type [" + d.getClass().getName() + "].";
        log.debug(msg, t);
      }
    }
  }
}
origin: apache/shiro

/**
 * Destroys all beans created within this module that implement {@link org.apache.shiro.util.Destroyable}.  Should be called when this
 * module will no longer be used.
 *
 * @throws Exception
 */
public final void destroy() {
  for (Destroyable destroyable : destroyables) {
    try {
      destroyable.destroy();
    }
    catch(Exception e) {
      log.warn("Error destroying component class: " + destroyable.getClass(), e);
    }
  }
}
origin: apache/shiro

/**
 * Calls the <tt>destroy()</tt> methods on the bean if it implements {@link org.apache.shiro.util.Destroyable}
 *
 * @param object the object being initialized.
 * @param name   the name of the bean being initialized.
 * @throws BeansException if any exception is thrown during initialization.
 */
public void postProcessBeforeDestruction(Object object, String name) throws BeansException {
  if (object instanceof Destroyable) {
    try {
      if (log.isDebugEnabled()) {
        log.debug("Destroying bean [" + name + "]...");
      }
      ((Destroyable) object).destroy();
    } catch (Exception e) {
      throw new FatalBeanException("Error destroying bean [" + name + "]", e);
    }
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

public static void destroy(Destroyable d) {
  if (d != null) {
    try {
      d.destroy();
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        String msg = "Unable to cleanly destroy instance [" + d + "] of type [" + d.getClass().getName() + "].";
        log.debug(msg, t);
      }
    }
  }
}
origin: org.apache.shiro/shiro-lang

public static void destroy(Destroyable d) {
  if (d != null) {
    try {
      d.destroy();
    } catch (Throwable t) {
      if (log.isDebugEnabled()) {
        String msg = "Unable to cleanly destroy instance [" + d + "] of type [" + d.getClass().getName() + "].";
        log.debug(msg, t);
      }
    }
  }
}
origin: org.apache.shiro/shiro-guice

/**
 * Destroys all beans created within this module that implement {@link org.apache.shiro.util.Destroyable}.  Should be called when this
 * module will no longer be used.
 *
 * @throws Exception
 */
public final void destroy() {
  for (Destroyable destroyable : destroyables) {
    try {
      destroyable.destroy();
    }
    catch(Exception e) {
      log.warn("Error destroying component class: " + destroyable.getClass(), e);
    }
  }
}
origin: org.apache.shiro/shiro-spring

/**
 * Calls the <tt>destroy()</tt> methods on the bean if it implements {@link org.apache.shiro.util.Destroyable}
 *
 * @param object the object being initialized.
 * @param name   the name of the bean being initialized.
 * @throws BeansException if any exception is thrown during initialization.
 */
public void postProcessBeforeDestruction(Object object, String name) throws BeansException {
  if (object instanceof Destroyable) {
    try {
      if (log.isDebugEnabled()) {
        log.debug("Destroying bean [" + name + "]...");
      }
      ((Destroyable) object).destroy();
    } catch (Exception e) {
      throw new FatalBeanException("Error destroying bean [" + name + "]", e);
    }
  }
}
org.apache.shiro.utilDestroyable

Javadoc

Shiro container-agnostic interface that indicates that this object requires a callback during destruction.

Most used methods

  • destroy
    Called when this object is being destroyed, allowing any necessary cleanup of internal resources.

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Best IntelliJ plugins
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