// Path: src/main/java/io/craft/armor/spi/ArmorFilterChain.java
// public interface ArmorFilterChain {
// 
// 	/**
// 	 * Filter the invocation through the filter chain.
// 	 * 
// 	 * @param  invocation current invocation.
// 	 * @throws exception when any invocation error occurs.
// 	 */
// 	void doFilter(ArmorInvocation invocation) throws Throwable;
// 	
// 	/**
// 	 * Add the specified filter just before the filter type in this chain.
// 	 * If no one is matched to specified type, add it at the beginning of this chain.
//      * 
// 	 * @param filterType the target filter type
// 	 * @param filter     the filter to add
// 	 */
// 	void addBefore(Class<? extends ArmorFilter> filterType, ArmorFilter filter);
// 	
// 	/**
// 	 * Add the specified filter just after the filter type in this chain.
// 	 * If no one is matched to specified type, add it at the end of this chain.
// 	 * 
// 	 * @param filterType the target filter type
// 	 * @param filter     the filter to add
// 	 */
// 	void addAfter(Class<? extends ArmorFilter> filterType, ArmorFilter filter);
// 	
// 	/**
//      * Add the specified filter at the beginning of this chain.
//      * 
//      * @param filter the filter to add
//      */
//     void addFirst(ArmorFilter filter);
//     
//     /**
//      * Add the specified filter at the end of this chain.
//      * 
//      * @param filter the filter to add
//      */
//     void addLast(ArmorFilter filter);
//     
//     /**
//      * Remove the filter of the specified type.
//      * If there's more than one filter with the specified type, the first match will be removed.
//      * If no one is matched to specified type, throw <code>IllegalArgumentException</code>.
//      * 
//      * @param filterType the target filter type
//      * @return the removed filter
//      */
//     ArmorFilter remove(Class<? extends ArmorFilter> filterType);
//     
//     /**
//      * Remove the specified filter at the end of this chain.
//      * 
//      * @return the last filter from this chain.
//      */
//     ArmorFilter removeLast();
//     
//     /**
//      * Remove the specified filter at the beginning of this chain.
//      * 
//      * @return the first filter from this chain.
//      */
//     ArmorFilter removeFirst();
// 	
// }


import io.craft.armor.spi.ArmorFilterChain;
import java.util.concurrent.ExecutorService;
package io.craft.armor;



/**
 * Represents armor method configuration attribute.
 * 
 * @author mindwind
 * @version 1.0, Dec 25, 2014
 */
public interface ArmorAttribute {
	
	
	public static final int DEFAULT_THREADS = Runtime.getRuntime().availableProcessors();
	public static final int DEFAULT_TIMEOUT = 3;
	
	
	ExecutorService  getExecutorService();
	ArmorFilterChain getFilterChain();
	void             setFilterChain(ArmorFilterChain filterChain);
	void             setTimeoutInMillis(long timeoutInMillis);
	void             setThreadSize(int threads);
	void             setAsync(boolean async);
	void             degrade();
	void             upgrade();
	boolean          isDegraded();
// Path: src/main/java/io/craft/armor/spi/ArmorFilterChain.java
// public interface ArmorFilterChain {
// 
// 	/**
// 	 * Filter the invocation through the filter chain.
// 	 * 
// 	 * @param  invocation current invocation.
// 	 * @throws exception when any invocation error occurs.
// 	 */
// 	void doFilter(ArmorInvocation invocation) throws Throwable;
// 	
// 	/**
// 	 * Add the specified filter just before the filter type in this chain.
// 	 * If no one is matched to specified type, add it at the beginning of this chain.
//      * 
// 	 * @param filterType the target filter type
// 	 * @param filter     the filter to add
// 	 */
// 	void addBefore(Class<? extends ArmorFilter> filterType, ArmorFilter filter);
// 	
// 	/**
// 	 * Add the specified filter just after the filter type in this chain.
// 	 * If no one is matched to specified type, add it at the end of this chain.
// 	 * 
// 	 * @param filterType the target filter type
// 	 * @param filter     the filter to add
// 	 */
// 	void addAfter(Class<? extends ArmorFilter> filterType, ArmorFilter filter);
// 	
// 	/**
//      * Add the specified filter at the beginning of this chain.
//      * 
//      * @param filter the filter to add
//      */
//     void addFirst(ArmorFilter filter);
//     
//     /**
//      * Add the specified filter at the end of this chain.
//      * 
//      * @param filter the filter to add
//      */
//     void addLast(ArmorFilter filter);
//     
//     /**
//      * Remove the filter of the specified type.
//      * If there's more than one filter with the specified type, the first match will be removed.
//      * If no one is matched to specified type, throw <code>IllegalArgumentException</code>.
//      * 
//      * @param filterType the target filter type
//      * @return the removed filter
//      */
//     ArmorFilter remove(Class<? extends ArmorFilter> filterType);
//     
//     /**
//      * Remove the specified filter at the end of this chain.
//      * 
//      * @return the last filter from this chain.
//      */
//     ArmorFilter removeLast();
//     
//     /**
//      * Remove the specified filter at the beginning of this chain.
//      * 
//      * @return the first filter from this chain.
//      */
//     ArmorFilter removeFirst();
// 	
// }


// Path: src/main/java/io/craft/armor/ArmorAttribute.java
import io.craft.armor.spi.ArmorFilterChain;
import java.util.concurrent.ExecutorService;

package io.craft.armor;



/**
 * Represents armor method configuration attribute.
 * 
 * @author mindwind
 * @version 1.0, Dec 25, 2014
 */
public interface ArmorAttribute {
	
	
	public static final int DEFAULT_THREADS = Runtime.getRuntime().availableProcessors();
	public static final int DEFAULT_TIMEOUT = 3;
	
	
	ExecutorService  getExecutorService();
	ArmorFilterChain getFilterChain();
	void             setFilterChain(ArmorFilterChain filterChain);
	void             setTimeoutInMillis(long timeoutInMillis);
	void             setThreadSize(int threads);
	void             setAsync(boolean async);
	void             degrade();
	void             upgrade();
	boolean          isDegraded();
	boolean          isAsync();