001    package sysModel;
002    
003    /**
004     * Adapter to connect environments and security manager.
005     *
006     * @author Mathias Ricken
007     */
008    public interface ISecurityAdapter {
009        /**
010         * Set the protection flag.
011         *
012         * @param b true if actions are to be protected
013         */
014        void setProtected(boolean b);
015    
016        /**
017         * Get the thread group the fish are run in.
018         * @return fish thread group
019         */
020        ThreadGroup getFishThreadGroup();
021    
022        /**
023         * Return the class loader that checks fish classes for potential security violations.
024         * @return class loader
025         */
026        ClassLoader getClassLoader();
027    
028        /**
029         * Handle an exception that was caught during the simulation.
030         * @param t caught exception
031         */
032        void handleException(Throwable t);
033    }