@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {
// new MBeanAttributeInfo("LocalSsn", int.class.getName(), "Local Ssn", true, true, false),
// new MBeanAttributeInfo("RemoteSsn", int.class.getName(), "Remote Ssn", true, true, false),
new MBeanAttributeInfo("RemoteAddressDigits", String.class.getName(),
"Remote address digits. If empty ROUTING_BASED_ON_DPC_AND_SSN is used for CalledPartyAddress (remoteSpc from SCCP), "
+ "if not empty ROUTING_BASED_ON_GLOBAL_TITLE is used (address and Ssn from CAP)", true, true, false), };
MBeanParameterInfo[] signString = new MBeanParameterInfo[] { new MBeanParameterInfo("val", String.class.getName(),
"Index number or value") };
MBeanOperationInfo[] operations = new MBeanOperationInfo[] {};
return new MBeanInfo(CapMan.class.getName(), "Cap Management", attributes, null, operations, null);
}
java类javax.management.MBeanOperationInfo的实例源码
CapManStandardMBean.java 文件源码
项目:phone-simulator
阅读 27
收藏 0
点赞 0
评论 0
TestCheckImeiServerStandardManMBean.java 文件源码
项目:phone-simulator
阅读 25
收藏 0
点赞 0
评论 0
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {
new MBeanAttributeInfo("AutoEquipmentStatus", EquipmentStatusType.class.getName(), "EquipmentStatus parameter to be automatically send in CheckImeiResponse", true, true, false),
new MBeanAttributeInfo("AutoEquipmentStatus_Value", String.class.getName(), "EquipmentStatus parameter to be automatically send in CheckImeiResponse", true, false, false),
new MBeanAttributeInfo("OneNotificationFor100Dialogs", boolean.class.getName(),
"If true there will be only one notification per every 100 sent dialogs", true, true, true),
new MBeanAttributeInfo("CurrentRequestDef", String.class.getName(), "Definition of the current request Dialog",
true, false, false),
};
MBeanParameterInfo[] putAutoEquipmentStatusParam = new MBeanParameterInfo[] { new MBeanParameterInfo("val", String.class.getName(), "EquipmentStatus value") };
MBeanOperationInfo[] operations = new MBeanOperationInfo[] {
new MBeanOperationInfo(
"putAutoEquipmentStatus",
"EquipmentStatus parameter to be automatically send in CheckImeiResponse: "
+ "0:whiteListed,1:blackListed,2:greyListed",
putAutoEquipmentStatusParam, Void.TYPE.getName(), MBeanOperationInfo.ACTION),
new MBeanOperationInfo("closeCurrentDialog", "Closing the current dialog", null, String.class.getName(), MBeanOperationInfo.ACTION)
};
return new MBeanInfo(TestCheckImeiServerMan.class.getName(), "CheckImeiServer test parameters management", attributes, null, operations, null);
}
TestAtiServerStandardManMBean.java 文件源码
项目:phone-simulator
阅读 29
收藏 0
点赞 0
评论 0
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {
new MBeanAttributeInfo("ATIReaction", ATIReaction.class.getName(), "ATI response type", true, true, false),
new MBeanAttributeInfo("ATIReaction_Value", String.class.getName(), "ATI response type", true, false, false), };
MBeanParameterInfo[] signString = new MBeanParameterInfo[] { new MBeanParameterInfo("val", String.class.getName(), "Index number or value") };
// MBeanParameterInfo[] performATIParam = new MBeanParameterInfo[] { new MBeanParameterInfo("msg", String.class.getName(), "Message text"),
// new MBeanParameterInfo("address", String.class.getName(), "SubscriberIdentity: IMSI or MSISDN"), };
MBeanOperationInfo[] operations = new MBeanOperationInfo[] {
// new MBeanOperationInfo("performAtiRequest", "Send ATI request", performATIParam, String.class.getName(), MBeanOperationInfo.ACTION),
// new MBeanOperationInfo("closeCurrentDialog", "Closing the current dialog", null, String.class.getName(), MBeanOperationInfo.ACTION),
new MBeanOperationInfo("putATIReaction", "ATI response type: "
+ "1:ReturnSuccess,2:ReturnSuccessSubscriberState,3:ReturnSystemFailureError,4:ReturnDataMissingError,5:ReturnUnknownSubscriberError",
signString, Void.TYPE.getName(), MBeanOperationInfo.ACTION),
};
return new MBeanInfo(TestAtiServerMan.class.getName(), "AtiServer test parameters management", attributes, null, operations, null);
}
TestMapLcsServerStandardManMBean.java 文件源码
项目:phone-simulator
阅读 21
收藏 0
点赞 0
评论 0
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {
new MBeanAttributeInfo("NetworkNodeNumberAddress", String.class.getName(),
"NetworkNodeNumber address parameter for response",
true, true, false), };
MBeanParameterInfo[] performSRIResponseParam = new MBeanParameterInfo[] { };
MBeanOperationInfo[] operations = new MBeanOperationInfo[] {
new MBeanOperationInfo("performSendRoutingInfoForLCSResponse", "Send Routing Information for LCS response",
performSRIResponseParam, String.class.getName(), MBeanOperationInfo.ACTION),
};
return new MBeanInfo(TestMapLcsServerMan.class.getName(), "MapLcsServer test parameters management", attributes, null, operations, null);
}
TestMapLcsClientStandardManMBean.java 文件源码
项目:phone-simulator
阅读 29
收藏 0
点赞 0
评论 0
@Override
public MBeanInfo getMBeanInfo() {
// TODO: Put real attributes and operations
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {
new MBeanAttributeInfo("AddressNature", AddressNatureType.class.getName(),
"AddressNature parameter for mlcNumber creating",
true, true, false),
new MBeanAttributeInfo("NumberingPlanType", NumberingPlanMapType.class.getName(),
"NumberingPlanType parameter for mlcNumber creating",
true, true, false),
new MBeanAttributeInfo("NumberingPlan", String.class.getName(),
"NumberingPlan parameter for mlcNumber creating",
true, true, false), };
MBeanParameterInfo[] performSRIRequestParam = new MBeanParameterInfo[] {
new MBeanParameterInfo("addressIMSI", String.class.getName(), "Address for IMSI") };
MBeanOperationInfo[] operations = new MBeanOperationInfo[] {
new MBeanOperationInfo("performSendRoutingInfoForLCSRequest", "Send Routing Information for LCS request",
performSRIRequestParam, String.class.getName(), MBeanOperationInfo.ACTION),
};
return new MBeanInfo(TestMapLcsClientMan.class.getName(), "MapLcsClient test parameters management", attributes, null, operations, null);
}
JmxConnection.java 文件源码
项目:eZooKeeper
阅读 27
收藏 0
点赞 0
评论 0
/**
* TODO: Comment.
*
* @param mbean
* @param operationName
* @return
*/
public MBeanOperation getMBeanOperation(MBean mbean, String operationName) {
if (mbean == null) {
throw new IllegalArgumentException("null MBean");
}
if (operationName == null) {
throw new IllegalArgumentException("null operationName");
}
MBeanOperationInfo operationInfo = mbean.getOperationInfo(operationName);
MBeanOperation mbeanOperation = new MBeanOperation(operationName);
mbeanOperation.setInfo(operationInfo);
return mbeanOperation;
}
JmxUtils.java 文件源码
项目:eZooKeeper
阅读 34
收藏 0
点赞 0
评论 0
public static final String getOperationName(MBeanOperationInfo info) {
StringBuilder name = new StringBuilder(info.getName());
name.append('(');
MBeanParameterInfo[] parameterInfos = info.getSignature();
if (parameterInfos != null) {
int parameterCount = parameterInfos.length;
for (int i = 0; i < parameterCount; i++) {
MBeanParameterInfo parameterInfo = parameterInfos[i];
String parameterType = getTypeName(parameterInfo.getType(), parameterInfo.getDescriptor());
name.append(parameterType);
if (i < parameterCount - 1) {
name.append(", ");
}
}
}
name.append(')');
return name.toString();
}
MBean.java 文件源码
项目:eZooKeeper
阅读 34
收藏 0
点赞 0
评论 0
/**
* TODO: Comment.
*
*/
private void initOperationCollections() {
MBeanOperationInfo[] operationInfos = _Info.getOperations();
int size = 0;
if (operationInfos != null) {
size = operationInfos.length;
}
_OperationNames = new TreeSet<String>();
_OperationInfoMap = new HashMap<String, MBeanOperationInfo>(size);
if (size == 0) {
return;
}
for (MBeanOperationInfo operationInfo : operationInfos) {
String operationName = JmxUtils.getOperationName(operationInfo);
_OperationNames.add(operationName);
_OperationInfoMap.put(operationName, operationInfo);
}
}
MBeanOperationDoc.java 文件源码
项目:eZooKeeper
阅读 24
收藏 0
点赞 0
评论 0
public static String getImpactString(int impact) {
switch (impact) {
case MBeanOperationInfo.ACTION:
return IMPACT_ACTION;
case MBeanOperationInfo.ACTION_INFO:
return IMPACT_ACTION_INFO;
case MBeanOperationInfo.INFO:
return IMPACT_INFO;
case MBeanOperationInfo.UNKNOWN:
default:
return IMPACT_UNKNOWN;
}
}
MBeanDoc.java 文件源码
项目:eZooKeeper
阅读 27
收藏 0
点赞 0
评论 0
public List<MBeanOperationDoc> getOperations() {
if (_Operations == null) {
MBeanOperationInfo[] operationInfos = getInfo().getOperations();
if (operationInfos == null || operationInfos.length == 0) {
return Collections.emptyList();
}
_Operations = new ArrayList<MBeanOperationDoc>(operationInfos.length);
for (MBeanOperationInfo operationInfo : operationInfos) {
MBeanOperationDoc operationDoc = new MBeanOperationDoc(operationInfo);
_Operations.add(operationDoc);
}
}
return _Operations;
}
JMXProxyServlet.java 文件源码
项目:tomcat7
阅读 25
收藏 0
点赞 0
评论 0
/**
* Invokes an operation on an MBean.
* @param onameStr The name of the MBean.
* @param operation The name of the operation to invoke.
* @param parameters An array of Strings containing the parameters to the
* operation. They will be converted to the appropriate
* types to call the reuested operation.
* @return The value returned by the requested operation.
*/
private Object invokeOperationInternal(String onameStr,
String operation,
String[] parameters)
throws OperationsException, MBeanException, ReflectionException {
ObjectName oname=new ObjectName( onameStr );
MBeanOperationInfo methodInfo = registry.getMethodInfo(oname,operation);
MBeanParameterInfo[] signature = methodInfo.getSignature();
String[] signatureTypes = new String[signature.length];
Object[] values = new Object[signature.length];
for (int i = 0; i < signature.length; i++) {
MBeanParameterInfo pi = signature[i];
signatureTypes[i] = pi.getType();
values[i] = registry.convertValue(pi.getType(), parameters[i] );
}
return mBeanServer.invoke(oname,operation,values,signatureTypes);
}
Registry.java 文件源码
项目:tomcat7
阅读 27
收藏 0
点赞 0
评论 0
/** Find the operation info for a method
*
* @param oname
* @param opName
* @return the operation info for the specified operation
*/
public MBeanOperationInfo getMethodInfo( ObjectName oname, String opName )
{
MBeanInfo info=null;
try {
info=server.getMBeanInfo(oname);
} catch (Exception e) {
log.info( "Can't find metadata " + oname );
return null;
}
MBeanOperationInfo attInfo[]=info.getOperations();
for( int i=0; i<attInfo.length; i++ ) {
if( opName.equals(attInfo[i].getName())) {
return attInfo[i];
}
}
return null;
}
MBeanClientInterceptor.java 文件源码
项目:lams
阅读 30
收藏 0
点赞 0
评论 0
/**
* Routes a method invocation (not a property get/set) to the corresponding
* operation on the managed resource.
* @param method the method corresponding to operation on the managed resource.
* @param args the invocation arguments
* @return the value returned by the method invocation.
*/
private Object invokeOperation(Method method, Object[] args) throws JMException, IOException {
MethodCacheKey key = new MethodCacheKey(method.getName(), method.getParameterTypes());
MBeanOperationInfo info = this.allowedOperations.get(key);
if (info == null) {
throw new InvalidInvocationException("Operation '" + method.getName() +
"' is not exposed on the management interface");
}
String[] signature = null;
synchronized (this.signatureCache) {
signature = this.signatureCache.get(method);
if (signature == null) {
signature = JmxUtils.getMethodSignature(method);
this.signatureCache.put(method, signature);
}
}
return this.serverToUse.invoke(this.objectName, method.getName(), args, signature);
}
Registry.java 文件源码
项目:lams
阅读 30
收藏 0
点赞 0
评论 0
/** Find the operation info for a method
*
* @param oname
* @param opName
* @return the operation info for the specified operation
*/
public MBeanOperationInfo getMethodInfo( ObjectName oname, String opName )
{
String type=null;
MBeanInfo info=null;
try {
info=server.getMBeanInfo(oname);
} catch (Exception e) {
log.info( "Can't find metadata " + oname );
return null;
}
MBeanOperationInfo attInfo[]=info.getOperations();
for( int i=0; i<attInfo.length; i++ ) {
if( opName.equals(attInfo[i].getName())) {
return attInfo[i];
}
}
return null;
}
JMXProxyServlet.java 文件源码
项目:apache-tomcat-7.0.73-with-comment
阅读 26
收藏 0
点赞 0
评论 0
/**
* Invokes an operation on an MBean.
* @param onameStr The name of the MBean.
* @param operation The name of the operation to invoke.
* @param parameters An array of Strings containing the parameters to the
* operation. They will be converted to the appropriate
* types to call the reuested operation.
* @return The value returned by the requested operation.
*/
private Object invokeOperationInternal(String onameStr,
String operation,
String[] parameters)
throws OperationsException, MBeanException, ReflectionException {
ObjectName oname=new ObjectName( onameStr );
MBeanOperationInfo methodInfo = registry.getMethodInfo(oname,operation);
MBeanParameterInfo[] signature = methodInfo.getSignature();
String[] signatureTypes = new String[signature.length];
Object[] values = new Object[signature.length];
for (int i = 0; i < signature.length; i++) {
MBeanParameterInfo pi = signature[i];
signatureTypes[i] = pi.getType();
values[i] = registry.convertValue(pi.getType(), parameters[i] );
}
return mBeanServer.invoke(oname,operation,values,signatureTypes);
}
Registry.java 文件源码
项目:apache-tomcat-7.0.73-with-comment
阅读 27
收藏 0
点赞 0
评论 0
/** Find the operation info for a method
*
* @param oname
* @param opName
* @return the operation info for the specified operation
*/
public MBeanOperationInfo getMethodInfo( ObjectName oname, String opName )
{
MBeanInfo info=null;
try {
info=server.getMBeanInfo(oname);
} catch (Exception e) {
log.info( "Can't find metadata " + oname );
return null;
}
MBeanOperationInfo attInfo[]=info.getOperations();
for( int i=0; i<attInfo.length; i++ ) {
if( opName.equals(attInfo[i].getName())) {
return attInfo[i];
}
}
return null;
}
JMXProxyServlet.java 文件源码
项目:lazycat
阅读 29
收藏 0
点赞 0
评论 0
/**
* Invokes an operation on an MBean.
*
* @param onameStr
* The name of the MBean.
* @param operation
* The name of the operation to invoke.
* @param parameters
* An array of Strings containing the parameters to the
* operation. They will be converted to the appropriate types to
* call the requested operation.
* @return The value returned by the requested operation.
*/
private Object invokeOperationInternal(String onameStr, String operation, String[] parameters)
throws OperationsException, MBeanException, ReflectionException {
ObjectName oname = new ObjectName(onameStr);
MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation);
MBeanParameterInfo[] signature = methodInfo.getSignature();
String[] signatureTypes = new String[signature.length];
Object[] values = new Object[signature.length];
for (int i = 0; i < signature.length; i++) {
MBeanParameterInfo pi = signature[i];
signatureTypes[i] = pi.getType();
values[i] = registry.convertValue(pi.getType(), parameters[i]);
}
return mBeanServer.invoke(oname, operation, values, signatureTypes);
}
MustBeValidCommand.java 文件源码
项目:jdk8u-jdk
阅读 32
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
// Instantiate the MBean server
//
final MBeanAttributeInfo[] atts = makeAttInfos(attributes);
final MBeanConstructorInfo[] ctors = makeCtorInfos(constructors);
final MBeanOperationInfo[] ops = makeOpInfos(operations);
final MBeanNotificationInfo[] notifs =
makeNotifInfos(notificationclasses);
for (int i=0; i<mbeanclasses.length;i++) {
System.out.println("Create an MBeanInfo: " + mbeanclasses[i][0]);
final MBeanInfo mbi =
new MBeanInfo(mbeanclasses[i][1],mbeanclasses[i][0],
atts, ctors, ops, notifs);
}
// Test OK!
//
System.out.println("All MBeanInfo successfuly created!");
System.out.println("Bye! Bye!");
}
MXBeanInteropTest2.java 文件源码
项目:jdk8u-jdk
阅读 23
收藏 0
点赞 0
评论 0
private void printMBeanInfo(MBeanInfo mbInfo) {
System.out.println("Description " + mbInfo.getDescription());
for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
System.out.println("Constructor " + ctor.getName());
}
for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
System.out.println("Attribute " + att.getName()
+ " [" + att.getType() + "]");
}
for (MBeanOperationInfo oper : mbInfo.getOperations()) {
System.out.println("Operation " + oper.getName());
}
for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
System.out.println("Notification " + notif.getName());
}
}
MustBeValidCommand.java 文件源码
项目:openjdk-jdk10
阅读 32
收藏 0
点赞 0
评论 0
public static void main(String[] args) throws Exception {
// Instantiate the MBean server
//
final MBeanAttributeInfo[] atts = makeAttInfos(attributes);
final MBeanConstructorInfo[] ctors = makeCtorInfos(constructors);
final MBeanOperationInfo[] ops = makeOpInfos(operations);
final MBeanNotificationInfo[] notifs =
makeNotifInfos(notificationclasses);
for (int i=0; i<mbeanclasses.length;i++) {
System.out.println("Create an MBeanInfo: " + mbeanclasses[i][0]);
final MBeanInfo mbi =
new MBeanInfo(mbeanclasses[i][1],mbeanclasses[i][0],
atts, ctors, ops, notifs);
}
// Test OK!
//
System.out.println("All MBeanInfo successfuly created!");
System.out.println("Bye! Bye!");
}
MXBeanInteropTest2.java 文件源码
项目:openjdk-jdk10
阅读 24
收藏 0
点赞 0
评论 0
private void printMBeanInfo(MBeanInfo mbInfo) {
System.out.println("Description " + mbInfo.getDescription());
for (MBeanConstructorInfo ctor : mbInfo.getConstructors()) {
System.out.println("Constructor " + ctor.getName());
}
for (MBeanAttributeInfo att : mbInfo.getAttributes()) {
System.out.println("Attribute " + att.getName()
+ " [" + att.getType() + "]");
}
for (MBeanOperationInfo oper : mbInfo.getOperations()) {
System.out.println("Operation " + oper.getName());
}
for (MBeanNotificationInfo notif : mbInfo.getNotifications()) {
System.out.println("Notification " + notif.getName());
}
}
Registry.java 文件源码
项目:lazycat
阅读 32
收藏 0
点赞 0
评论 0
/**
* Find the operation info for a method
*
* @param oname
* @param opName
* @return the operation info for the specified operation
*/
public MBeanOperationInfo getMethodInfo(ObjectName oname, String opName) {
MBeanInfo info = null;
try {
info = server.getMBeanInfo(oname);
} catch (Exception e) {
log.info("Can't find metadata " + oname);
return null;
}
MBeanOperationInfo attInfo[] = info.getOperations();
for (int i = 0; i < attInfo.length; i++) {
if (opName.equals(attInfo[i].getName())) {
return attInfo[i];
}
}
return null;
}
JmxReporter.java 文件源码
项目:tqdev-metrics
阅读 33
收藏 0
点赞 0
评论 0
@Override
public MBeanInfo getMBeanInfo() {
ArrayList<OpenMBeanAttributeInfoSupport> attributes = new ArrayList<>();
attributes.add(new OpenMBeanAttributeInfoSupport("enabled", "enabled", SimpleType.BOOLEAN, true, true, true));
for (String type : registry.getTypes()) {
attributes.add(new OpenMBeanAttributeInfoSupport(type, type, getCompositeType(type), true, false, false));
}
OpenMBeanParameterInfo[] params = new OpenMBeanParameterInfoSupport[0];
OpenMBeanOperationInfoSupport reset = new OpenMBeanOperationInfoSupport("reset", "Reset all Metrics", params,
SimpleType.VOID, MBeanOperationInfo.ACTION);
OpenMBeanInfoSupport PSOMBInfo = new OpenMBeanInfoSupport(this.getClass().getName(), description,
attributes.toArray(new OpenMBeanAttributeInfoSupport[0]), new OpenMBeanConstructorInfoSupport[0],
new OpenMBeanOperationInfoSupport[] { reset }, new MBeanNotificationInfo[0]);
return PSOMBInfo;
}
TestCheckImeiClientStandardManMBean.java 文件源码
项目:phone-simulator
阅读 21
收藏 0
点赞 0
评论 0
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] attributes = new MBeanAttributeInfo[] {
// TODO mnowa: add/correct attributes here
new MBeanAttributeInfo("Imei", String.class.getName(), "IMEI's digits string", true, true, false),
new MBeanAttributeInfo("MapProtocolVersion", MapProtocolVersion.class.getName(), "MAP protocol version", true, true, false),
new MBeanAttributeInfo("MapProtocolVersion_Value", String.class.getName(), "MAP protocol version", true, false, false),
new MBeanAttributeInfo(
"CheckImeiClientAction",
CheckImeiClientAction.class.getName(),
"The mode of CheckImeiClient work. When manual response user can manually send CheckImei request, when VAL_AUTO_SendCheckImeiRequest the tester sends CheckImei requests without dealay (load test)",
true, true, false),
new MBeanAttributeInfo(
"CheckImeiClientAction_Value",
String.class.getName(),
"The mode of CheckImeiClient work. When manual response user can manually send CheckImei request, when VAL_AUTO_SendCheckImeiRequest the tester sends CheckImei requests without dealay (load test)",
true, false, false),
new MBeanAttributeInfo("MaxConcurrentDialogs", int.class.getName(), "The count of maximum active MAP dialogs when the auto sending mode", true,
true, false),
new MBeanAttributeInfo("OneNotificationFor100Dialogs", boolean.class.getName(),
"If true there will be only one notification per every 100 sent dialogs (recommended for the auto sending mode)", true, true, true),
};
MBeanParameterInfo[] performCheckImeiParam = new MBeanParameterInfo[] { new MBeanParameterInfo("imei", String.class.getName(), "IMEI's digits string")};
MBeanParameterInfo[] signString = new MBeanParameterInfo[] { new MBeanParameterInfo("val", String.class.getName(), "Index number or value") };
MBeanOperationInfo[] operations = new MBeanOperationInfo[] {
new MBeanOperationInfo("performCheckImeiRequest", "Send CheckIMEI request for provided IMEI", performCheckImeiParam/*signString*/ , String.class.getName(), MBeanOperationInfo.ACTION),
new MBeanOperationInfo("putMapProtocolVersion", "MAP protocol version: " + "1, 2 or 3", signString, Void.TYPE.getName(),
MBeanOperationInfo.ACTION),
new MBeanOperationInfo("closeCurrentDialog", "Closing the current dialog", null, String.class.getName(), MBeanOperationInfo.ACTION),
new MBeanOperationInfo("putCheckImeiClientAction",
"The mode of CheckImeiClient work. 1:VAL_MANUAL_OPERATION,2:VAL_AUTO_SendCheckImeiRequest", signString, Void.TYPE.getName(),
MBeanOperationInfo.ACTION),
};
return new MBeanInfo(TestCheckImeiClientMan.class.getName(), "CheckImeiClient test parameters management", attributes, null, operations, null);
}
JBoss.java 文件源码
项目:APacheSynapseSimplePOC
阅读 27
收藏 0
点赞 0
评论 0
private static void doExploit ( final Object payloadObject, MBeanServerConnection mbc )
throws IOException, InstanceNotFoundException, IntrospectionException, ReflectionException {
Object[] params = new Object[1];
params[ 0 ] = payloadObject;
System.err.println("Querying MBeans");
Set<ObjectInstance> testMBeans = mbc.queryMBeans(null, null);
System.err.println("Found " + testMBeans.size() + " MBeans");
for ( ObjectInstance oi : testMBeans ) {
MBeanInfo mBeanInfo = mbc.getMBeanInfo(oi.getObjectName());
for ( MBeanOperationInfo opInfo : mBeanInfo.getOperations() ) {
try {
mbc.invoke(oi.getObjectName(), opInfo.getName(), params, new String[] {});
System.err.println(oi.getObjectName() + ":" + opInfo.getName() + " -> SUCCESS");
return;
}
catch ( Throwable e ) {
String msg = e.getMessage();
if ( msg.startsWith("java.lang.ClassNotFoundException:") ) {
int start = msg.indexOf('"');
int stop = msg.indexOf('"', start + 1);
String module = ( start >= 0 && stop > 0 ) ? msg.substring(start + 1, stop) : "<unknown>";
if ( !"<unknown>".equals(module) && !"org.jboss.as.jmx:main".equals(module) ) {
int cstart = msg.indexOf(':');
int cend = msg.indexOf(' ', cstart + 2);
String cls = msg.substring(cstart + 2, cend);
System.err.println(oi.getObjectName() + ":" + opInfo.getName() + " -> FAIL CNFE " + cls + " (" + module + ")");
}
}
else {
System.err.println(oi.getObjectName() + ":" + opInfo.getName() + " -> SUCCESS|ERROR " + msg);
return;
}
}
}
}
}
MBean.java 文件源码
项目:eZooKeeper
阅读 28
收藏 0
点赞 0
评论 0
/**
* TODO: Comment.
*
* @param operationName
* @return
*/
public MBeanOperationInfo getOperationInfo(String operationName) {
if (_OperationInfoMap == null) {
initOperationCollections();
}
return _OperationInfoMap.get(operationName);
}
JmxManagerView.java 文件源码
项目:truevfs
阅读 27
收藏 0
点赞 0
评论 0
@Override
protected String getDescription(final MBeanOperationInfo info) {
switch (info.getName()) {
case "sync":
return "Synchronizes all file systems and eventually unmounts them.";
default:
return null;
}
}
JmxModelView.java 文件源码
项目:truevfs
阅读 22
收藏 0
点赞 0
评论 0
@Override
protected String getDescription(final MBeanOperationInfo info) {
switch (info.getName()) {
case "sync":
return "Synchronizes this file system and all enclosed file systems and eventually unmounts them.";
default:
return null;
}
}
SetConfigurationSetting.java 文件源码
项目:oscm
阅读 23
收藏 0
点赞 0
评论 0
@Override
public synchronized MBeanInfo getMBeanInfo() {
MBeanParameterInfo[] parameter = new MBeanParameterInfo[] {
new MBeanParameterInfo("informationId", "java.lang.String",
"The information ID which the value will be changed. e.g. AUTH_MODE"),
new MBeanParameterInfo("value", "java.lang.String",
"The value to be set for the information ID. e.g. INTERNAL, SAML_SP") };
MBeanOperationInfo[] operations = { new MBeanOperationInfo(
SET_CONFIGURATION_SETTING, "Set configuration setting",
parameter, "java.lang.String", MBeanOperationInfo.ACTION) };
return new MBeanInfo(this.getClass().getName(),
"Set Configuration Setting MBean", null, null, operations, null);
}
StartBillingRun.java 文件源码
项目:oscm
阅读 21
收藏 0
点赞 0
评论 0
@Override
public synchronized MBeanInfo getMBeanInfo() {
MBeanParameterInfo[] parameter = new MBeanParameterInfo[] { new MBeanParameterInfo(
"currentDate", "java.lang.String",
"The current date for the billing run. Format is "
+ DATE_FORMAT.toUpperCase()) };
MBeanOperationInfo[] operations = { new MBeanOperationInfo(
START_BILLING_RUN, "Start billing run", parameter,
"java.lang.String", MBeanOperationInfo.ACTION) };
return new MBeanInfo(this.getClass().getName(), "Billing Run MBean",
null, null, operations, null);
}