1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jelly.tags.define;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.logging.LogFactory;
23
24
25
26 /***
27 * An example Runnable bean that is framework neutral and just performs
28 * some useful function.
29 *
30 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
31 * @version $Revision: 1.4 $
32 */
33 public class MyRunnable implements Runnable {
34
35 /*** The Log to which logging calls will be made. */
36 private static final Log log = LogFactory.getLog(MyRunnable.class);
37
38 private int x;
39 private String y;
40 private List fileSets = new ArrayList();
41
42 public MyRunnable() {
43 }
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 public void run() {
60 log.info( "About to do something where x = " + getX() + " y = " + getY() );
61 log.info( "FileSets are: " + fileSets );
62 }
63
64
65
66
67 public int getX() {
68 return x;
69 }
70
71 public void setX(int x) {
72 this.x = x;
73 }
74
75 public String getY() {
76 return y;
77 }
78
79 public void setY(String y) {
80 this.y = y;
81 }
82 }