com.purej.vminspect.html.MBeansInvokeOperationView Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of purej-vminspect Show documentation
Show all versions of purej-vminspect Show documentation
An easy to use, feature-rich, JMX-based and embeddable Java VM monitoring tool with a web-based user-interface
// Copyright (c), 2013, adopus consulting GmbH Switzerland, all rights reserved.
package com.purej.vminspect.html;
import java.io.IOException;
import com.purej.vminspect.data.MBeanData;
import com.purej.vminspect.data.MBeanOperation;
import com.purej.vminspect.data.MBeanParameter;
import com.purej.vminspect.data.MBeanUtils;
/**
* Displays the view to invoke an operation of an MBean.
*
* @author Stefan Mueller
*/
public class MBeansInvokeOperationView extends AbstractMBeansView {
private final MBeanData _mbean;
private final int _mbOpIdx;
private final MBeanOperation _operation;
private final ConfirmState _confirm;
private final String[] _parameters;
/**
* Creates a new instance of this view.
*/
public MBeansInvokeOperationView(StringBuilder output, MBeanData mbean, int mbOpIdx, MBeanOperation operation, ConfirmState confirmState,
String[] parameters) {
super(output);
_mbean = mbean;
_mbOpIdx = mbOpIdx;
_operation = operation;
_confirm = confirmState;
_parameters = parameters;
}
@Override
public void render() throws IOException {
// Write the mbean title:
writeln("" + img("icons/beans-24.png", "MBean") + " MBean: " + htmlEncode(_mbean.getName().getObjectNameString()) + "
");
if (_confirm.isNow()) {
writeln("Please confirm the MBeans operation invocation!
");
}
// Write the form with a table:
writeln("");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy