Package org.nimbustools.messaging.gt4_0

Examples of org.nimbustools.messaging.gt4_0.EPRGenerator


            if (action.equals(ACTION_USAGEQUERY)) {
                UsedAndReservedTime_Type usedReserved = null;
                try {
                    usedReserved =
                            statusPort.queryUsedAndReservedTime(new VoidType());
                } catch (RemoteException e) {
                    die(e, "Problem with query", client.isDebugMode());
                }

                Duration used = usedReserved.getUsedTime();
View Full Code Here


    private Workspace[] _queryAll() throws ExecutionProblem,
                                           RemoteException {

        final CurrentWorkspaces_Type current =
                ((WorkspaceStatusPortType)this.portType)
                                .queryCurrentWorkspaces(new VoidType());

        try {
            return convert(current);
        } catch (InvalidDurationException e) {
            final String err = "Problem converting query result: ";
View Full Code Here

        }

        System.out.println("\nUsing endpoint:\n---------------\n" +
                            client.endpoint + "---------------\n");

        WorkspaceStatusPortType statusPort =
                                    client.initStatusPort(client.endpoint);
        try {
            client.setOptions((Stub)statusPort);
        } catch (Exception e) {
            die(e,"Problem with stub", client.isDebugMode());
        }

        for (Object actionObj : client.actions) {
            Integer action = (Integer) actionObj;

            if (action.equals(ACTION_FACTORYQUERY)) {
                (new RPQuery(client, client.endpoint, System.out)).start();
            }

            if (action.equals(ACTION_USAGEQUERY)) {
                UsedAndReservedTime_Type usedReserved = null;
                try {
                    usedReserved =
                            statusPort.queryUsedAndReservedTime(new VoidType());
                } catch (RemoteException e) {
                    die(e, "Problem with query", client.isDebugMode());
                }

                Duration used = usedReserved.getUsedTime();
View Full Code Here

                EndpointReferenceType epr) {
       
        WorkspaceStatusServiceAddressingLocator locator =
            new WorkspaceStatusServiceAddressingLocator();

        WorkspaceStatusPortType port = null;

        try {
            port = locator.getWorkspaceStatusPortTypePort(epr);
            //setSecurity((Stub) factoryPort);
        } catch (Exception e) {
View Full Code Here

            return; // *** EARLY RETURN ***
        }

        try {
            final WorkspaceStatusPortType port =
                    WSUtils.initStatusPortType(this.epr);
            this.stubConf.setOptions((Stub)port);
            this.portType = port;
        } catch (Throwable t) {
            final String err = "Problem setting up: " +
View Full Code Here

    }
   
    protected WorkspaceStatusPortType initStatusPort(
                EndpointReferenceType epr) {
       
        WorkspaceStatusServiceAddressingLocator locator =
            new WorkspaceStatusServiceAddressingLocator();

        WorkspaceStatusPortType port = null;

        try {
            port = locator.getWorkspaceStatusPortTypePort(epr);
            //setSecurity((Stub) factoryPort);
        } catch (Exception e) {
            die(e,"Port creation error", this.isDebugMode());
        }
View Full Code Here

        if (maxRunningTime != null) {
            rps.setMaximumRunningSeconds(
                    CommonUtil.durationToSeconds(maxRunningTime));
        }

        final Associations assocs = rpSet.getAssociations();
        if (assocs != null) {
            rps.setAssociations(assocs.getAssociation());
        } else {
            rps.setAssociations(null);
        }

        final VMM_Type vmm = rpSet.getVMM();
View Full Code Here

        if (vm == null) {
            return null;
        }

        final CreatedWorkspace_Type created = new CreatedWorkspace_Type();

        created.setEpr(this.instanceEPRs.getEPR(vm.getID()));

        created.setSchedule(this.trinst.getSchedule_Type(vm));

        final Logistics log = this.trinst.getLogistics(vm);
        if (log != null) {
            created.setNetworking(log.getNetworking());
        }

        return created;
    }
View Full Code Here

    }

    private static boolean isState(OneReport_Type report,
                                   CurrentState_Enumeration target) {

        final CurrentState state = report.getCurrentState();
        if (state == null) {
            return false;
        }
        return CurrentState_Enumeration.Running.equals(state.getState());
    }
View Full Code Here

        }
        return CurrentState_Enumeration.Running.equals(state.getState());
    }

    private static boolean isCorrupt(OneReport_Type report) {
        final CurrentState state = report.getCurrentState();
        if (state == null) {
            return true;
        }
        final CurrentState_Enumeration stateString = state.getState();
        return CurrentState_Enumeration.Cancelled.equals(stateString) ||
                CurrentState_Enumeration.Corrupted.equals(stateString);
    }
View Full Code Here

TOP

Related Classes of org.nimbustools.messaging.gt4_0.EPRGenerator

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.