Examples of SubProcess


Examples of org.apache.harmony.rmi.common.SubProcess

     *          If some error occurs.
     */
    private void test0(int configServer, boolean endorsedServer,
            int configClient, boolean endorsedClient, int configRegistry,
            boolean endorsedRegistry) throws Exception {
        SubProcess registry = null;
        SubProcess server = null;
        SubProcess client = null;

        try {
            System.out.println("test0: creating registry");
            registry = startProcess("org.apache.harmony.rmi.DGCTest",
                    REGISTRY_ID, configRegistry, endorsedRegistry);
            registry.pipeError();
            System.out.println("test0: Expecting READY from registry");
            registry.expect();
            registry.pipeInput();

            System.out.println("test0: starting server");
            server = startProcess("org.apache.harmony.rmi.DGCTest",
                    SERVER_ID_0, configServer, endorsedServer);
            server.pipeError();
            server.closeOutput();
            System.out.println("test0: Expecting READY from server");
            server.expect();

            System.out.println("test0: starting client");
            client = startProcess("org.apache.harmony.rmi.DGCTest",
                    CLIENT_ID_0, configClient, endorsedClient);
            client.pipeInput();
            client.pipeError();
            client.closeOutput();

            System.out.println("test0: Expecting STARTED from server");
            server.expect("TestObject.test1() started");
            server.pipeInput();

            System.out.println("test0: destroying registry");
            registry.destroy();

            System.out.println("test0: destroying client");
            client.destroy();

            System.out.println("test0: waiting for server to return");
            assertEquals("Test server return", 0, server.waitFor());
        } finally {
            if (registry != null) {
                registry.destroy();
            }
            if (client != null) {
                client.destroy();
            }
            if (server != null) {
                server.destroy();
            }
        }
View Full Code Here

Examples of org.apache.harmony.rmi.common.SubProcess

     *
     * @throws  Exception
     *          If some error occurs.
     */
    private void test3(int config, boolean endorsed) throws Exception {
        SubProcess server = null;

        try {
            System.out.println("test3: starting server");
            server = startProcess("org.apache.harmony.rmi.DGCTest",
                    SERVER_ID_3, config, endorsed);
            server.pipeInput();
            server.pipeError();
            server.closeOutput();
            assertEquals("Test server return", 0, server.waitFor());
        } finally {
            if (server != null) {
                server.destroy();
            }
        }
    }
View Full Code Here

Examples of org.apache.harmony.rmi.common.SubProcess

     */
    public static SubProcess invokeSimilar(String[] options, String className,
            String[] params, boolean useEndorsedDirs, boolean useBootClassPath)
            throws IOException {
        // @ToDo: Rewrite with ProcessBuilder for Java 5.0.
        return new SubProcess(createArgsArray(options, className, params,
                useEndorsedDirs, useBootClassPath));
    }
View Full Code Here

Examples of org.apache.harmony.rmi.common.SubProcess

     *
     * @throws  Exception
     *          If some error occurs.
     */
    public void testSingleVM(int config, boolean endorsed) throws Exception {
        SubProcess server = null;

        try {
            System.out.println("Starting test server");
            server = startProcess("org.apache.harmony.rmi.ConnectionTest",
                            CHILD_ID, config, endorsed);
            server.pipeError();
            server.closeOutput();
            System.out.println("Expecting READY from server");
            server.expect();
            server.pipeInput();
        } finally {
            if (server != null) {
                System.out.println("Destroying server");
                server.destroy();
            }
        }
    }
View Full Code Here

Examples of org.apache.harmony.rmi.common.SubProcess

import org.apache.harmony.rmi.common.SubProcess;
import junit.framework.TestCase;

public class StartupShutdownTest extends TestCase {
    public void testStartup() throws Exception {
        SubProcess rmid = JavaInvoker.invokeSimilar((String[]) null,
                "org.apache.harmony.rmi.activation.Rmid", (String[]) null, true, true);
        rmid.pipeError();
        rmid.pipeInput();
        rmid.closeOutput();
        Thread.sleep(5000);
        ActivationSystem as = ActivationGroup.getSystem();
        assertNotNull(as);
        rmid.destroy();
    }
View Full Code Here

Examples of org.apache.harmony.rmi.common.SubProcess

     *
     * @throws  Exception
     *          If some error occurs.
     */
    public void testSingleVM(int config, boolean endorsed) throws Exception {
        SubProcess server = null;

        try {
            System.out.println("Starting test server");
            server = startProcess("org.apache.harmony.rmi.ConnectionTest",
                            CHILD_ID, config, endorsed);
            server.pipeError();
            server.closeOutput();
            System.out.println("Expecting READY from server");
            server.expect();
            server.pipeInput();
        } finally {
            if (server != null) {
                System.out.println("Destroying server");
                server.destroy();
            }
        }
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

        if (element instanceof StartEvent) {

            outgoing = ((StartEvent) element).getOutgoing();
        } else if (element instanceof SubProcess) {
           
            SubProcess subProcess = ((SubProcess) element);
            outgoing = subProcess.getOutgoing();
        } else if (element instanceof Event) {
           
            outgoing = ((Event) element).getOutgoing();
        } else if (element instanceof Activity) {
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

public class EmbeddedSubprocessHandler extends MainElementHandler {

   
    public boolean handle(FlowElement element, PathContextManager manager) {
        SubProcess subProcess = ((SubProcess) element);
       
        // process internal nodes of the sub process
        List<FlowElement> sbElements = subProcess.getFlowElements();
        StartEvent start = null;
        for (FlowElement sbElement : sbElements) {
            if (sbElement instanceof StartEvent) {
                start = (StartEvent) sbElement;
                break;
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.SUB_PROCESS: {
            SubProcess subProcess = (SubProcess) theEObject;
            T result = caseSubProcess(subProcess);
            if (result == null)
                result = caseActivity(subProcess);
            if (result == null)
                result = caseFlowElementsContainer(subProcess);
View Full Code Here

Examples of org.eclipse.bpmn2.SubProcess

      if (flowElement instanceof SequenceFlow) {
        SequenceFlow flow = (SequenceFlow) flowElement;
        flowSourceMap.put(flow.getSourceRef().getId(), flow);
        flowTargetMap.put(flow.getTargetRef().getId(), flow);
      } else if (flowElement instanceof SubProcess) {
        SubProcess subProcess = (SubProcess) flowElement;
        addAllSequenceFlows(subProcess.getFlowElements(), flowSourceMap, flowTargetMap);
      }
    }
  }
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.