window.center();
}
protected void activateSubsystem() {
// Since it takes a few moments for the subsystem to activate we're showing a window indicating this
final DefaultWindow window = new DefaultWindow(Console.CONSTANTS.subsys_osgi());
window.setWidth(320);
window.setHeight(140);
window.trapWidget(new HTML(Console.MESSAGES.subsys_osgi_activating()));
window.setGlassEnabled(true);
window.center();
AddressBinding address = bundleMetaData.getAddress();
ModelNode operation = address.asSubresource(RuntimeBaseAddress.get()); // get an operation on the parent address...
operation.get(ModelDescriptionConstants.OP).set("activate");
dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
@Override
public void onSuccess(DMRResponse result) {
Timer t = new Timer() {
@Override
public void run() {
window.hide();
onReset();
}
};
t.schedule(4000);
}
@Override
public void onFailure(Throwable caught) {
window.hide();
super.onFailure(caught);
}
});
}