1 |
mojays |
2 |
package appl.parallel.plugin.event; |
2 |
|
|
|
3 |
|
|
import javax.swing.JMenuItem; |
4 |
|
|
import javax.swing.JTable; |
5 |
|
|
|
6 |
|
|
import appl.parallel.client.RemoteExecutionController; |
7 |
|
|
import appl.parallel.event.TimeEvent; |
8 |
|
|
import appl.parallel.event.TransferEvent; |
9 |
|
|
|
10 |
|
|
import edu.bonn.xulu.appl.XuluPlugin; |
11 |
|
|
import edu.bonn.xulu.gui.XuluInternalFrame; |
12 |
|
|
import edu.bonn.xulu.plugin.appl.AbstractMenuPlugin; |
13 |
|
|
|
14 |
|
|
/** |
15 |
|
|
* The {@link XuluPlugin} logs {@link TransferEvent}s and {@link TimeEvent}s. |
16 |
|
|
* The Events are displayed in a sortable {@link JTable}. |
17 |
|
|
* |
18 |
|
|
* @author Dominik Appl |
19 |
|
|
*/ |
20 |
|
|
public class SimpleCommEventMonitorPlugin extends AbstractMenuPlugin { |
21 |
|
|
|
22 |
|
|
/** |
23 |
|
|
* Creates a new plugin |
24 |
|
|
*/ |
25 |
|
|
public SimpleCommEventMonitorPlugin() { |
26 |
|
|
super(4, "Xulu/V Communication Monitor"); |
27 |
|
|
// TODO Auto-generated constructor stub |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
/** |
31 |
|
|
* Creates a new plugin |
32 |
|
|
* |
33 |
|
|
* @param xuluMenuNo |
34 |
|
|
* the position of the menu in the menubar |
35 |
|
|
* @param menuItem |
36 |
|
|
* the menu to insert |
37 |
|
|
*/ |
38 |
|
|
public SimpleCommEventMonitorPlugin(int xuluMenuNo, JMenuItem menuItem) { |
39 |
|
|
super(xuluMenuNo, menuItem); |
40 |
|
|
// TODO Auto-generated constructor stub |
41 |
|
|
} |
42 |
|
|
|
43 |
|
|
/** |
44 |
|
|
* Creates a new plugin |
45 |
|
|
* |
46 |
|
|
* @param xuluMenuNo |
47 |
|
|
* the position of the menu in the menubar |
48 |
|
|
* @param menuItemName |
49 |
|
|
* the name of the entry to insert |
50 |
|
|
*/ |
51 |
|
|
public SimpleCommEventMonitorPlugin(int xuluMenuNo, String menuItemName) { |
52 |
|
|
super(xuluMenuNo, menuItemName); |
53 |
|
|
// TODO Auto-generated constructor stub |
54 |
|
|
} |
55 |
|
|
|
56 |
|
|
/* |
57 |
|
|
* (non-Javadoc) |
58 |
|
|
* |
59 |
|
|
* @see edu.bonn.xulu.plugin.appl.AbstractMenuPlugin#createPluginApplication() |
60 |
|
|
*/ |
61 |
|
|
@Override |
62 |
|
|
protected XuluInternalFrame createPluginApplication() throws Exception { |
63 |
|
|
RemoteExecutionController controller = RemoteExecutionController |
64 |
|
|
.getRemoteExecutionController(appl); |
65 |
|
|
if (controller == null) |
66 |
|
|
throw new UnsupportedOperationException( |
67 |
|
|
"Remote Execution Monitor plugin not found!"); |
68 |
|
|
SimpleCommEventMonitorEngine engine = new SimpleCommEventMonitorEngine( |
69 |
|
|
controller.getEventProxy()); |
70 |
|
|
return engine.getMonitor(); |
71 |
|
|
} |
72 |
|
|
|
73 |
|
|
} |