001package org.intellimate.izou.system.context;
002
003import org.intellimate.izou.identification.Identifiable;
004import org.intellimate.izou.identification.Identification;
005import org.intellimate.izou.identification.IllegalIDException;
006
007import java.util.concurrent.ExecutorService;
008
009/**
010 * @author Leander Kurscheidt
011 * @version 1.0
012 */
013public interface ThreadPool {
014    /**
015     * returns an ThreadPool where all the IzouPlugins are running
016     * @param identifiable the Identifiable to set each created Task as the Source
017     * @return an instance of ExecutorService
018     * @throws IllegalIDException not implemented yet
019     */
020    ExecutorService getThreadPool(Identifiable identifiable) throws IllegalIDException;
021
022    /**
023     * tries everything to log the exception
024     * @param throwable the Throwable
025     * @param target an instance of the thing which has thrown the Exception
026     */
027    void handleThrowable(Throwable throwable, Object target);
028
029    /**
030     * returns the ID of the Manager
031     * @return an instance of Identification
032     */
033    Identification getManagerIdentification();
034}