1
2
3
4
5
6
7
8
9
10
11 package org.mule.agent;
12
13 import org.mule.api.MuleException;
14 import org.mule.api.agent.Agent;
15 import org.mule.api.lifecycle.InitialisationException;
16 import org.mule.util.ClassUtils;
17
18 import java.util.Arrays;
19 import java.util.Collections;
20 import java.util.List;
21
22 public class MockAgent extends Object implements Agent
23 {
24 private String name;
25 private List dependencies = Collections.EMPTY_LIST;
26
27 public MockAgent()
28 {
29 super();
30 }
31
32 public MockAgent(Class[] classes)
33 {
34 super();
35 dependencies = Arrays.asList(classes);
36 }
37
38 public List getDependentAgents()
39 {
40 return dependencies;
41 }
42
43 public String getDescription()
44 {
45 return ClassUtils.getSimpleName(this.getClass());
46 }
47
48 public void registered()
49 {
50
51 }
52
53 public void unregistered()
54 {
55
56 }
57
58 public void initialise() throws InitialisationException
59 {
60
61 }
62
63 public void start() throws MuleException
64 {
65
66 }
67
68 public void stop() throws MuleException
69 {
70
71 }
72
73 public void dispose()
74 {
75
76 }
77
78 public String getName()
79 {
80 return name;
81 }
82
83 public void setName(String name)
84 {
85 this.name = name;
86 }
87
88 }
89
90