Package com.sun.mfwk

Examples of com.sun.mfwk.MfDelegateFactory


        if (map == null) {
            map = new Hashtable();
        }
        String mbeanName = CMM_MbeanDescriptor.getAttribute("name").trim();
        map.put(mbeanName, DefaultDelegate.class);
        MfDelegateFactory delegateFactory=objectFactory.getDelegateFactory(map);

        // mbean server connection
        MBeanServerConnection mbs = getConnection();

        // cmm object name
        String objectName = mapping.getCMM_ObjectName(CMM_MbeanDescriptor);
        String tokenizedON =
            ObjectNameHelper.tokenizeON(asON, objectName, _context.getTokens());

        DefaultDelegate delegate = null;
        if (!objectFactory.isObjectCreated(tokenizedON)) {
            sourceMbean = objectFactory.createObject(tokenizedON);

            // create delegate
            delegate = (DefaultDelegate)
                delegateFactory.createDelegate(mbs, sourceMbean, asON);

            _delegateReg.put(tokenizedON, delegate);

        } else {
            sourceMbean = objectFactory.getObject(tokenizedON);
View Full Code Here


            // use default delegate class
            map.put(mbeanName, DefaultDelegate.class);
        }

        // delegate factory
        MfDelegateFactory delegateFactory=objectFactory.getDelegateFactory(map);

        // jxm connection to the application server
        MBeanServerConnection mbs = getConnection();

        CMM_MBean sourceMbean = null;
        String objectName = ConfigReader.getMBeanObjectName(mbean, false);
        String tokenizedON =
            ObjectNameHelper.tokenize(objectName, _context.getTokens());

        // if cmm mbean is not created
        if (!objectFactory.isObjectCreated(tokenizedON)) {
            sourceMbean = objectFactory.createObject(tokenizedON);

            // sets up the delegate
            String proxyObjectName=ConfigReader.getMBeanObjectName(mbean, true);
            String tokenizedPON =
                ObjectNameHelper.tokenize(proxyObjectName,_context.getTokens());
            ObjectName pon = ObjectNameHelper.getObjectName(tokenizedPON, mbs);

            MfDelegate delegate =
                delegateFactory.createDelegate(mbs, sourceMbean, pon);

            // instrument the delegate object from descriptor
            DelegateFactory df =
                new DelegateFactory(mbean, delegate, _context, mbs);
            Object d = df.create();
View Full Code Here

TOP

Related Classes of com.sun.mfwk.MfDelegateFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.