result.setTreeVersion (this.treeVersion);
try
{
TreeNodeMenuEntry[] base = new TreeNodeMenuEntry[]
{
new SimpleTreeNodeMenuEntryImpl ("Update tree", new RefreshTreeAction (false)),
new SimpleTreeNodeMenuEntryImpl ("Force update tree", new RefreshTreeAction (true)),
};
if (enableShutdown)
{
result.setRootMenus (new TreeNodeMenuEntry[]
{
base[0],
base[1],
new SeparatorTreeNodeMenuEntry (),
new SimpleTreeNodeMenuEntryImpl ("Shutdown JBoss instance",
new MBeanAction (new ObjectName("jboss.system:type=Server"),
"shutdown", new Object[0], new String[0])
),
new SimpleTreeNodeMenuEntryImpl ("Shutdown and Restart JBoss instance",
new MBeanAction (new ObjectName("jboss.system:type=Server"),
"exit", new Object[] {new Integer (10)},
new String[] {"int"})
),
new SimpleTreeNodeMenuEntryImpl ("HALT and Restart JBoss instance",
new MBeanAction (new ObjectName("jboss.system:type=Server"),
"halt", new Object[] {new Integer (10)},
new String[] {"int"})
)
}