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

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

Best Java code snippets using org.apache.shiro.util.Destroyable.destroy (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.utilDestroyabledestroy

Javadoc

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

Popular methods of Destroyable

    Popular in Java

    • Creating JSON documents from java classes using gson
    • setContentView (Activity)
    • addToBackStack (FragmentTransaction)
    • onRequestPermissionsResult (Fragment)
    • Graphics2D (java.awt)
      This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
    • Time (java.sql)
      Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
    • NumberFormat (java.text)
      The abstract base class for all number formats. This class provides the interface for formatting and
    • Date (java.util)
      A specific moment in time, with millisecond precision. Values typically come from System#currentTime
    • Iterator (java.util)
      An iterator over a sequence of objects, such as a collection.If a collection has been changed since
    • PriorityQueue (java.util)
      A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
    • Top 25 Plugins for Webstorm
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

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