Examples of ExecutionProblem


Examples of org.globus.workspace.client_core.ExecutionProblem

        try {
            return this._queryOnce();
        } catch (Exception e) {
            final String err = "Problem querying logistics: ";
            throw new ExecutionProblem(err + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        try {
            return this._queryOnce();
        } catch (BaseFaultType e) {
            final String err = CommonStrings.faultStringOrCommonCause(e);
            throw new ExecutionProblem(err, e);
        } catch (Exception e) {
            final String err =
                    "Problem querying factory resource properties: " +
                            CommonUtil.genericExceptionMessageWrapper(e);
            throw new ExecutionProblem(err + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        final FactoryRPSet rpSet = (FactoryRPSet) resp.get_any()[0].
                        getValueAsType(Constants_GT4_0.FACTORY_RP_SET,
                                       FactoryRPSet.class);

        if (rpSet == null) {
            throw new ExecutionProblem("No factory RP set returned");
        }
        return convert(rpSet);
    }
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

            // these things are not based on any information returned
            try {
                this.populateInitialRepr(workspace);
            } catch (ParameterProblem e) {
                throw new ExecutionProblem(
                            "unexpected problem: " + e.getMessage(), e);
            }
           
            final Schedule_Type xmlSchedule = allrefs[i].getSchedule();
            if (xmlSchedule == null) {
                throw new ExecutionProblem(
                        "(?) no schedule in factory response");
            }

            try {
                workspace.setInitialSchedule(new Schedule(xmlSchedule));
                // this is intentionally a separate object:
                workspace.setCurrentSchedule(new Schedule(xmlSchedule));
            } catch (InvalidDurationException e) {
                throw new ExecutionProblem(
                        "(?) invalid data in factory response: " +
                                e.getMessage(), e);
            }

            final VirtualNetwork_Type xmlNetwork = allrefs[i].getNetworking();
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        try {
            return this._queryOnce();
        } catch (Exception e) {
            final String err = "Problem querying for schedule: ";
            throw new ExecutionProblem(err + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

                                           this.certToSign,
                                           this.lifetime,
                                           this.fullDeleg,
                                           this.csd);
        } catch (DelegationException e) {
            throw new ExecutionProblem(
                    "Problem delegating: " + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        try {
            return convert(current);
        } catch (InvalidDurationException e) {
            final String err = "Problem converting query result: ";
            throw new ExecutionProblem(err + e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        } 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;
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        // these things are not based on any information returned
        try {
            this.populateInitialRepr(workspace);
        } catch (ParameterProblem e) {
            throw new ExecutionProblem(
                        "unexpected problem: " + e.getMessage(), e);
        }

        // length/not-null already checked
        final CreatedWorkspace_Type[] allrefs = response.getCreatedWorkspace();

        final Schedule_Type xmlSchedule = allrefs[0].getSchedule();
        if (xmlSchedule == null) {
            throw new ExecutionProblem(
                    "(?) no schedule in factory response");
        }

        final VirtualNetwork_Type xmlNetwork = allrefs[0].getNetworking();
        if (xmlNetwork != null) {
            workspace.setCurrentNetworking(new Networking(xmlNetwork));
        }

        workspace.setEpr(allrefs[0].getEpr());

        try {
            workspace.setInitialSchedule(new Schedule(xmlSchedule));
            // this is intentionally a separate object:
            workspace.setCurrentSchedule(new Schedule(xmlSchedule));
        } catch (InvalidDurationException e) {
            throw new ExecutionProblem(
                    "(?) invalid data in factory response: " +
                            e.getMessage(), e);
        }

        final EndpointReferenceType ensembleEPR = response.getEnsembleEPR();
View Full Code Here

Examples of org.globus.workspace.client_core.ExecutionProblem

        /* CHECK GENERAL ASSUMPTIONS */

        // the "(?)" symbol is a shorthand for "very unexpected"...

        if (response == null) {
            throw new ExecutionProblem("(?) null response");
        }

        final CreatedWorkspace_Type[] allrefs = response.getCreatedWorkspace();
        if (allrefs == null) {
            throw new ExecutionProblem(
                    "(?) null references in factory response");
        }

        /* CHECK NODE-NUMBER RELATED ASSUMPTIONS */

        final int expectedNodeNum =
                createRequest.getResourceRequest().getNodeNumber();

        if (expectedNodeNum == 1) {
            if (response.getGroupEPR() != null) {
                throw new ExecutionProblem("(?) group EPR assigned but " +
                        "this was not a group request");
            }
        } else {
            if (response.getGroupEPR() == null) {
                throw new ExecutionProblem("(?) group EPR was not assigned " +
                        "but this was a group request");
            }
        }

        if (allrefs.length != expectedNodeNum) {
            throw new ExecutionProblem("(?) expecting " + expectedNodeNum +
                  "CreatedWorkspace reference(s), received " + allrefs.length);
        }


        /* CHECK ENSEMBLE RELATED ASSUMPTIONS */

        final EndpointReferenceType ensembleEPR = response.getEnsembleEPR();

        if (this.expectEnsembleEPR && ensembleEPR == null) {
            throw new ExecutionProblem("(?) requested ensemble " +
                    "participation but no ensemble EPR was assigned");
        }

        if (!this.expectEnsembleEPR && ensembleEPR != null) {
            throw new ExecutionProblem("(?) ensemble EPR assigned but " +
                    "no request was made for ensemble participation");
        }

        /* CHECK CONTEXT RELATED ASSUMPTIONS */

        final EndpointReferenceType contextEPR = response.getContextEPR();

        if (this.expectContextEPR && contextEPR == null) {
            throw new ExecutionProblem("(?) requested context " +
                    "participation but no context EPR was assigned");
        }

        if (!this.expectContextEPR && contextEPR != null) {
            throw new ExecutionProblem("(?) context EPR assigned but " +
                    "no request was made for context participation");
        }

        return response;
    }
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.