Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.fudaa.fudaa.refonde
Class RefondeTacheInterruptionException  view RefondeTacheInterruptionException download RefondeTacheInterruptionException.java

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.fudaa.fudaa.refonde.RefondeTacheInterruptionException
All Implemented Interfaces:
java.io.Serializable

public class RefondeTacheInterruptionException
extends java.lang.Exception

Cette exception sert à notifier un arret demandé sur la tache en cours.

Elle est lancée par la méthode RefondeTacheOperation.notifieArretDemande() si :

La méthode RefondeTacheOperation.notifieArretDemande() doit être appelée suffisamment souvent dans les methodes ou on veut controler l'interruption de la tache courante pour pouvoir lancer l'exception, en particulier à l'interieur d'une boucle longue.

Exemple d'utilisation :

   RefondeTacheOperation th=new RefondeTacheOperation(this,"Test",true) {
     public void act() {
       try {
         while (true) {
           RefondeTacheOperation.notifieArretDemande(); // Lancement de l'exception si l'arret a été demandé.
           System.out.println("Continue la boucle");
         }
       }
       catch (RefondeTacheInterruptionException _exc) {
         System.out.println("La tache courante a été interrompue");
       }
     }
   };
   th.start();

   wait(1000);
   th.stopWhenReady();
 

Version:
$Id: RefondeTacheInterruptionException.java,v 1.1 2001/11/28 09:43:03 marchand Exp $

Nested Class Summary
 
Nested classes inherited from class java.lang.Throwable
 
Field Summary
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
RefondeTacheInterruptionException()
          Création d'une exception sans message.
RefondeTacheInterruptionException(java.lang.String s)
          Création d'une exception avec un message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RefondeTacheInterruptionException

public RefondeTacheInterruptionException()
Création d'une exception sans message.


RefondeTacheInterruptionException

public RefondeTacheInterruptionException(java.lang.String s)
Création d'une exception avec un message.