/**
* TODO Process the Bootstrap server.
*/
protected void processServer()
{
ComponentType type = new ComponentType("MCBean", "MCServer");
ManagedObject serverMO = managedObjectFactory.initManagedObject(server, "JBossServer", null);
if (serverMO.getOperations() != null && serverMO.getOperations().size() == 0)
{
ManagedOperationImpl shutdown = new ManagedOperationImpl("Shutdown the server", "shutdown");
if (serverMO instanceof MutableManagedObject)
{
HashSet<ManagedOperation> ops = new HashSet<ManagedOperation>();
ops.add(shutdown);
MutableManagedObject mmo = MutableManagedObject.class.cast(serverMO);
mmo.setOperations(ops);
}
}
ManagedComponentImpl serverComp = new ManagedComponentImpl(type, null, serverMO);
// ServerConfig
type = new ComponentType("MCBean", "ServerConfig");
ManagedObject mo = managedObjectFactory.initManagedObject(server.getConfiguration(), null);
ManagedComponentImpl configComp = new ManagedComponentImpl(type, null, mo);
view.addManagedComponent(serverComp);
view.addManagedComponent(configComp);