1
2
3
4
5
6
7
8
9
10 package org.mule;
11
12 import org.mule.api.MuleContext;
13 import org.mule.api.agent.Agent;
14 import org.mule.api.context.MuleContextAware;
15 import org.mule.api.lifecycle.InitialisationException;
16
17 import java.util.Collections;
18 import java.util.List;
19
20
21
22
23
24 public abstract class AbstractAgent implements Agent, MuleContextAware
25 {
26
27 protected MuleContext muleContext;
28
29 protected String name;
30
31 protected AbstractAgent(String name)
32 {
33 this.name = name;
34 }
35
36 public final String getName()
37 {
38 return name;
39 }
40
41 public final void setName(String name)
42 {
43 this.name = name;
44 }
45
46 public String getDescription()
47 {
48 return name;
49 }
50
51 public List getDependentAgents()
52 {
53 return Collections.EMPTY_LIST;
54 }
55
56 public void setMuleContext(MuleContext context)
57 {
58 this.muleContext = context;
59 }
60
61 public abstract void initialise() throws InitialisationException;
62
63 }