View Javadoc

1   /*
2    * $Id: IsSynchronousProcessVisitor.java,v 1.1 2004/12/15 14:18:10 patforna Exp $
3    *
4    * Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
5    * Berne University of Applied Sciences
6    * School of Engineering and Information Technology
7    * All rights reserved.
8    */
9   package bexee.model;
10  
11  import bexee.model.activity.Reply;
12  
13  /***
14   * This implementation of a <code>BPELElementVisitor</code> is used to
15   * discover whether a BPELProcess is synchronous or not. Only those
16   * BPELProcesses with a <code>Reply</code> activity are synchronous.
17   * 
18   * @author Patric Fornasier
19   * @author Pawel Kowalski
20   * @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:10 $
21   */
22  public class IsSynchronousProcessVisitor extends AtomicActivityVisitor {
23  
24      private boolean isSynchronous;
25  
26      /***
27       * Return a boolean indicating whether the visited process is synchronous.
28       * 
29       * @return Returns the isSynchronous.
30       */
31      public boolean isSynchronous() {
32          return isSynchronous;
33      }
34  
35      /***
36       * Once this method will be called, this visitor will know that the visited
37       * BPELProcess has a <code>Reply</code> and is therefore a synchronous
38       * process.
39       */
40      public void visit(Reply reply) {
41          isSynchronous = true;
42      }
43  }