Eclipse CD5405 Manuel d'utilisateur Page 19

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 23
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 18
! ! ! e.printStackTrace();
! ! } catch (IllegalTransition e) {
! ! ! e.printStackTrace();
!!}
!!
!}
! /**
! * Reads the next value from the input file and sends it back into the process
! * as the s parameter. It terminates when it reaches the end of the input or
! * if any exception is found during its processing of the input.
! * When this happens, it throws EndOfSetException into the process.
! * @throws AMSException if it can't communicate with its agenda
! * @throws IllegalTransition if the step cannot be completed or terminated
! */
! private void readS() throws AMSException, IllegalTransition {
! ! try {
! ! ! // Read in a line of data
! ! ! System.out.print("(ReadSHandler) Assigning SensorData object: ");
! ! ! String line;
!!!
! ! ! // Read in next line of file
! ! ! line = reader.readLine();
!!!if (line == null || line.equals("")){
! ! ! ! terminate();
! ! ! ! return;
!!!}
! ! ! SensorData data = new SensorData (line);
!!!item.setParameter("s", data);
!!!item.complete();
!!!
! ! } catch (Exception e) {
! ! ! e.printStackTrace();
! ! ! terminate();
!!}
!}
! /**
! * Terminate the step, throwing the EndOfSetException into the process
! * @throws AMSException if it can't communicate with the agenda
! * @throws IllegalTransition if it can't terminate the step
! */
! private void terminate()
!!!throws AMSException, IllegalTransition {
! ! Set<Serializable> exceptions = new HashSet<Serializable>();
! ! exceptions.add (new EndOfSetException());
!!item.terminate(exceptions);
! ! return;
!}
!
}
Vue de la page 18
1 2 ... 14 15 16 17 18 19 20 21 22 23

Commentaires sur ces manuels

Pas de commentaire