001/*
002 *  jDTAUS Core SPI
003 *  Copyright (C) 2005 Christian Schulte
004 *  <cs@schulte.it>
005 *
006 *  This library is free software; you can redistribute it and/or
007 *  modify it under the terms of the GNU Lesser General Public
008 *  License as published by the Free Software Foundation; either
009 *  version 2.1 of the License, or any later version.
010 *
011 *  This library is distributed in the hope that it will be useful,
012 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
013 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
014 *  Lesser General Public License for more details.
015 *
016 *  You should have received a copy of the GNU Lesser General Public
017 *  License along with this library; if not, write to the Free Software
018 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
019 *
020 */
021package org.jdtaus.core.lang.spi;
022
023/**
024 * Manages asynchronous executions.
025 * <p>jDTAUS Core SPI {@code Executor} specification to be used by
026 * implementations to perform operations asynchronously.</p>
027 *
028 * @author <a href="mailto:cs@schulte.it">Christian Schulte</a>
029 * @version $JDTAUS: Executor.java 8641 2012-09-27 06:45:17Z schulte $
030 * @see org.jdtaus.core.container.Container
031 */
032public interface Executor extends ExceptionHandler
033{
034    //--Executor----------------------------------------------------------------
035
036    /**
037     * Executes a given {@code Runnable} asynchronously.
038     * <p>This method will notify any registered {@code ExceptionListener}s
039     * about exceptions thrown by the given {@code Runnable}'s {@code run()}
040     * method.</p>
041     *
042     * @param runnable the {@code Runnable} to execute asynchronously.
043     *
044     * @throws NullPointerException if {@code runnable} is {@code null}.
045     */
046    void executeAsynchronously( Runnable runnable );
047
048    //----------------------------------------------------------------Executor--
049}