Package java.rmi.activation.ActivationGroupDesc

Examples of java.rmi.activation.ActivationGroupDesc.CommandEnvironment


             * group.
             *
             */
            String args[];
            ArrayList al = new ArrayList();
            CommandEnvironment ce = agdesc.getCommandEnvironment();

            if (ce != null) {

                String[] options = ce.getCommandOptions();
                String cmd = ce.getCommandPath();
                if (cmd != null) {
                    al.add(cmd);
                } else {
                    al.add("java"); //$NON-NLS-1$
                }
View Full Code Here


public class NullOptions {

    public static void main(String[] args) throws Exception {

        CommandEnvironment env1 =
            new CommandEnvironment(null, null);
        CommandEnvironment env2 =
            new CommandEnvironment(null, new String[0]);

        if (env1.equals(env2)) {
            System.err.println("TEST PASSED: environments are equal");
        } else {
            System.err.println("TEST FAILED: environments not equal!");
View Full Code Here

             * group.
             *
             */
            String args[];
            ArrayList al = new ArrayList();
            CommandEnvironment ce = agdesc.getCommandEnvironment();

            if (ce != null) {

                String[] options = ce.getCommandOptions();
                String cmd = ce.getCommandPath();
                if (cmd != null) {
                    al.add(cmd);
                } else {
                    al.add("java"); //$NON-NLS-1$
                }
View Full Code Here

             * group.
             *
             */
            String args[];
            ArrayList al = new ArrayList();
            CommandEnvironment ce = agdesc.getCommandEnvironment();

            if (ce != null) {

                String[] options = ce.getCommandOptions();
                String cmd = ce.getCommandPath();
                if (cmd != null) {
                    al.add(cmd);
                } else {
                    al.add("java"); //$NON-NLS-1$
                }
View Full Code Here

        assertNull(agd.getData());
        assertNull(agd.getPropertyOverrides());
        assertNull(agd.getCommandEnvironment());
        Properties p = new Properties();
        p.setProperty("key", "value");
        CommandEnvironment ce = new ActivationGroupDesc.CommandEnvironment("cmd", new String[] {
                "option1", "option1" });
        agd = new ActivationGroupDesc(p, ce);
        assertNull(agd.getClassName());
        assertNull(agd.getLocation());
        assertNull(agd.getData());
View Full Code Here

        assertNull(agd.getData());
        assertNull(agd.getPropertyOverrides());
        assertNull(agd.getCommandEnvironment());
        Properties p = new Properties();
        p.setProperty("key", "value");
        CommandEnvironment ce = new ActivationGroupDesc.CommandEnvironment("cmd", new String[] {
                "option1", "option1" });
        agd = new ActivationGroupDesc("className", "location", null, p, ce);
        assertEquals("className", agd.getClassName());
        assertEquals("location", agd.getLocation());
        assertNull(agd.getData());
View Full Code Here

    public void testEqualsObject() {
        ActivationGroupDesc agd = new ActivationGroupDesc(null, null, null, null, null);
        assertEquals(agd, new ActivationGroupDesc(null, null, null, null, null));
        Properties p = new Properties();
        p.setProperty("key", "value");
        CommandEnvironment ce = new ActivationGroupDesc.CommandEnvironment("cmd", new String[] {
                "option1", "option1" });
        agd = new ActivationGroupDesc("className", "location", null, p, ce);
        assertEquals(agd, new ActivationGroupDesc("className", "location", null, p, ce));
    }
View Full Code Here

import java.util.Arrays;
import junit.framework.TestCase;

public class ActivationGroupDesc_CommandEnvironmentTest extends TestCase {
    public void testCommandEnvironment() {
        CommandEnvironment ce = new CommandEnvironment(null, null);
        assertNull(ce.getCommandPath());
        assertNotNull(ce.getCommandOptions());
        assertEquals(0, ce.getCommandOptions().length);
        String[] options = new String[] { "option1", "option2" };
        ce = new CommandEnvironment("cmd", options);
        assertEquals("cmd", ce.getCommandPath());
        assertNotSame(options, ce.getCommandOptions());
        assertTrue(Arrays.equals(options, ce.getCommandOptions()));
    }
View Full Code Here

        assertNotSame(options, ce.getCommandOptions());
        assertTrue(Arrays.equals(options, ce.getCommandOptions()));
    }

    public void testHashCode() {
        CommandEnvironment ce = new CommandEnvironment(null, null);
        assertEquals(ce.hashCode(), new CommandEnvironment(null, null).hashCode());
        ce = new CommandEnvironment("cmd", new String[] { "option1", "option2" });
        assertEquals(ce.hashCode(), new CommandEnvironment("cmd", new String[] { "option1",
                "option2" }).hashCode());
    }
View Full Code Here

        assertEquals(ce.hashCode(), new CommandEnvironment("cmd", new String[] { "option1",
                "option2" }).hashCode());
    }

    public void testEqualsObject() {
        CommandEnvironment ce = new CommandEnvironment(null, null);
        assertEquals(ce, new CommandEnvironment(null, null));
        ce = new CommandEnvironment("cmd", new String[] { "option1", "option2" });
        assertEquals(ce, new CommandEnvironment("cmd", new String[] { "option1", "option2" }));
    }
View Full Code Here

TOP

Related Classes of java.rmi.activation.ActivationGroupDesc.CommandEnvironment

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.