// ************************************************************************ // $Id: Interruptible.java 561 2005-07-11 20:09:17Z mdeters $ // ************************************************************************ // // jRate // // Copyright (C) 2001-2005 by Angelo Corsaro. // // All Rights Reserved. // // Permission to use, copy, modify, and distribute this software and // its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. I don't make any representations // about the suitability of this software for any purpose. It is // provided "as is" without express or implied warranty. // // // ************************************************************************* // // ************************************************************************* package javax.realtime; /** * This interface is used with {@link * AsynchronouslyInterruptedException#doInterruptible(Interruptible) * AsynchronouslyInterruptedException.doInterruptible()}. * * @see AsynchronouslyInterruptedException#doInterruptible(Interruptible) * @author Morgan Deters * @version 1.0 * @since 0.3.8 */ public interface Interruptible { /** * The main logic executed when a call to {@link * AsynchronouslyInterruptedException#doInterruptible(Interruptible) * doInterruptible()} is made. Make sure to include a proper * throws clause when you implement this interface or your * run() method will not be interruptible. * * @param exception access to the {@link * AsynchronouslyInterruptedException} so that callbacks can be * made */ void run(AsynchronouslyInterruptedException exception); /** * This method is called by the system if the run() * method is interrupted. * * @param exception access to the {@link * AsynchronouslyInterruptedException} so that callbacks can be * made */ void interruptAction(AsynchronouslyInterruptedException exception); }