Package org.jmanage.core.services

Examples of org.jmanage.core.services.ServiceContext


            attributeNames = new String[args.length - 1];
            for(int i=0; i< attributeNames.length; i++){
                attributeNames[i] = args[i+1];
            }
        }
        ServiceContext serviceContext =
                context.getServiceContext(expression.getAppName(),
                            expression.getMBeanName());
        AttributeListData[] attributeValues = null;
        if(attributeNames != null){
            attributeValues = service.getAttributes(serviceContext,
View Full Code Here


        for(int index =0; index < signature.length; index++){
            params[index] = properties.get(PARAM + (index + 1));
        }
       
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        ServiceContext srvcContext = context.getWebContext().getServiceContext();
        OperationResultData[] operationResult =
            mbeanService.invoke(srvcContext, objectName, operation, params, signature);
        assert operationResult.length == 1;
        assert !operationResult[0].isError();
        output.append("<pre class=\"plaintext\">" + operationResult[0].getDisplayOutput() + "</pre>");
View Full Code Here

        for(int i=0; i<params.length; i++){
            params[i] = args[i+1];
        }
        /* execute the operation */
        MBeanService service = ServiceFactory.getMBeanService();
        ServiceContext serviceContext = context.getServiceContext(expression.getAppName(),
                        expression.getMBeanName());
        OperationResultData[] resultData =
                service.invoke(serviceContext,
                        expression.getTargetName(),
                        params);
View Full Code Here

        Map<String, ObjectAttribute> wholeAttrMap = new HashMap<String, ObjectAttribute>();
        StringTokenizer st = new StringTokenizer(displayNames, "|");
        MBeanService mbeanService = ServiceFactory.getMBeanService();
        for (Object anExpression : exprList) {
            Expression expression = (Expression) anExpression;
            ServiceContext srvcContext = null;
            ObjectAttribute objAttribute = null;
            try {
                srvcContext = Utils.getServiceContext(context, expression);
                objAttribute = mbeanService.getObjectAttribute(srvcContext,
                        expression.getTargetName());
            } finally {
                if (srvcContext != null)
                    srvcContext.getServerConnection().close();
            }
            assert objAttribute != null;
            assert objAttribute.getStatus() == ObjectAttribute.STATUS_OK;
            if(attribRepWhole.equals(expression.toString()))
              wholeAttrMap.put(st.nextToken(), objAttribute);
View Full Code Here

public class RemoteServiceContextFactoryTest {

    public static void main(String[] args) {

        RemoteServiceContextFactory.setJManageURL("http://localhost:9090");
        ServiceContext context =
                RemoteServiceContextFactory.getServiceContext("admin", "123456", null, null);
        ConfigurationService configService = ServiceFactory.getConfigurationService();

        /* Build ApplicationConfigData object */
        ApplicationConfigData configData = new ApplicationConfigData();
View Full Code Here

TOP

Related Classes of org.jmanage.core.services.ServiceContext

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.