Examples of ServiceContext


Examples of org.jmanage.core.services.ServiceContext

        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

Examples of org.jmanage.core.services.ServiceContext

        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

Examples of org.jmanage.core.services.ServiceContext

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

Examples of org.jvnet.hk2.component.ServiceContext

  protected ServiceContext serviceContext(Exception e, final Inhabitant<?> i) {
    if (null == i) {
      return null;
    }
   
    ServiceContext ctx = null;

    if (e instanceof ComponentException) {
      ctx = ((ComponentException) e).getFailureContext();
    }

    if (null == ctx) {
      ctx = new ServiceContext() {
        @Override
        public ClassLoader getClassLoader() {
          ClassLoader cl;
          if (ClassLoaderHolder.class.isInstance(i)) {
            cl = ((ClassLoaderHolder)i).getClassLoader();
View Full Code Here

Examples of org.omg.IOP.ServiceContext

        int n = contextList.length;
        String username = null;
        String password = null;

        for (int i = 0; i < n; i++) {
            ServiceContext context = contextList[i];
            int tag = context.context_id;

            /*
            if (tag == SecurityInfo.TAG_USERNAME)
            {
View Full Code Here

Examples of org.omg.IOP.ServiceContext

        }
        ServiceContext[] context = new ServiceContext[count];
        int index = 0;
        context[index++] = CODE_SET_SERVICE_CONTEXT;
        if (username != null) {
            context[index++] = new ServiceContext(SecurityInfo.TAG_USERNAME, SecurityInfo.encode(username));
        }
        if (password != null) {
            context[index++] = new ServiceContext(SecurityInfo.TAG_PASSWORD, SecurityInfo.encode(password));
        }
        return context;
    }
View Full Code Here

Examples of org.omg.IOP.ServiceContext

    protected void processReplyServiceContext(ReplyHeader_1_2 reply) {
        ServiceContext[] list = reply.service_context;
        int n = list.length;
        for (int i = 0; i < n; i++) {
            ServiceContext sc = list[i];
            if (sc.context_id == 0xCFCFCFCF
                || sc.context_id == 0xDFDFDFDF) {
                // "CF..." indicates "Call Forget Request"
                // "DF..." indicates "Call Forget Response"
                callForget = sc.context_id;
View Full Code Here

Examples of org.platformlayer.ops.helpers.ServiceContext

    return null;
  }

  @Override
  public PublicKey getSshPublicKey() throws OpsException {
    ServiceContext serviceContext = injector.getInstance(ServiceContext.class);

    SshKey sshKey = serviceContext.getSshKey();
    if (sshKey == null) {
      return null;
    }
    PublicKey publicKey = sshKey.getKeyPair().getPublic();
    return publicKey;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.