View Javadoc

1   package org.springframework.security.util;
2   
3   
4   /**
5    * Interface for handlers extracting the cause out of a specific {@link Throwable} type.
6    * 
7    * @author Andreas Senft
8    * @since 2.0
9    * @version $Id: ThrowableCauseExtractor.java 2559 2008-01-30 16:15:02Z luke_t $
10   * 
11   * @see ThrowableAnalyzer
12   */
13  public interface ThrowableCauseExtractor {
14  
15      /**
16       * Extracts the cause from the provided <code>Throwable</code>.
17       * 
18       * @param throwable the <code>Throwable</code>
19       * @return the extracted cause (maybe <code>null</code>)
20       * 
21       * @throws IllegalArgumentException if <code>throwable</code> is <code>null</code> 
22       * or otherwise considered invalid for the implementation
23       */
24      Throwable extractCause(Throwable throwable);
25  }