Package org.nimbustools.ctxbroker.generated.gt4_0.description

Examples of org.nimbustools.ctxbroker.generated.gt4_0.description.IdentityProvides_Type


            send.setIp(this.queryIP);
        } else {
            throw new IllegalStateException("validation failed?");
        }

        final IdentitiesResponse_Type response;
        try {
            response = ((NimbusContextBrokerPortType)
                                        this.portType).identities(send);
        } catch (NimbusContextualizationFault e) {
            throw e;
        } catch (RemoteException e) {
            throw RMIUtils.generalRemoteException(e);
        }

        if (response == null) {
            throw new ExecutionProblem("No response element from query?");
        }

        final Node_Type[] ret = response.getNode();
        if (ret == null || ret.length == 0) {
            return EMPTY_RESPONSE;
        } else {
            return ret;
        }
View Full Code Here


                                           ExecutionProblem,
                                           NimbusContextualizationFault {

        this.validateAll();

        final IdentitiesSend_Type send = new IdentitiesSend_Type();
        if (this.queryAll) {
            send.setAll(Boolean.TRUE);
        } else if (this.queryHost != null) {
            send.setHost(this.queryHost);
        } else if (this.queryIP != null) {
            send.setIp(this.queryIP);
        } else {
            throw new IllegalStateException("validation failed?");
        }

        final IdentitiesResponse_Type response;
View Full Code Here

            one.setName(this.dataNames[i]);
            one.set_value(this.dataValues[i]);
            data[i] = one;
        }

        final InjectData_Type send = new InjectData_Type(data);
       
        try {
            ((NimbusContextBrokerPortType) this.portType).injectdata(send);
        } catch (NimbusContextualizationFault e) {
            throw e;
View Full Code Here

        final InjectData_TypeData[] data =
                    new InjectData_TypeData[this.dataNames.length];

        for (int i = 0; i < data.length; i++) {
            final InjectData_TypeData one = new InjectData_TypeData();
            one.setName(this.dataNames[i]);
            one.set_value(this.dataValues[i]);
            data[i] = one;
        }

        final InjectData_Type send = new InjectData_Type(data);
       
View Full Code Here

                        new Node_Type[resultList.size()]);
    }

    private static Node_Type getOneNodeResponse(NodeStatus node) {

        final Node_Type xmlNode = new Node_Type();

        /* identities */
        final List<IdentityProvides_Type> xmlIdentsList = new ArrayList<IdentityProvides_Type>(3);
        for (Identity ident : node.getIdentities()) {
            if (ident != null) {
                xmlIdentsList.add(idToXML(ident));
            }
        }
        final IdentityProvides_Type[] xmlIdents =
                xmlIdentsList.toArray(
                        new IdentityProvides_Type[xmlIdentsList.size()]);

        xmlNode.setIdentity(xmlIdents);

        /* status */
        if (node.isOkOccurred()) {
            xmlNode.setExited(true);
            xmlNode.setOk(true);
        } else if (node.isErrorOccurred()) {
            xmlNode.setExited(true);
            xmlNode.setErrorCode(node.getErrorCode());
            xmlNode.setErrorMessage(node.getErrorMessage());
        } else {
            xmlNode.setExited(false);
        }

        return xmlNode;
    }
View Full Code Here

                                 String reportDir,
                                 NumberFormat format) {

        for (int i = 0; i < nodes.length; i++) {
           
            final Node_Type node = nodes[i];
            final String prefix = this.getStateString(node) + "-vm-";
            final String path = prefix + format.format(i+1) + ".txt";

            try {
                this.writeOneReport(nodes[i], reportDir, path);
View Full Code Here

        id.setHostname("xyz");
        id.setIp("1.2.3.4");
        id.setPubkey("ssh-rsa 132reoi3nfoi3nfoin3f#$@$@#$@#$@#$@#$");

        IdentityProvides_Type[] ids = {id};
        Node_Type node = new Node_Type();
        node.setIdentity(ids);
        Node_Type[] nodes = {node};

        AdjustTask task = new AdjustTask("1.2.3.4", null, "something");
        AdjustTask[] tasks = {task};
        Print pr = new Print(new PrintOpts(null), System.out, System.err, System.err);
View Full Code Here

                logger.error(e.getMessage());
            }
            throw ContextFault.makeCtxFault(e.getMessage(), null);
        }

        final RetrieveResponse_Type response = new RetrieveResponse_Type();

        // For now we take requires being null to mean node is not complete.
        // If resource is not locked we are also currently not answering.
        // i.e., no partial answers.  Also for now.

        if (requires == null) {
            //requires = new Requires_Type();
            //requires.setIdentity(null);
            //requires.setRole(null);
            response.setComplete(false);
        } else {
            response.setComplete(true);
        }

        response.setNoMoreInjections(resource.isNoMoreInjections());
        response.setRequires(requires);

        return response;
    }
View Full Code Here

                    logger.error(e.getMessage());
                }
                throw ContextFault.makeCtxFault(e.getMessage(), null);
            }
        }
        return new VoidType();
    }
View Full Code Here

            } else {
                logger.error(e.getMessage());
            }
            throw ContextFault.makeCtxFault(e.getMessage(), null);
        }
        return new VoidType();
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.ctxbroker.generated.gt4_0.description.IdentityProvides_Type

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.