當前位置: 首頁>>代碼示例>>Java>>正文


Java MBeanOperationInfo類代碼示例

本文整理匯總了Java中javax.management.MBeanOperationInfo的典型用法代碼示例。如果您正苦於以下問題:Java MBeanOperationInfo類的具體用法?Java MBeanOperationInfo怎麽用?Java MBeanOperationInfo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MBeanOperationInfo類屬於javax.management包,在下文中一共展示了MBeanOperationInfo類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getMBeanInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
@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);
}
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:18,代碼來源:CapManStandardMBean.java

示例2: getMBeanInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
@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);
}
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:27,代碼來源:TestCheckImeiServerStandardManMBean.java

示例3: getMBeanInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
@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);
    }
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:24,代碼來源:TestAtiServerStandardManMBean.java

示例4: getMBeanInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
@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);
}
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:18,代碼來源:TestMapLcsServerStandardManMBean.java

示例5: getMBeanInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
@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);
}
 
開發者ID:RestComm,項目名稱:phone-simulator,代碼行數:27,代碼來源:TestMapLcsClientStandardManMBean.java

示例6: getMBeanOperation

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/**
 * 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;
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:24,代碼來源:JmxConnection.java

示例7: getOperationName

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
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();
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:25,代碼來源:JmxUtils.java

示例8: initOperationCollections

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/**
 * 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);
    }
}
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:25,代碼來源:MBean.java

示例9: getImpactString

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
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;
        }
    }
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:18,代碼來源:MBeanOperationDoc.java

示例10: getOperations

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
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;
    }
 
開發者ID:baloise,項目名稱:eZooKeeper,代碼行數:20,代碼來源:MBeanDoc.java

示例11: invokeOperationInternal

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:27,代碼來源:JMXProxyServlet.java

示例12: getMethodInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/** 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;
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:24,代碼來源:Registry.java

示例13: invokeOperation

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:25,代碼來源:MBeanClientInterceptor.java

示例14: getMethodInfo

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/** 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;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:25,代碼來源:Registry.java

示例15: invokeOperationInternal

import javax.management.MBeanOperationInfo; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:29,代碼來源:JMXProxyServlet.java


注:本文中的javax.management.MBeanOperationInfo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。