1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.util; |
12 | |
|
13 | |
import org.mule.api.MuleContext; |
14 | |
import org.mule.api.agent.Agent; |
15 | |
import org.mule.config.i18n.CoreMessages; |
16 | |
|
17 | |
import java.util.Collection; |
18 | |
import java.util.Iterator; |
19 | |
|
20 | 0 | public class ApplicationStartupSplashScreen extends SplashScreen |
21 | |
{ |
22 | |
protected void doHeader(MuleContext context) |
23 | |
{ |
24 | 0 | header.add("Application: " + context.getConfiguration().getId()); |
25 | 0 | header.add(String.format("OS encoding: %s, Mule encoding: %s", |
26 | |
System.getProperty("file.encoding"), |
27 | |
context.getConfiguration().getDefaultEncoding())); |
28 | 0 | header.add(" "); |
29 | 0 | } |
30 | |
|
31 | |
protected void doFooter(MuleContext context) |
32 | |
{ |
33 | |
|
34 | 0 | if (!body.isEmpty()) |
35 | |
{ |
36 | 0 | footer.add(" "); |
37 | |
} |
38 | |
|
39 | 0 | Collection agents = context.getRegistry().lookupObjects(Agent.class); |
40 | 0 | if (agents.size() == 0) |
41 | |
{ |
42 | 0 | footer.add(CoreMessages.agentsRunning().getMessage() + " " |
43 | |
+ CoreMessages.none().getMessage()); |
44 | |
} |
45 | |
else |
46 | |
{ |
47 | 0 | footer.add(CoreMessages.agentsRunning().getMessage()); |
48 | |
Agent agent; |
49 | 0 | for (Iterator iterator = agents.iterator(); iterator.hasNext();) |
50 | |
{ |
51 | 0 | agent = (Agent) iterator.next(); |
52 | 0 | footer.add(" " + agent.getDescription()); |
53 | |
} |
54 | |
} |
55 | 0 | } |
56 | |
} |